Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Laravel\Socialite\Tests\Fixtures; use Laravel\Socialite\Two\AbstractProv..
Decoded Output download
<?php
namespace Laravel\Socialite\Tests\Fixtures;
use Laravel\Socialite\Two\AbstractProvider;
use Laravel\Socialite\Two\User;
use Mockery as m;
use stdClass;
class OAuthTwoTestProviderStub extends AbstractProvider
{
/**
* @var \GuzzleHttp\Client|\Mockery\MockInterface
*/
public $http;
protected function getAuthUrl($state)
{
return $this->buildAuthUrlFromBase('http://auth.url', $state);
}
protected function getTokenUrl()
{
return 'http://token.url';
}
protected function getUserByToken($token)
{
return ['id' => 'foo'];
}
protected function mapUserToObject(array $user)
{
return (new User)->map(['id' => $user['id']]);
}
/**
* Get a fresh instance of the Guzzle HTTP client.
*
* @return \GuzzleHttp\Client|\Mockery\MockInterface
*/
protected function getHttpClient()
{
if ($this->http) {
return $this->http;
}
return $this->http = m::mock(stdClass::class);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Laravel\Socialite\Tests\Fixtures;
use Laravel\Socialite\Two\AbstractProvider;
use Laravel\Socialite\Two\User;
use Mockery as m;
use stdClass;
class OAuthTwoTestProviderStub extends AbstractProvider
{
/**
* @var \GuzzleHttp\Client|\Mockery\MockInterface
*/
public $http;
protected function getAuthUrl($state)
{
return $this->buildAuthUrlFromBase('http://auth.url', $state);
}
protected function getTokenUrl()
{
return 'http://token.url';
}
protected function getUserByToken($token)
{
return ['id' => 'foo'];
}
protected function mapUserToObject(array $user)
{
return (new User)->map(['id' => $user['id']]);
}
/**
* Get a fresh instance of the Guzzle HTTP client.
*
* @return \GuzzleHttp\Client|\Mockery\MockInterface
*/
protected function getHttpClient()
{
if ($this->http) {
return $this->http;
}
return $this->http = m::mock(stdClass::class);
}
}
Function Calls
None |
Stats
MD5 | 1e258b88bb52e625b56a75ee8ef1db51 |
Eval Count | 0 |
Decode Time | 115 ms |