+8
changelog.md
+8
changelog.md
+41
composer.json
+41
composer.json
···
···
1
+
{
2
+
"name": "social-dept/atp-client",
3
+
"description": ":package_description",
4
+
"license": "MIT",
5
+
"authors": [
6
+
{
7
+
"name": "Author Name",
8
+
"email": "author@email.com",
9
+
"homepage": "http://author.com"
10
+
}
11
+
],
12
+
"homepage": "https://github.com/social-dept/atp-client",
13
+
"keywords": ["Laravel", "AtpClient"],
14
+
"require": {
15
+
"illuminate/support": "~9"
16
+
},
17
+
"require-dev": {
18
+
"../../../vendor/phpunit/phpunit": "~9.0",
19
+
"orchestra/testbench": "~7"
20
+
},
21
+
"autoload": {
22
+
"psr-4": {
23
+
"SocialDept\\AtpClient\\": "src/"
24
+
}
25
+
},
26
+
"autoload-dev": {
27
+
"psr-4": {
28
+
"SocialDept\\AtpClient\\Tests\\": "tests"
29
+
}
30
+
},
31
+
"extra": {
32
+
"laravel": {
33
+
"providers": [
34
+
"SocialDept\\AtpClient\\AtpClientServiceProvider"
35
+
],
36
+
"aliases": {
37
+
"AtpClient": "SocialDept\\AtpClient\\Facades\\AtpClient"
38
+
}
39
+
}
40
+
}
41
+
}
+27
contributing.md
+27
contributing.md
···
···
1
+
# Contributing
2
+
3
+
Contributions are welcome and will be fully credited.
4
+
5
+
Contributions are accepted via Pull Requests on [Github](https://github.com/social-dept/atp-client).
6
+
7
+
# Things you could do
8
+
If you want to contribute but do not know where to start, this list provides some starting points.
9
+
- Add license text
10
+
- Remove rewriteRules.php
11
+
- Set up TravisCI, StyleCI, ScrutinizerCI
12
+
- Write a comprehensive ReadMe
13
+
14
+
## Pull Requests
15
+
16
+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
17
+
18
+
- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date.
19
+
20
+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
21
+
22
+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
23
+
24
+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
25
+
26
+
27
+
**Happy coding**!
+5
license.md
+5
license.md
+22
phpunit.xml
+22
phpunit.xml
···
···
1
+
<?xml version="1.0" encoding="UTF-8"?>
2
+
<phpunit bootstrap="vendor/autoload.php"
3
+
backupGlobals="false"
4
+
backupStaticAttributes="false"
5
+
colors="true"
6
+
verbose="true"
7
+
convertErrorsToExceptions="true"
8
+
convertNoticesToExceptions="true"
9
+
convertWarningsToExceptions="true"
10
+
processIsolation="false"
11
+
stopOnFailure="false">
12
+
<testsuites>
13
+
<testsuite name="Package">
14
+
<directory suffix=".php">./tests/</directory>
15
+
</testsuite>
16
+
</testsuites>
17
+
<filter>
18
+
<whitelist>
19
+
<directory>src/</directory>
20
+
</whitelist>
21
+
</filter>
22
+
</phpunit>
+57
readme.md
+57
readme.md
···
···
1
+
# AtpClient
2
+
3
+
[![Latest Version on Packagist][ico-version]][link-packagist]
4
+
[![Total Downloads][ico-downloads]][link-downloads]
5
+
[![Build Status][ico-travis]][link-travis]
6
+
[![StyleCI][ico-styleci]][link-styleci]
7
+
8
+
This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.
9
+
10
+
## Installation
11
+
12
+
Via Composer
13
+
14
+
```bash
15
+
composer require social-dept/atp-client
16
+
```
17
+
18
+
## Usage
19
+
20
+
## Change log
21
+
22
+
Please see the [changelog](changelog.md) for more information on what has changed recently.
23
+
24
+
## Testing
25
+
26
+
```bash
27
+
composer test
28
+
```
29
+
30
+
## Contributing
31
+
32
+
Please see [contributing.md](contributing.md) for details and a todolist.
33
+
34
+
## Security
35
+
36
+
If you discover any security related issues, please email author@email.com instead of using the issue tracker.
37
+
38
+
## Credits
39
+
40
+
- [Author Name][link-author]
41
+
- [All Contributors][link-contributors]
42
+
43
+
## License
44
+
45
+
MIT. Please see the [license file](license.md) for more information.
46
+
47
+
[ico-version]: https://img.shields.io/packagist/v/social-dept/atp-client.svg?style=flat-square
48
+
[ico-downloads]: https://img.shields.io/packagist/dt/social-dept/atp-client.svg?style=flat-square
49
+
[ico-travis]: https://img.shields.io/travis/social-dept/atp-client/master.svg?style=flat-square
50
+
[ico-styleci]: https://styleci.io/repos/12345678/shield
51
+
52
+
[link-packagist]: https://packagist.org/packages/social-dept/atp-client
53
+
[link-downloads]: https://packagist.org/packages/social-dept/atp-client
54
+
[link-travis]: https://travis-ci.org/social-dept/atp-client
55
+
[link-styleci]: https://styleci.io/repos/12345678
56
+
[link-author]: https://github.com/social-dept
57
+
[link-contributors]: ../../contributors
+8
src/AtpClient.php
+8
src/AtpClient.php
+82
src/AtpClientServiceProvider.php
+82
src/AtpClientServiceProvider.php
···
···
1
+
<?php
2
+
3
+
namespace SocialDept\AtpClient;
4
+
5
+
use Illuminate\Support\ServiceProvider;
6
+
7
+
class AtpClientServiceProvider extends ServiceProvider
8
+
{
9
+
/**
10
+
* Perform post-registration booting of services.
11
+
*
12
+
* @return void
13
+
*/
14
+
public function boot(): void
15
+
{
16
+
// $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'social-dept');
17
+
// $this->loadViewsFrom(__DIR__.'/../resources/views', 'social-dept');
18
+
// $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
19
+
// $this->loadRoutesFrom(__DIR__.'/routes.php');
20
+
21
+
// Publishing is only necessary when using the CLI.
22
+
if ($this->app->runningInConsole()) {
23
+
$this->bootForConsole();
24
+
}
25
+
}
26
+
27
+
/**
28
+
* Register any package services.
29
+
*
30
+
* @return void
31
+
*/
32
+
public function register(): void
33
+
{
34
+
$this->mergeConfigFrom(__DIR__.'/../config/atp-client.php', 'atp-client');
35
+
36
+
// Register the service the package provides.
37
+
$this->app->singleton('atp-client', function ($app) {
38
+
return new AtpClient;
39
+
});
40
+
}
41
+
42
+
/**
43
+
* Get the services provided by the provider.
44
+
*
45
+
* @return array
46
+
*/
47
+
public function provides()
48
+
{
49
+
return ['atp-client'];
50
+
}
51
+
52
+
/**
53
+
* Console-specific booting.
54
+
*
55
+
* @return void
56
+
*/
57
+
protected function bootForConsole(): void
58
+
{
59
+
// Publishing the configuration file.
60
+
$this->publishes([
61
+
__DIR__.'/../config/atp-client.php' => config_path('atp-client.php'),
62
+
], 'atp-client.config');
63
+
64
+
// Publishing the views.
65
+
/*$this->publishes([
66
+
__DIR__.'/../resources/views' => base_path('resources/views/vendor/social-dept'),
67
+
], 'atp-client.views');*/
68
+
69
+
// Publishing assets.
70
+
/*$this->publishes([
71
+
__DIR__.'/../resources/assets' => public_path('vendor/social-dept'),
72
+
], 'atp-client.assets');*/
73
+
74
+
// Publishing the translation files.
75
+
/*$this->publishes([
76
+
__DIR__.'/../resources/lang' => resource_path('lang/vendor/social-dept'),
77
+
], 'atp-client.lang');*/
78
+
79
+
// Registering package commands.
80
+
// $this->commands([]);
81
+
}
82
+
}
+18
src/Facades/AtpClient.php
+18
src/Facades/AtpClient.php
···
···
1
+
<?php
2
+
3
+
namespace SocialDept\AtpClient\Facades;
4
+
5
+
use Illuminate\Support\Facades\Facade;
6
+
7
+
class AtpClient extends Facade
8
+
{
9
+
/**
10
+
* Get the registered name of the component.
11
+
*
12
+
* @return string
13
+
*/
14
+
protected static function getFacadeAccessor(): string
15
+
{
16
+
return 'atp-client';
17
+
}
18
+
}