Completed
Push — develop ( 6fd965...1bc1b2 )
by Christoffer
02:13
created
src/OAuth2ServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     protected function registerBindings(Container $container, ConfigRepository $config)
44 44
     {
45
-        $container->bind(OAuth2Service::class, function ($container) use ($config) {
45
+        $container->bind(OAuth2Service::class, function($container) use ($config) {
46 46
             return $this->createService($container, $config[self::CONFIG_KEY]);
47 47
         });
48 48
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
tests/_support/_generated/UnitTesterActions.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 // @codingStandardsIgnoreFile
7 7
 
8 8
 use Codeception\Module\Asserts;
9
-use Helper\Unit;
10 9
 
11 10
 trait UnitTesterActions
12 11
 {
Please login to merge, or discard this patch.
tests/_support/UnitTester.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
tests/_support/Mock/Storages/MockAccessTokenStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/_support/Mock/MockApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
tests/_support/config/oauth2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
tests/_bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,4 +3,4 @@
 block discarded – undo
3 3
 
4 4
 date_default_timezone_set('UTC');
5 5
 
6
-require __DIR__ . '/../vendor/autoload.php';
6
+require __DIR__.'/../vendor/autoload.php';
Please login to merge, or discard this patch.
tests/unit/OAuth2ServiceTest.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
         $this->specify('verify service issueAccessToken', function () {
38 38
             $authorizationServer = $this->createAuthorizationServer();
39 39
             $authorizationServer->expects($this->once())
40
-               ->method('issueAccessToken')
41
-               ->will($this->returnValue(self::$token));
40
+                ->method('issueAccessToken')
41
+                ->will($this->returnValue(self::$token));
42 42
 
43 43
             $service = new OAuth2Service($authorizationServer, $this->createResourceServer());
44 44
             verify($service->issueAccessToken())->equals(self::$token);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function testAssertIssueAccessToken()
36 36
     {
37
-        $this->specify('verify service issueAccessToken', function () {
37
+        $this->specify('verify service issueAccessToken', function() {
38 38
             $authorizationServer = $this->createAuthorizationServer();
39 39
             $authorizationServer->expects($this->once())
40 40
                ->method('issueAccessToken')
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function testAssertValidateAccessToken()
52 52
     {
53
-        $this->specify('verify service validateAccessToken', function () {
53
+        $this->specify('verify service validateAccessToken', function() {
54 54
             $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer());
55 55
             verify($service->validateAccessToken(true, self::$token['access_token']))->true();
56 56
         });
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function testAssertGetResourceOwnerId()
63 63
     {
64
-        $this->specify('verify service can getResourceOwnerId', function () {
64
+        $this->specify('verify service can getResourceOwnerId', function() {
65 65
             $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer());
66 66
             $service->validateAccessToken(true, self::$token['access_token']);
67 67
             verify($service->getResourceOwnerId())->equals('test');
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function testAssertGetResourceOwnerType()
75 75
     {
76
-        $this->specify('verify service can getResourceOwnerType', function () {
76
+        $this->specify('verify service can getResourceOwnerType', function() {
77 77
             $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer());
78 78
             $service->validateAccessToken(true, self::$token['access_token']);
79 79
             verify($service->getResourceOwnerType())->equals('test');
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function testAssertGetClientId()
87 87
     {
88
-        $this->specify('verify service can getClientId', function () {
88
+        $this->specify('verify service can getClientId', function() {
89 89
             $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer());
90 90
             $service->validateAccessToken(true, self::$token['access_token']);
91 91
             verify($service->getClientId())->equals('test');
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
     }
96 96
 
97 97
     /**
98
-     * @return \League\OAuth2\Server\AuthorizationServer|\PHPUnit_Framework_MockObject_MockObject
98
+     * @return \League\OAuth2\Server\AuthorizationServer
99 99
      */
100 100
     private function createAuthorizationServer()
101 101
     {
Please login to merge, or discard this patch.
tests/_support/Mock/MockStorageServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.