irazasyed /
php-transmission-sdk
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Transmission\Laravel; |
||
| 4 | |||
| 5 | use Illuminate\Foundation\Application as LaravelApplication; |
||
| 6 | use Laravel\Lumen\Application as LumenApplication; |
||
| 7 | use Transmission\Client; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Class ServiceProvider. |
||
| 11 | */ |
||
| 12 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Boot the Service Provider. |
||
| 16 | * |
||
| 17 | * @return void |
||
| 18 | */ |
||
| 19 | public function boot() |
||
| 20 | { |
||
| 21 | if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { |
||
| 22 | $this->publishes([ |
||
| 23 | __DIR__.'/config/transmission.php' => config_path('transmission.php'), |
||
| 24 | ]); |
||
| 25 | } elseif ($this->app instanceof LumenApplication) { |
||
| 26 | $this->app->configure('transmission'); |
||
|
0 ignored issues
–
show
|
|||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Register the Service. |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function register() |
||
| 36 | { |
||
| 37 | $this->mergeConfigFrom(__DIR__.'/config/transmission.php', 'transmission'); |
||
| 38 | |||
| 39 | $this->app->singleton('transmission', function () { |
||
| 40 | $client = new Client( |
||
| 41 | config('transmission.host'), |
||
| 42 | config('transmission.port'), |
||
| 43 | config('transmission.username'), |
||
| 44 | config('transmission.password') |
||
| 45 | ); |
||
| 46 | |||
| 47 | if (config('transmission.enableTLS')) { |
||
| 48 | $client = $client->enableTLS(); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $client; |
||
| 52 | }); |
||
| 53 | |||
| 54 | $this->app->alias('transmission', Client::class); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.