@@ -9,7 +9,6 @@ |
||
9 | 9 | use Nord\Lumen\OAuth2\Exceptions\InvalidArgument; |
10 | 10 | use Illuminate\Config\Repository as ConfigRepository; |
11 | 11 | use Illuminate\Support\ServiceProvider; |
12 | -use Laravel\Lumen\Application; |
|
13 | 12 | use League\OAuth2\Server\AuthorizationServer; |
14 | 13 | use League\OAuth2\Server\Grant\PasswordGrant; |
15 | 14 | use League\OAuth2\Server\ResourceServer; |
@@ -6,7 +6,6 @@ |
||
6 | 6 | // @codingStandardsIgnoreFile |
7 | 7 | |
8 | 8 | use Codeception\Module\Asserts; |
9 | -use Helper\Unit; |
|
10 | 9 | |
11 | 10 | trait UnitTesterActions |
12 | 11 | { |
@@ -20,7 +20,7 @@ |
||
20 | 20 | { |
21 | 21 | use _generated\UnitTesterActions; |
22 | 22 | |
23 | - /** |
|
24 | - * Define custom actions here |
|
25 | - */ |
|
23 | + /** |
|
24 | + * Define custom actions here |
|
25 | + */ |
|
26 | 26 | } |
@@ -29,23 +29,23 @@ |
||
29 | 29 | */ |
30 | 30 | protected function registerContainerBindings(Container $container) |
31 | 31 | { |
32 | - $container->bind(MockAccessTokenStorage::class, function () { |
|
32 | + $container->bind(MockAccessTokenStorage::class, function() { |
|
33 | 33 | return new MockAccessTokenStorage; |
34 | 34 | }); |
35 | 35 | |
36 | - $container->bind( MockClientStorage::class, function () { |
|
36 | + $container->bind(MockClientStorage::class, function() { |
|
37 | 37 | return new MockClientStorage; |
38 | 38 | }); |
39 | 39 | |
40 | - $container->bind(MockRefreshTokenStorage::class, function () { |
|
40 | + $container->bind(MockRefreshTokenStorage::class, function() { |
|
41 | 41 | return new MockRefreshTokenStorage; |
42 | 42 | }); |
43 | 43 | |
44 | - $container->bind(MockScopeStorage::class, function () { |
|
44 | + $container->bind(MockScopeStorage::class, function() { |
|
45 | 45 | return new MockScopeStorage; |
46 | 46 | }); |
47 | 47 | |
48 | - $container->bind(MockSessionStorage::class, function () { |
|
48 | + $container->bind(MockSessionStorage::class, function() { |
|
49 | 49 | return new MockSessionStorage; |
50 | 50 | }); |
51 | 51 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $entity = new AccessTokenEntity($this->server); |
18 | 18 | |
19 | 19 | $entity->setId('mF_9.B5f-4.1JqM'); |
20 | - $entity->setExpireTime(time() + 24*60*60); // NOW + 24h |
|
20 | + $entity->setExpireTime(time() + 24 * 60 * 60); // NOW + 24h |
|
21 | 21 | |
22 | 22 | return $entity; |
23 | 23 | } |
@@ -9,6 +9,6 @@ |
||
9 | 9 | */ |
10 | 10 | public function __construct($basePath = null) |
11 | 11 | { |
12 | - parent::__construct(realpath(__DIR__ . '/../')); |
|
12 | + parent::__construct(realpath(__DIR__.'/../')); |
|
13 | 13 | } |
14 | 14 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | 'grant_types' => [ |
45 | 45 | 'password' => [ |
46 | 46 | 'class' => League\OAuth2\Server\Grant\PasswordGrant::class, |
47 | - 'callback' => function ($username, $password) { |
|
47 | + 'callback' => function($username, $password) { |
|
48 | 48 | return $username.'/'.$password; |
49 | 49 | }, |
50 | 50 | 'access_token_ttl' => 3600, |
@@ -3,4 +3,4 @@ |
||
3 | 3 | |
4 | 4 | date_default_timezone_set('UTC'); |
5 | 5 | |
6 | -require __DIR__ . '/../vendor/autoload.php'; |
|
6 | +require __DIR__.'/../vendor/autoload.php'; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/../_support/Mock/MockStorageServiceProvider.php'; |
|
3 | +require_once __DIR__.'/../_support/Mock/MockStorageServiceProvider.php'; |
|
4 | 4 | |
5 | 5 | use Nord\Lumen\OAuth2\OAuth2Facade; |
6 | 6 | use Nord\Lumen\OAuth2\OAuth2Service; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function testAssertCanBeRegistered() |
38 | 38 | { |
39 | - $this->specify('verify serviceProvider is registered', function () { |
|
39 | + $this->specify('verify serviceProvider is registered', function() { |
|
40 | 40 | $service = $this->app->make(OAuth2Service::class); |
41 | 41 | verify($service)->isInstanceOf(OAuth2Service::class); |
42 | 42 | }); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function testAssertFacade() |
49 | 49 | { |
50 | - $this->specify('verify serviceProvider facade', function () { |
|
50 | + $this->specify('verify serviceProvider facade', function() { |
|
51 | 51 | verify(OAuth2Facade::getFacadeRoot())->isInstanceOf(OAuth2Service::class); |
52 | 52 | }); |
53 | 53 | } |