for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace P2A\YourMembership;
use Illuminate\Support\ServiceProvider;
use P2A\YourMembership\YourMembershipClient;
class YourMembershipServiceProvider extends ServiceProvider
{
private $packageName = 'yourmembership';
private $packageConfigPath = __DIR__.'/config/yourmembership.php';
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;
* Register the service provider.
* @return void
public function register()
$this->mergeConfigFrom(
$this->packageConfigPath, $this->packageName
);
$this->app->register(YourMembershipClient::class, function($app, $parameters) {
function ($app, $paramet...[0], $parameters[1]); }
object<Closure>
array
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
$guzzleClient = new \GuzzleHttp\Client($app['config']['yourmembership']['guzzle-client']);
return new YourMembershipClient($guzzleClient, $parameters[0], $parameters[1]);
});
}
public function boot()
$this->publishes([
$this->packageConfigPath => config_path('yourmembership.php'),
]);
* Get the services provided by the provider.
* @return array
public function provides()
return array(YourMembershipClient::class);
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: