for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Auth;
use Illuminate\Auth\AuthServiceProvider as ServiceProvider;
/**
* Class AuthServiceProvider
* @package App\Auth
*/
class AuthServiceProvider extends ServiceProvider
{
* @inheritdoc
protected function registerAuthenticator()
$this->app->bind('auth', function ($app) {
// Once the authentication service has actually been requested by the developer
// we will set a variable in the application indicating such. This helps us
// know that we need to set any queued cookies in the after event later.
$app['auth.loaded'] = true;
return new AuthManager($app);
$app
array<string,boolean,{"auth.loaded":"boolean"}>
object<Illuminate\Foundation\Application>
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);
});
$this->app->singleton('auth.driver', function ($app) {
return $app['auth']->guard();
}
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: