for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SocialiteProviders\Manager;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Str;
class Config implements Contracts\ConfigInterface
{
/**
* @var array
*/
protected $config;
* Config constructor.
*
* @param string $key
* @param string $secret
* @param string|callable $callbackUri
* @param array $additionalProviderConfig
public function __construct($key, $secret, $callbackUri, array $additionalProviderConfig = [])
$this->config = array_merge([
'client_id' => $key,
'client_secret' => $secret,
'redirect' => $this->formatRedirectUri($callbackUri),
$callbackUri
callable
string
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);
], $additionalProviderConfig);
}
* Format the callback URI, resolving a relative URI if needed.
* @param string $callbackUri
* @return string
protected function formatRedirectUri($callbackUri)
$redirect = value($callbackUri);
return Str::startsWith($redirect, '/')
? URL::to($redirect)
: $redirect;
* @return array
public function get()
return $this->config;
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: