diff --git a/master/AbstractServer.php.html b/master/AbstractServer.php.html index 0c1296a6..e8bd1116 100644 --- a/master/AbstractServer.php.html +++ b/master/AbstractServer.php.html @@ -66,7 +66,7 @@
100.00%
-
45 / 45
+
47 / 47
@@ -95,7 +95,7 @@
100.00%
-
45 / 45
+
47 / 47
@@ -137,7 +137,7 @@
100.00%
-
4 / 4
+
5 / 5
@@ -221,7 +221,7 @@
100.00%
-
3 / 3
+
4 / 4
@@ -667,8 +667,8 @@
100
     */
101
    public function __construct()
102
    { -
103
        $this->setEventEmitter(); -
104
    } +
103
        $this->setEventEmitter(); +
104
    }
105
106
    /**
107
     * Set an event emitter @@ -677,12 +677,12 @@
110
     */
111
    public function setEventEmitter($emitter = null)
112
    { -
113
        if ($emitter === null) { -
114
            $this->eventEmitter = new Emitter(); -
115
        } else { -
116
            $this->eventEmitter = $emitter; +
113
        if ($emitter === null) { +
114
            $this->eventEmitter = new Emitter(); +
115
        } else { +
116
            $this->eventEmitter = $emitter;
117
        } -
118
    } +
118
    }
119
120
    /**
121
     * Add an event listener to the event emitter @@ -693,8 +693,8 @@
126
     */
127
    public function addEventListener($eventName, callable $listener, $priority = Emitter::P_NORMAL)
128
    { -
129
        $this->eventEmitter->addListener($eventName, $listener, $priority); -
130
    } +
129
        $this->eventEmitter->addListener($eventName, $listener, $priority); +
130
    }
131
132
    /**
133
     * Returns the event emitter @@ -703,7 +703,7 @@
136
     */
137
    public function getEventEmitter()
138
    { -
139
        return $this->eventEmitter; +
139
        return $this->eventEmitter;
140
    }
141
142
    /** @@ -715,9 +715,9 @@
148
     */
149
    public function setRequest($request)
150
    { -
151
        $this->request = $request; +
151
        $this->request = $request;
152
-
153
        return $this; +
153
        return $this;
154
    }
155
156
    /** @@ -727,11 +727,11 @@
160
     */
161
    public function getRequest()
162
    { -
163
        if ($this->request === null) { -
164
            $this->request = Request::createFromGlobals(); -
165
        } +
163
        if ($this->request === null) { +
164
            $this->request = Request::createFromGlobals(); +
165
        }
166
-
167
        return $this->request; +
167
        return $this->request;
168
    }
169
170
    /** @@ -743,10 +743,10 @@
176
     */
177
    public function setClientStorage(ClientInterface $storage)
178
    { -
179
        $storage->setServer($this); -
180
        $this->clientStorage = $storage; +
179
        $storage->setServer($this); +
180
        $this->clientStorage = $storage;
181
-
182
        return $this; +
182
        return $this;
183
    }
184
185
    /** @@ -758,10 +758,10 @@
191
     */
192
    public function setSessionStorage(SessionInterface $storage)
193
    { -
194
        $storage->setServer($this); -
195
        $this->sessionStorage = $storage; +
194
        $storage->setServer($this); +
195
        $this->sessionStorage = $storage;
196
-
197
        return $this; +
197
        return $this;
198
    }
199
200
    /** @@ -773,10 +773,10 @@
206
     */
207
    public function setAccessTokenStorage(AccessTokenInterface $storage)
208
    { -
209
        $storage->setServer($this); -
210
        $this->accessTokenStorage = $storage; +
209
        $storage->setServer($this); +
210
        $this->accessTokenStorage = $storage;
211
-
212
        return $this; +
212
        return $this;
213
    }
214
215
    /** @@ -788,10 +788,10 @@
221
     */
222
    public function setRefreshTokenStorage(RefreshTokenInterface $storage)
223
    { -
224
        $storage->setServer($this); -
225
        $this->refreshTokenStorage = $storage; +
224
        $storage->setServer($this); +
225
        $this->refreshTokenStorage = $storage;
226
-
227
        return $this; +
227
        return $this;
228
    }
229
230
    /** @@ -803,10 +803,10 @@
236
     */
237
    public function setAuthCodeStorage(AuthCodeInterface $storage)
238
    { -
239
        $storage->setServer($this); -
240
        $this->authCodeStorage = $storage; +
239
        $storage->setServer($this); +
240
        $this->authCodeStorage = $storage;
241
-
242
        return $this; +
242
        return $this;
243
    }
244
245
    /** @@ -818,10 +818,10 @@
251
     */
252
    public function setScopeStorage(ScopeInterface $storage)
253
    { -
254
        $storage->setServer($this); -
255
        $this->scopeStorage = $storage; +
254
        $storage->setServer($this); +
255
        $this->scopeStorage = $storage;
256
-
257
        return $this; +
257
        return $this;
258
    }
259
260
    /** @@ -831,7 +831,7 @@
264
     */
265
    public function getClientStorage()
266
    { -
267
        return $this->clientStorage; +
267
        return $this->clientStorage;
268
    }
269
270
    /** @@ -841,7 +841,7 @@
274
     */
275
    public function getScopeStorage()
276
    { -
277
        return $this->scopeStorage; +
277
        return $this->scopeStorage;
278
    }
279
280
    /** @@ -851,7 +851,7 @@
284
     */
285
    public function getSessionStorage()
286
    { -
287
        return $this->sessionStorage; +
287
        return $this->sessionStorage;
288
    }
289
290
    /** @@ -861,7 +861,7 @@
294
     */
295
    public function getRefreshTokenStorage()
296
    { -
297
        return $this->refreshTokenStorage; +
297
        return $this->refreshTokenStorage;
298
    }
299
300
    /** @@ -871,7 +871,7 @@
304
     */
305
    public function getAccessTokenStorage()
306
    { -
307
        return $this->accessTokenStorage; +
307
        return $this->accessTokenStorage;
308
    }
309
310
    /** @@ -881,7 +881,7 @@
314
     */
315
    public function getAuthCodeStorage()
316
    { -
317
        return $this->authCodeStorage; +
317
        return $this->authCodeStorage;
318
    }
319
320
    /** @@ -893,9 +893,9 @@
326
     */
327
    public function setTokenType(TokenTypeInterface $tokenType)
328
    { -
329
        $tokenType->setServer($this); -
330
        $this->tokenType = $tokenType; -
331
    } +
329
        $tokenType->setServer($this); +
330
        $this->tokenType = $tokenType; +
331
    }
332
333
    /**
334
     * Get the access token type @@ -904,7 +904,7 @@
337
     */
338
    public function getTokenType()
339
    { -
340
        return $this->tokenType; +
340
        return $this->tokenType;
341
    }
342
343
    /** @@ -912,7 +912,7 @@
345
     */
346
    public function getMacStorage()
347
    { -
348
        return $this->macStorage; +
348
        return $this->macStorage;
349
    }
350
351
    /** @@ -920,8 +920,8 @@
353
     */
354
    public function setMacStorage(MacTokenInterface $macStorage)
355
    { -
356
        $this->macStorage = $macStorage; -
357
    } +
356
        $this->macStorage = $macStorage; +
357
    }
358
} @@ -935,7 +935,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/AuthorizationServer.php.html b/master/AuthorizationServer.php.html index f3961a6a..a75528ff 100644 --- a/master/AuthorizationServer.php.html +++ b/master/AuthorizationServer.php.html @@ -66,7 +66,7 @@
100.00%
-
36 / 36
+
39 / 39
@@ -95,7 +95,7 @@
100.00%
-
36 / 36
+
39 / 39
@@ -137,7 +137,7 @@
100.00%
-
7 / 7
+
9 / 9
@@ -179,7 +179,7 @@
100.00%
-
1 / 1
+
2 / 2
@@ -518,11 +518,11 @@
77
    public function __construct()
78
    {
79
        // Set Bearer as the default token type -
80
        $this->setTokenType(new Bearer()); +
80
        $this->setTokenType(new Bearer());
81
-
82
        parent::__construct(); +
82
        parent::__construct();
83
-
84
        return $this; +
84
        return $this;
85
    }
86
87
    /** @@ -535,20 +535,20 @@
94
     */
95
    public function addGrantType(GrantTypeInterface $grantType, $identifier = null)
96
    { -
97
        if (is_null($identifier)) { -
98
            $identifier = $grantType->getIdentifier(); -
99
        } +
97
        if (is_null($identifier)) { +
98
            $identifier = $grantType->getIdentifier(); +
99
        }
100
101
        // Inject server into grant -
102
        $grantType->setAuthorizationServer($this); +
102
        $grantType->setAuthorizationServer($this);
103
-
104
        $this->grantTypes[$identifier] = $grantType; +
104
        $this->grantTypes[$identifier] = $grantType;
105
-
106
        if (!is_null($grantType->getResponseType())) { -
107
            $this->responseTypes[] = $grantType->getResponseType(); -
108
        } +
106
        if (!is_null($grantType->getResponseType())) { +
107
            $this->responseTypes[] = $grantType->getResponseType(); +
108
        }
109
-
110
        return $this; +
110
        return $this;
111
    }
112
113
    /** @@ -560,7 +560,7 @@
119
     */
120
    public function hasGrantType($identifier)
121
    { -
122
        return (array_key_exists($identifier, $this->grantTypes)); +
122
        return (array_key_exists($identifier, $this->grantTypes));
123
    }
124
125
    /** @@ -569,8 +569,8 @@
128
     * @return array
129
     */
130
    public function getResponseTypes() -
131
    { -
132
        return $this->responseTypes; +
131
    { +
132
        return $this->responseTypes;
133
    }
134
135
    /** @@ -582,9 +582,9 @@
141
     */
142
    public function requireScopeParam($require = true)
143
    { -
144
        $this->requireScopeParam = $require; +
144
        $this->requireScopeParam = $require;
145
-
146
        return $this; +
146
        return $this;
147
    }
148
149
    /** @@ -594,7 +594,7 @@
153
     */
154
    public function scopeParamRequired()
155
    { -
156
        return $this->requireScopeParam; +
156
        return $this->requireScopeParam;
157
    }
158
159
    /** @@ -606,9 +606,9 @@
165
     */
166
    public function setDefaultScope($default = null)
167
    { -
168
        $this->defaultScope = $default; +
168
        $this->defaultScope = $default;
169
-
170
        return $this; +
170
        return $this;
171
    }
172
173
    /** @@ -618,7 +618,7 @@
177
     */
178
    public function getDefaultScope()
179
    { -
180
        return $this->defaultScope; +
180
        return $this->defaultScope;
181
    }
182
183
    /** @@ -628,7 +628,7 @@
187
     */
188
    public function stateParamRequired()
189
    { -
190
        return $this->requireStateParam; +
190
        return $this->requireStateParam;
191
    }
192
193
    /** @@ -640,19 +640,19 @@
199
     */
200
    public function requireStateParam($require = true)
201
    { -
202
        $this->requireStateParam = $require; +
202
        $this->requireStateParam = $require;
203
-
204
        return $this; +
204
        return $this;
205
    }
206
207
    /**
208
     * Get the scope delimiter
209
     * -
210
     * @return string The scope delimiter (default: ",") +
210
     * @return string The scope delimiter (default: " ")
211
     */
212
    public function getScopeDelimiter()
213
    { -
214
        return $this->scopeDelimiter; +
214
        return $this->scopeDelimiter;
215
    }
216
217
    /** @@ -664,9 +664,9 @@
223
     */
224
    public function setScopeDelimiter($scopeDelimiter = ' ')
225
    { -
226
        $this->scopeDelimiter = $scopeDelimiter; +
226
        $this->scopeDelimiter = $scopeDelimiter;
227
-
228
        return $this; +
228
        return $this;
229
    }
230
231
    /** @@ -676,7 +676,7 @@
235
     */
236
    public function getAccessTokenTTL()
237
    { -
238
        return $this->accessTokenTTL; +
238
        return $this->accessTokenTTL;
239
    }
240
241
    /** @@ -688,9 +688,9 @@
247
     */
248
    public function setAccessTokenTTL($accessTokenTTL = 3600)
249
    { -
250
        $this->accessTokenTTL = $accessTokenTTL; +
250
        $this->accessTokenTTL = $accessTokenTTL;
251
-
252
        return $this; +
252
        return $this;
253
    }
254
255
    /** @@ -702,19 +702,19 @@
261
     */
262
    public function issueAccessToken()
263
    { -
264
        $grantType = $this->getRequest()->request->get('grant_type'); -
265
        if (is_null($grantType)) { -
266
            throw new Exception\InvalidRequestException('grant_type'); -
267
        } +
264
        $grantType = $this->getRequest()->request->get('grant_type'); +
265
        if (is_null($grantType)) { +
266
            throw new Exception\InvalidRequestException('grant_type'); +
267
        }
268
269
        // Ensure grant type is one that is recognised and is enabled -
270
        if (!in_array($grantType, array_keys($this->grantTypes))) { -
271
            throw new Exception\UnsupportedGrantTypeException($grantType); -
272
        } +
270
        if (!in_array($grantType, array_keys($this->grantTypes))) { +
271
            throw new Exception\UnsupportedGrantTypeException($grantType); +
272
        }
273
274
        // Complete the flow -
275
        return $this->getGrantType($grantType)->completeFlow(); -
276
    } +
275
        return $this->getGrantType($grantType)->completeFlow(); +
276
    }
277
278
    /**
279
     * Return a grant type class @@ -727,11 +727,11 @@
286
     */
287
    public function getGrantType($grantType)
288
    { -
289
        if (isset($this->grantTypes[$grantType])) { -
290
            return $this->grantTypes[$grantType]; -
291
        } +
289
        if (isset($this->grantTypes[$grantType])) { +
290
            return $this->grantTypes[$grantType]; +
291
        }
292
-
293
        throw new Exception\InvalidGrantException($grantType); +
293
        throw new Exception\InvalidGrantException($grantType);
294
    }
295
} @@ -746,7 +746,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/AbstractTokenEntity.php.html b/master/Entity/AbstractTokenEntity.php.html index 7fe1a6e2..7a822d3c 100644 --- a/master/Entity/AbstractTokenEntity.php.html +++ b/master/Entity/AbstractTokenEntity.php.html @@ -61,13 +61,13 @@
9 / 10
CRAP
-
- 95.83% covered (success) +
+ 96.30% covered (success)
-
95.83%
-
23 / 24
+
96.30%
+
26 / 27
@@ -90,13 +90,13 @@
11 / 12
18
-
- 95.83% covered (success) +
+ 96.30% covered (success)
-
95.83%
-
23 / 24
+
96.30%
+
26 / 27
@@ -264,7 +264,7 @@
100.00%
-
3 / 3
+
4 / 4
@@ -277,15 +277,15 @@
0.00%
0 / 1
- 4.05 + 4.02
-
- 85.71% covered (warning) +
+ 88.89% covered (warning)
-
85.71%
-
6 / 7
+
88.89%
+
8 / 9
@@ -421,9 +421,9 @@
63
     */
64
    public function __construct(AbstractServer $server)
65
    { -
66
        $this->server = $server; +
66
        $this->server = $server;
67
-
68
        return $this; +
68
        return $this;
69
    }
70
71
    /** @@ -435,9 +435,9 @@
77
     */
78
    public function setSession(SessionEntity $session)
79
    { -
80
        $this->session = $session; +
80
        $this->session = $session;
81
-
82
        return $this; +
82
        return $this;
83
    }
84
85
    /** @@ -449,9 +449,9 @@
91
     */
92
    public function setExpireTime($expireTime)
93
    { -
94
        $this->expireTime = $expireTime; +
94
        $this->expireTime = $expireTime;
95
-
96
        return $this; +
96
        return $this;
97
    }
98
99
    /** @@ -461,7 +461,7 @@
103
     */
104
    public function getExpireTime()
105
    { -
106
        return $this->expireTime; +
106
        return $this->expireTime;
107
    }
108
109
    /** @@ -471,7 +471,7 @@
113
     */
114
    public function isExpired()
115
    { -
116
        return ((time() - $this->expireTime) > 0); +
116
        return ((time() - $this->expireTime) > 0);
117
    }
118
119
    /** @@ -483,9 +483,9 @@
125
     */
126
    public function setId($id = null)
127
    { -
128
        $this->id = ($id !== null) ? $id : SecureKey::generate(); +
128
        $this->id = ($id !== null) ? $id : SecureKey::generate();
129
-
130
        return $this; +
130
        return $this;
131
    }
132
133
    /** @@ -495,7 +495,7 @@
137
     */
138
    public function getId()
139
    { -
140
        return $this->id; +
140
        return $this->id;
141
    }
142
143
    /** @@ -507,11 +507,11 @@
149
     */
150
    public function associateScope(ScopeEntity $scope)
151
    { -
152
        if (!isset($this->scopes[$scope->getId()])) { -
153
            $this->scopes[$scope->getId()] = $scope; -
154
        } +
152
        if (!isset($this->scopes[$scope->getId()])) { +
153
            $this->scopes[$scope->getId()] = $scope; +
154
        }
155
-
156
        return $this; +
156
        return $this;
157
    }
158
159
    /** @@ -523,18 +523,18 @@
165
     */
166
    protected function formatScopes($unformatted = [])
167
    { -
168
        if (is_null($unformatted)) { +
168
        if (is_null($unformatted)) {
169
            return []; -
170
        } +
170
        }
171
-
172
        $scopes = []; -
173
        foreach ($unformatted as $scope) { -
174
            if ($scope instanceof ScopeEntity) { -
175
                $scopes[$scope->getId()] = $scope; -
176
            } -
177
        } +
172
        $scopes = []; +
173
        foreach ($unformatted as $scope) { +
174
            if ($scope instanceof ScopeEntity) { +
175
                $scopes[$scope->getId()] = $scope; +
176
            } +
177
        }
178
-
179
        return $scopes; +
179
        return $scopes;
180
    }
181
182
    /** @@ -544,11 +544,11 @@
186
     */
187
    public function __toString()
188
    { -
189
        if ($this->id === null) { -
190
            return ''; -
191
        } +
189
        if ($this->id === null) { +
190
            return ''; +
191
        }
192
-
193
        return $this->id; +
193
        return $this->id;
194
    }
195
196
    /** @@ -577,7 +577,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/AccessTokenEntity.php.html b/master/Entity/AccessTokenEntity.php.html index 995ec14c..1267f2ba 100644 --- a/master/Entity/AccessTokenEntity.php.html +++ b/master/Entity/AccessTokenEntity.php.html @@ -42,61 +42,61 @@ - Total -
-
- 100.00% covered (success) + Total +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 80.00% covered (warning)
-
100.00%
-
4 / 4
- CRAP -
-
- 100.00% covered (success) +
80.00%
+
4 / 5
+ CRAP +
+
+ 84.00% covered (warning)
-
100.00%
-
17 / 17
+
84.00%
+
21 / 25
- AccessTokenEntity -
-
- 100.00% covered (success) + AccessTokenEntity +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 80.00% covered (warning)
-
100.00%
-
5 / 5
- 9 -
-
- 100.00% covered (success) +
80.00%
+
4 / 5
+ 9.33 +
+
+ 84.00% covered (warning)
-
100.00%
-
17 / 17
+
84.00%
+
21 / 25
@@ -121,24 +121,24 @@ -  hasScope -
-
- 100.00% covered (success) +  hasScope +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
- 2 -
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+ 6 +
+
+ 0.00% covered (danger)
-
100.00%
-
0 / 0
+
0.00%
+
0 / 4
@@ -159,7 +159,7 @@
100.00%
-
4 / 4
+
6 / 6
@@ -180,7 +180,7 @@
100.00%
-
7 / 7
+
9 / 9
@@ -234,13 +234,13 @@      */     public function getSession()     { -         if ($this->session instanceof SessionEntity) { -             return $this->session; -         } +         if ($this->session instanceof SessionEntity) { +             return $this->session; +         } -         $this->session = $this->server->getSessionStorage()->getByAccessToken($this); +         $this->session = $this->server->getSessionStorage()->getByAccessToken($this); -         return $this->session; +         return $this->session;     }     /** @@ -252,12 +252,12 @@      */     public function hasScope($scope)     { -         if ($this->scopes === null) { -             $this->getScopes(); -         } +         if ($this->scopes === null) { +             $this->getScopes(); +         } -         return isset($this->scopes[$scope]); -     } +         return isset($this->scopes[$scope]); +     }     /**      * Return all scopes associated with the access token @@ -266,13 +266,13 @@      */     public function getScopes()     { -         if ($this->scopes === null) { -             $this->scopes = $this->formatScopes( -                 $this->server->getAccessTokenStorage()->getScopes($this) -             ); -         } +         if ($this->scopes === null) { +             $this->scopes = $this->formatScopes( +                 $this->server->getAccessTokenStorage()->getScopes($this) +             ); +         } -         return $this->scopes; +         return $this->scopes;     }     /** @@ -280,18 +280,18 @@      */     public function save()     { -         $this->server->getAccessTokenStorage()->create( -             $this->getId(), -             $this->getExpireTime(), -             $this->getSession()->getId() -         ); +         $this->server->getAccessTokenStorage()->create( +             $this->getId(), +             $this->getExpireTime(), +             $this->getSession()->getId() +         );         // Associate the scope with the token -         foreach ($this->getScopes() as $scope) { -             $this->server->getAccessTokenStorage()->associateScope($this, $scope); -         } +         foreach ($this->getScopes() as $scope) { +             $this->server->getAccessTokenStorage()->associateScope($this, $scope); +         } -         return $this; +         return $this;     }     /** @@ -299,8 +299,8 @@      */     public function expire()     { -         $this->server->getAccessTokenStorage()->delete($this); -     } +         $this->server->getAccessTokenStorage()->delete($this); +     } } @@ -314,7 +314,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/AuthCodeEntity.php.html b/master/Entity/AuthCodeEntity.php.html index 6a12e7e7..37a4196a 100644 --- a/master/Entity/AuthCodeEntity.php.html +++ b/master/Entity/AuthCodeEntity.php.html @@ -67,7 +67,7 @@
100.00%
-
26 / 26
+
31 / 31
@@ -96,7 +96,7 @@
100.00%
-
26 / 26
+
31 / 31
@@ -159,7 +159,7 @@
100.00%
-
5 / 5
+
6 / 6
@@ -201,7 +201,7 @@
100.00%
-
4 / 4
+
6 / 6
@@ -222,7 +222,7 @@
100.00%
-
8 / 8
+
10 / 10
@@ -285,10 +285,10 @@      */     public function setRedirectUri($redirectUri)     { -         $this->redirectUri = $redirectUri; +         $this->redirectUri = $redirectUri; -         return $this; -     } +         return $this; +     }     /**      * Get the redirect URI @@ -297,8 +297,8 @@      */     public function getRedirectUri()     { -         return $this->redirectUri; -     } +         return $this->redirectUri; +     }     /**      * Generate a redirect URI @@ -310,14 +310,14 @@      */     public function generateRedirectUri($state = null, $queryDelimeter = '?')     { -         $uri = $this->getRedirectUri(); -         $uri .= (strstr($this->getRedirectUri(), $queryDelimeter) === false) ? $queryDelimeter : '&'; +         $uri = $this->getRedirectUri(); +         $uri .= (strstr($this->getRedirectUri(), $queryDelimeter) === false) ? $queryDelimeter : '&'; -         return $uri.http_build_query([ -             'code'  =>  $this->getId(), -             'state' =>  $state, -         ]); -     } +         return $uri.http_build_query([ +             'code'  =>  $this->getId(), +             'state' =>  $state, +         ]); +     }     /**      * Get session @@ -326,14 +326,14 @@      */     public function getSession()     { -         if ($this->session instanceof SessionEntity) { -             return $this->session; -         } +         if ($this->session instanceof SessionEntity) { +             return $this->session; +         } -         $this->session = $this->server->getSessionStorage()->getByAuthCode($this); +         $this->session = $this->server->getSessionStorage()->getByAuthCode($this); -         return $this->session; -     } +         return $this->session; +     }     /**      * Return all scopes associated with the session @@ -342,42 +342,42 @@      */     public function getScopes()     { -         if ($this->scopes === null) { -             $this->scopes = $this->formatScopes( -                 $this->server->getAuthCodeStorage()->getScopes($this) -             ); -         } +         if ($this->scopes === null) { +             $this->scopes = $this->formatScopes( +                 $this->server->getAuthCodeStorage()->getScopes($this) +             ); +         } -         return $this->scopes; -     } +         return $this->scopes; +     }     /**      * {@inheritdoc}      */     public function save()     { -         $this->server->getAuthCodeStorage()->create( -             $this->getId(), -             $this->getExpireTime(), -             $this->getSession()->getId(), -             $this->getRedirectUri() -         ); +         $this->server->getAuthCodeStorage()->create( +             $this->getId(), +             $this->getExpireTime(), +             $this->getSession()->getId(), +             $this->getRedirectUri() +         );         // Associate the scope with the token -         foreach ($this->getScopes() as $scope) { -             $this->server->getAuthCodeStorage()->associateScope($this, $scope); -         } +         foreach ($this->getScopes() as $scope) { +             $this->server->getAuthCodeStorage()->associateScope($this, $scope); +         } -         return $this; -     } +         return $this; +     }     /**      * {@inheritdoc}      */     public function expire()     { -         $this->server->getAuthCodeStorage()->delete($this); -     } +         $this->server->getAuthCodeStorage()->delete($this); +     } } @@ -391,7 +391,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/ClientEntity.php.html b/master/Entity/ClientEntity.php.html index 712831e7..ffb768a8 100644 --- a/master/Entity/ClientEntity.php.html +++ b/master/Entity/ClientEntity.php.html @@ -275,9 +275,9 @@      */     public function __construct(AbstractServer $server)     { -         $this->server = $server; +         $this->server = $server; -         return $this; +         return $this;     }     /** @@ -287,7 +287,7 @@      */     public function getId()     { -         return $this->id; +         return $this->id;     }     /** @@ -297,7 +297,7 @@      */     public function getSecret()     { -         return $this->secret; +         return $this->secret;     }     /** @@ -307,7 +307,7 @@      */     public function getName()     { -         return $this->name; +         return $this->name;     }     /** @@ -317,7 +317,7 @@      */     public function getRedirectUri()     { -         return $this->redirectUri; +         return $this->redirectUri;     } } @@ -332,7 +332,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/EntityTrait.php.html b/master/Entity/EntityTrait.php.html index f8ebb08e..8b5be9e8 100644 --- a/master/Entity/EntityTrait.php.html +++ b/master/Entity/EntityTrait.php.html @@ -67,7 +67,7 @@
100.00%
-
4 / 4
+
6 / 6
@@ -96,7 +96,7 @@
100.00%
-
4 / 4
+
6 / 6
@@ -117,7 +117,7 @@
100.00%
-
4 / 4
+
6 / 6
@@ -149,13 +149,13 @@      */     public function hydrate(array $properties)     { -         foreach ($properties as $prop => $val) { -             if (property_exists($this, $prop)) { -                 $this->{$prop} = $val; -             } -         } +         foreach ($properties as $prop => $val) { +             if (property_exists($this, $prop)) { +                 $this->{$prop} = $val; +             } +         } -         return $this; +         return $this;     } } @@ -170,7 +170,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/RefreshTokenEntity.php.html b/master/Entity/RefreshTokenEntity.php.html index 16b7f1b6..d60ddfa5 100644 --- a/master/Entity/RefreshTokenEntity.php.html +++ b/master/Entity/RefreshTokenEntity.php.html @@ -67,7 +67,7 @@
100.00%
-
14 / 14
+
16 / 16
@@ -96,7 +96,7 @@
100.00%
-
14 / 14
+
16 / 16
@@ -159,7 +159,7 @@
100.00%
-
3 / 3
+
4 / 4
@@ -180,7 +180,7 @@
100.00%
-
5 / 5
+
6 / 6
@@ -250,10 +250,10 @@
39
     */
40
    public function setAccessTokenId($accessTokenId)
41
    { -
42
        $this->accessTokenId = $accessTokenId; +
42
        $this->accessTokenId = $accessTokenId;
43
-
44
        return $this; -
45
    } +
44
        return $this; +
45
    }
46
47
    /**
48
     * Associate an access token @@ -264,10 +264,10 @@
53
     */
54
    public function setAccessToken(AccessTokenEntity $accessTokenEntity)
55
    { -
56
        $this->accessTokenEntity = $accessTokenEntity; +
56
        $this->accessTokenEntity = $accessTokenEntity;
57
-
58
        return $this; -
59
    } +
58
        return $this; +
59
    }
60
61
    /**
62
     * Return access token @@ -276,32 +276,32 @@
65
     */
66
    public function getAccessToken()
67
    { -
68
        if (! $this->accessTokenEntity instanceof AccessTokenEntity) { -
69
            $this->accessTokenEntity = $this->server->getAccessTokenStorage()->get($this->accessTokenId); -
70
        } +
68
        if (! $this->accessTokenEntity instanceof AccessTokenEntity) { +
69
            $this->accessTokenEntity = $this->server->getAccessTokenStorage()->get($this->accessTokenId); +
70
        }
71
-
72
        return $this->accessTokenEntity; -
73
    } +
72
        return $this->accessTokenEntity; +
73
    }
74
75
    /**
76
     * {@inheritdoc}
77
     */
78
    public function save()
79
    { -
80
        $this->server->getRefreshTokenStorage()->create( -
81
            $this->getId(), -
82
            $this->getExpireTime(), -
83
            $this->getAccessToken()->getId() -
84
        ); -
85
    } +
80
        $this->server->getRefreshTokenStorage()->create( +
81
            $this->getId(), +
82
            $this->getExpireTime(), +
83
            $this->getAccessToken()->getId() +
84
        ); +
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function expire()
91
    { -
92
        $this->server->getRefreshTokenStorage()->delete($this); -
93
    } +
92
        $this->server->getRefreshTokenStorage()->delete($this); +
93
    }
94
} @@ -315,7 +315,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/ScopeEntity.php.html b/master/Entity/ScopeEntity.php.html index 0046041a..a8249d1a 100644 --- a/master/Entity/ScopeEntity.php.html +++ b/master/Entity/ScopeEntity.php.html @@ -67,7 +67,7 @@
100.00%
-
6 / 6
+
7 / 7
@@ -96,7 +96,7 @@
100.00%
-
6 / 6
+
7 / 7
@@ -180,7 +180,7 @@
100.00%
-
2 / 2
+
3 / 3
@@ -240,9 +240,9 @@
50
     */
51
    public function __construct(AbstractServer $server)
52
    { -
53
        $this->server = $server; +
53
        $this->server = $server;
54
-
55
        return $this; +
55
        return $this;
56
    }
57
58
    /** @@ -252,7 +252,7 @@
62
     */
63
    public function getId()
64
    { -
65
        return $this->id; +
65
        return $this->id;
66
    }
67
68
    /** @@ -262,7 +262,7 @@
72
     */
73
    public function getDescription()
74
    { -
75
        return $this->description; +
75
        return $this->description;
76
    }
77
78
    /** @@ -273,9 +273,9 @@
83
    public function jsonSerialize()
84
    {
85
        return [ -
86
            'id'    =>  $this->getId(), -
87
            'description'   =>  $this->getDescription() -
88
        ]; +
86
            'id'    =>  $this->getId(), +
87
            'description'   =>  $this->getDescription() +
88
        ];
89
    }
90
} @@ -290,7 +290,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/SessionEntity.php.html b/master/Entity/SessionEntity.php.html index 29a701aa..ddffcb35 100644 --- a/master/Entity/SessionEntity.php.html +++ b/master/Entity/SessionEntity.php.html @@ -67,7 +67,7 @@
100.00%
-
45 / 45
+
53 / 53
@@ -96,7 +96,7 @@
100.00%
-
45 / 45
+
53 / 53
@@ -180,7 +180,7 @@
100.00%
-
3 / 3
+
4 / 4
@@ -201,7 +201,7 @@
100.00%
-
3 / 3
+
4 / 4
@@ -222,7 +222,7 @@
100.00%
-
3 / 3
+
4 / 4
@@ -243,7 +243,7 @@
100.00%
-
6 / 6
+
9 / 9
@@ -411,7 +411,7 @@
100.00%
-
9 / 9
+
11 / 11
@@ -512,9 +512,9 @@
91
     */
92
    public function __construct(AbstractServer $server)
93
    { -
94
        $this->server = $server; +
94
        $this->server = $server;
95
-
96
        return $this; +
96
        return $this;
97
    }
98
99
    /** @@ -526,9 +526,9 @@
105
     */
106
    public function setId($id)
107
    { -
108
        $this->id = $id; +
108
        $this->id = $id;
109
-
110
        return $this; +
110
        return $this;
111
    }
112
113
    /** @@ -538,7 +538,7 @@
117
     */
118
    public function getId()
119
    { -
120
        return $this->id; +
120
        return $this->id;
121
    }
122
123
    /** @@ -550,11 +550,11 @@
129
     */
130
    public function associateScope(ScopeEntity $scope)
131
    { -
132
        if (!isset($this->scopes[$scope->getId()])) { -
133
            $this->scopes[$scope->getId()] = $scope; -
134
        } +
132
        if (!isset($this->scopes[$scope->getId()])) { +
133
            $this->scopes[$scope->getId()] = $scope; +
134
        }
135
-
136
        return $this; +
136
        return $this;
137
    }
138
139
    /** @@ -566,11 +566,11 @@
145
     */
146
    public function hasScope($scope)
147
    { -
148
        if ($this->scopes === null) { -
149
            $this->getScopes(); -
150
        } +
148
        if ($this->scopes === null) { +
149
            $this->getScopes(); +
150
        }
151
-
152
        return isset($this->scopes[$scope]); +
152
        return isset($this->scopes[$scope]);
153
    }
154
155
    /** @@ -580,11 +580,11 @@
159
     */
160
    public function getScopes()
161
    { -
162
        if ($this->scopes === null) { -
163
            $this->scopes = $this->formatScopes($this->server->getSessionStorage()->getScopes($this)); -
164
        } +
162
        if ($this->scopes === null) { +
163
            $this->scopes = $this->formatScopes($this->server->getSessionStorage()->getScopes($this)); +
164
        }
165
-
166
        return $this->scopes; +
166
        return $this->scopes;
167
    }
168
169
    /** @@ -596,16 +596,16 @@
175
     */
176
    private function formatScopes($unformatted = [])
177
    { -
178
        $scopes = []; -
179
        if (is_array($unformatted)) { -
180
            foreach ($unformatted as $scope) { -
181
                if ($scope instanceof ScopeEntity) { -
182
                    $scopes[$scope->getId()] = $scope; -
183
                } -
184
            } -
185
        } +
178
        $scopes = []; +
179
        if (is_array($unformatted)) { +
180
            foreach ($unformatted as $scope) { +
181
                if ($scope instanceof ScopeEntity) { +
182
                    $scopes[$scope->getId()] = $scope; +
183
                } +
184
            } +
185
        }
186
-
187
        return $scopes; +
187
        return $scopes;
188
    }
189
190
    /** @@ -617,9 +617,9 @@
196
     */
197
    public function associateAccessToken(AccessTokenEntity $accessToken)
198
    { -
199
        $this->accessToken = $accessToken; +
199
        $this->accessToken = $accessToken;
200
-
201
        return $this; +
201
        return $this;
202
    }
203
204
    /** @@ -631,9 +631,9 @@
210
     */
211
    public function associateRefreshToken(RefreshTokenEntity $refreshToken)
212
    { -
213
        $this->refreshToken = $refreshToken; +
213
        $this->refreshToken = $refreshToken;
214
-
215
        return $this; +
215
        return $this;
216
    }
217
218
    /** @@ -645,9 +645,9 @@
224
     */
225
    public function associateClient(ClientEntity $client)
226
    { -
227
        $this->client = $client; +
227
        $this->client = $client;
228
-
229
        return $this; +
229
        return $this;
230
    }
231
232
    /** @@ -657,13 +657,13 @@
236
     */
237
    public function getClient()
238
    { -
239
        if ($this->client instanceof ClientEntity) { -
240
            return $this->client; -
241
        } +
239
        if ($this->client instanceof ClientEntity) { +
240
            return $this->client; +
241
        }
242
-
243
        $this->client = $this->server->getClientStorage()->getBySession($this); +
243
        $this->client = $this->server->getClientStorage()->getBySession($this);
244
-
245
        return $this->client; +
245
        return $this->client;
246
    }
247
248
    /** @@ -676,12 +676,12 @@
255
     */
256
    public function setOwner($type, $id)
257
    { -
258
        $this->ownerType = $type; -
259
        $this->ownerId = $id; +
258
        $this->ownerType = $type; +
259
        $this->ownerId = $id;
260
-
261
        $this->server->getEventEmitter()->emit(new SessionOwnerEvent($this)); +
261
        $this->server->getEventEmitter()->emit(new SessionOwnerEvent($this));
262
-
263
        return $this; +
263
        return $this;
264
    }
265
266
    /** @@ -691,7 +691,7 @@
270
     */
271
    public function getOwnerId()
272
    { -
273
        return $this->ownerId; +
273
        return $this->ownerId;
274
    }
275
276
    /** @@ -701,7 +701,7 @@
280
     */
281
    public function getOwnerType()
282
    { -
283
        return $this->ownerType; +
283
        return $this->ownerType;
284
    }
285
286
    /** @@ -712,20 +712,20 @@
291
    public function save()
292
    {
293
        // Save the session and get an identifier -
294
        $id = $this->server->getSessionStorage()->create( -
295
            $this->getOwnerType(), -
296
            $this->getOwnerId(), -
297
            $this->getClient()->getId(), -
298
            $this->getClient()->getRedirectUri() -
299
        ); +
294
        $id = $this->server->getSessionStorage()->create( +
295
            $this->getOwnerType(), +
296
            $this->getOwnerId(), +
297
            $this->getClient()->getId(), +
298
            $this->getClient()->getRedirectUri() +
299
        );
300
-
301
        $this->setId($id); +
301
        $this->setId($id);
302
303
        // Associate the scope with the session -
304
        foreach ($this->getScopes() as $scope) { -
305
            $this->server->getSessionStorage()->associateScope($this, $scope); -
306
        } -
307
    } +
304
        foreach ($this->getScopes() as $scope) { +
305
            $this->server->getSessionStorage()->associateScope($this, $scope); +
306
        } +
307
    }
308
} @@ -739,7 +739,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Entity/dashboard.html b/master/Entity/dashboard.html index a69b6ae5..931f61dd 100644 --- a/master/Entity/dashboard.html +++ b/master/Entity/dashboard.html @@ -59,6 +59,7 @@ + AccessTokenEntity84% @@ -75,6 +76,7 @@ + AccessTokenEntity9 @@ -112,7 +114,8 @@ - formatScopes85% + hasScope0% + formatScopes88% @@ -129,6 +132,7 @@ + hasScope6 formatScopes4 @@ -139,7 +143,7 @@ @@ -160,7 +164,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,1,7], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,1,1,6], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -178,7 +182,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,1,0,53], "Method Coverage")) + .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,0,1,0,52], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -228,7 +232,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[95.833333333333,18,"AbstractTokenEntity<\/a>"],[100,9,"AccessTokenEntity<\/a>"],[100,11,"AuthCodeEntity<\/a>"],[100,5,"ClientEntity<\/a>"],[100,6,"RefreshTokenEntity<\/a>"],[100,4,"ScopeEntity<\/a>"],[100,23,"SessionEntity<\/a>"],[100,3,"EntityTrait<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[96.296296296296,18,"AbstractTokenEntity<\/a>"],[84,9,"AccessTokenEntity<\/a>"],[100,11,"AuthCodeEntity<\/a>"],[100,5,"ClientEntity<\/a>"],[100,6,"RefreshTokenEntity<\/a>"],[100,4,"ScopeEntity<\/a>"],[100,23,"SessionEntity<\/a>"],[100,3,"EntityTrait<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -252,7 +256,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AbstractTokenEntity::__construct<\/a>"],[100,1,"AbstractTokenEntity::setSession<\/a>"],[100,1,"AbstractTokenEntity::setExpireTime<\/a>"],[100,1,"AbstractTokenEntity::getExpireTime<\/a>"],[100,1,"AbstractTokenEntity::isExpired<\/a>"],[100,2,"AbstractTokenEntity::setId<\/a>"],[100,1,"AbstractTokenEntity::getId<\/a>"],[100,2,"AbstractTokenEntity::associateScope<\/a>"],[85.714285714286,4,"AbstractTokenEntity::formatScopes<\/a>"],[100,2,"AbstractTokenEntity::__toString<\/a>"],[100,1,"AbstractTokenEntity::expire<\/a>"],[100,1,"AbstractTokenEntity::save<\/a>"],[100,2,"AccessTokenEntity::getSession<\/a>"],[100,2,"AccessTokenEntity::hasScope<\/a>"],[100,2,"AccessTokenEntity::getScopes<\/a>"],[100,2,"AccessTokenEntity::save<\/a>"],[100,1,"AccessTokenEntity::expire<\/a>"],[100,1,"AuthCodeEntity::setRedirectUri<\/a>"],[100,1,"AuthCodeEntity::getRedirectUri<\/a>"],[100,2,"AuthCodeEntity::generateRedirectUri<\/a>"],[100,2,"AuthCodeEntity::getSession<\/a>"],[100,2,"AuthCodeEntity::getScopes<\/a>"],[100,2,"AuthCodeEntity::save<\/a>"],[100,1,"AuthCodeEntity::expire<\/a>"],[100,1,"ClientEntity::__construct<\/a>"],[100,1,"ClientEntity::getId<\/a>"],[100,1,"ClientEntity::getSecret<\/a>"],[100,1,"ClientEntity::getName<\/a>"],[100,1,"ClientEntity::getRedirectUri<\/a>"],[100,1,"RefreshTokenEntity::setAccessTokenId<\/a>"],[100,1,"RefreshTokenEntity::setAccessToken<\/a>"],[100,2,"RefreshTokenEntity::getAccessToken<\/a>"],[100,1,"RefreshTokenEntity::save<\/a>"],[100,1,"RefreshTokenEntity::expire<\/a>"],[100,1,"ScopeEntity::__construct<\/a>"],[100,1,"ScopeEntity::getId<\/a>"],[100,1,"ScopeEntity::getDescription<\/a>"],[100,1,"ScopeEntity::jsonSerialize<\/a>"],[100,1,"SessionEntity::__construct<\/a>"],[100,1,"SessionEntity::setId<\/a>"],[100,1,"SessionEntity::getId<\/a>"],[100,2,"SessionEntity::associateScope<\/a>"],[100,2,"SessionEntity::hasScope<\/a>"],[100,2,"SessionEntity::getScopes<\/a>"],[100,4,"SessionEntity::formatScopes<\/a>"],[100,1,"SessionEntity::associateAccessToken<\/a>"],[100,1,"SessionEntity::associateRefreshToken<\/a>"],[100,1,"SessionEntity::associateClient<\/a>"],[100,2,"SessionEntity::getClient<\/a>"],[100,1,"SessionEntity::setOwner<\/a>"],[100,1,"SessionEntity::getOwnerId<\/a>"],[100,1,"SessionEntity::getOwnerType<\/a>"],[100,2,"SessionEntity::save<\/a>"],[100,3,"EntityTrait::hydrate<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AbstractTokenEntity::__construct<\/a>"],[100,1,"AbstractTokenEntity::setSession<\/a>"],[100,1,"AbstractTokenEntity::setExpireTime<\/a>"],[100,1,"AbstractTokenEntity::getExpireTime<\/a>"],[100,1,"AbstractTokenEntity::isExpired<\/a>"],[100,2,"AbstractTokenEntity::setId<\/a>"],[100,1,"AbstractTokenEntity::getId<\/a>"],[100,2,"AbstractTokenEntity::associateScope<\/a>"],[88.888888888889,4,"AbstractTokenEntity::formatScopes<\/a>"],[100,2,"AbstractTokenEntity::__toString<\/a>"],[100,1,"AbstractTokenEntity::expire<\/a>"],[100,1,"AbstractTokenEntity::save<\/a>"],[100,2,"AccessTokenEntity::getSession<\/a>"],[0,2,"AccessTokenEntity::hasScope<\/a>"],[100,2,"AccessTokenEntity::getScopes<\/a>"],[100,2,"AccessTokenEntity::save<\/a>"],[100,1,"AccessTokenEntity::expire<\/a>"],[100,1,"AuthCodeEntity::setRedirectUri<\/a>"],[100,1,"AuthCodeEntity::getRedirectUri<\/a>"],[100,2,"AuthCodeEntity::generateRedirectUri<\/a>"],[100,2,"AuthCodeEntity::getSession<\/a>"],[100,2,"AuthCodeEntity::getScopes<\/a>"],[100,2,"AuthCodeEntity::save<\/a>"],[100,1,"AuthCodeEntity::expire<\/a>"],[100,1,"ClientEntity::__construct<\/a>"],[100,1,"ClientEntity::getId<\/a>"],[100,1,"ClientEntity::getSecret<\/a>"],[100,1,"ClientEntity::getName<\/a>"],[100,1,"ClientEntity::getRedirectUri<\/a>"],[100,1,"RefreshTokenEntity::setAccessTokenId<\/a>"],[100,1,"RefreshTokenEntity::setAccessToken<\/a>"],[100,2,"RefreshTokenEntity::getAccessToken<\/a>"],[100,1,"RefreshTokenEntity::save<\/a>"],[100,1,"RefreshTokenEntity::expire<\/a>"],[100,1,"ScopeEntity::__construct<\/a>"],[100,1,"ScopeEntity::getId<\/a>"],[100,1,"ScopeEntity::getDescription<\/a>"],[100,1,"ScopeEntity::jsonSerialize<\/a>"],[100,1,"SessionEntity::__construct<\/a>"],[100,1,"SessionEntity::setId<\/a>"],[100,1,"SessionEntity::getId<\/a>"],[100,2,"SessionEntity::associateScope<\/a>"],[100,2,"SessionEntity::hasScope<\/a>"],[100,2,"SessionEntity::getScopes<\/a>"],[100,4,"SessionEntity::formatScopes<\/a>"],[100,1,"SessionEntity::associateAccessToken<\/a>"],[100,1,"SessionEntity::associateRefreshToken<\/a>"],[100,1,"SessionEntity::associateClient<\/a>"],[100,2,"SessionEntity::getClient<\/a>"],[100,1,"SessionEntity::setOwner<\/a>"],[100,1,"SessionEntity::getOwnerId<\/a>"],[100,1,"SessionEntity::getOwnerType<\/a>"],[100,2,"SessionEntity::save<\/a>"],[100,3,"EntityTrait::hydrate<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/Entity/index.html b/master/Entity/index.html index 1a7418e6..e290361f 100644 --- a/master/Entity/index.html +++ b/master/Entity/index.html @@ -44,41 +44,41 @@ Total
-
- 99.30% covered (success) +
+ 97.08% covered (success)
-
99.30%
-
141 / 142
+
97.08%
+
166 / 171
-
- 98.04% covered (success) +
+ 96.15% covered (success)
-
98.04%
-
50 / 51
+
96.15%
+
50 / 52
-
- 87.50% covered (warning) +
+ 75.00% covered (warning)
-
87.50%
-
7 / 8
+
75.00%
+
6 / 8
AbstractTokenEntity.php
-
- 95.83% covered (success) +
+ 96.30% covered (success)
-
95.83%
-
23 / 24
+
96.30%
+
26 / 27
90.00% covered (success) @@ -98,31 +98,31 @@ - AccessTokenEntity.php -
-
- 100.00% covered (success) + AccessTokenEntity.php +
+
+ 84.00% covered (warning)
-
100.00%
-
17 / 17
-
-
- 100.00% covered (success) +
84.00%
+
21 / 25
+
+
+ 80.00% covered (warning)
-
100.00%
-
4 / 4
-
-
- 100.00% covered (success) +
80.00%
+
4 / 5
+
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
+
0.00%
+
0 / 1
@@ -134,7 +134,7 @@
100.00%
-
26 / 26
+
31 / 31
100.00% covered (success) @@ -190,7 +190,7 @@
100.00%
-
4 / 4
+
6 / 6
100.00% covered (success) @@ -218,7 +218,7 @@
100.00%
-
14 / 14
+
16 / 16
100.00% covered (success) @@ -246,7 +246,7 @@
100.00%
-
6 / 6
+
7 / 7
100.00% covered (success) @@ -274,7 +274,7 @@
100.00%
-
45 / 45
+
53 / 53
100.00% covered (success) @@ -305,7 +305,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Event/ClientAuthenticationFailedEvent.php.html b/master/Event/ClientAuthenticationFailedEvent.php.html index 86737ef4..a8fc31b2 100644 --- a/master/Event/ClientAuthenticationFailedEvent.php.html +++ b/master/Event/ClientAuthenticationFailedEvent.php.html @@ -42,61 +42,61 @@ - Total -
-
- 100.00% covered (success) + Total +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 66.67% covered (warning)
-
100.00%
-
2 / 2
- CRAP -
-
- 100.00% covered (success) +
66.67%
+
2 / 3
+ CRAP +
+
+ 75.00% covered (warning)
-
100.00%
-
3 / 3
+
75.00%
+
3 / 4
- ClientAuthenticationFailedEvent -
-
- 100.00% covered (success) + ClientAuthenticationFailedEvent +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 66.67% covered (warning)
-
100.00%
-
3 / 3
- 3 -
-
- 100.00% covered (success) +
66.67%
+
2 / 3
+ 3.14 +
+
+ 75.00% covered (warning)
-
100.00%
-
3 / 3
+
75.00%
+
3 / 4
@@ -142,24 +142,24 @@ -  getRequest -
-
- 100.00% covered (success) +  getRequest +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
- 1 -
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+ 2 +
+
+ 0.00% covered (danger)
-
100.00%
-
0 / 0
+
0.00%
+
0 / 1
@@ -199,8 +199,8 @@      */     public function __construct(Request $request)     { -         $this->request = $request; -     } +         $this->request = $request; +     }     /**      * The name of the event @@ -209,7 +209,7 @@      */     public function getName()     { -         return 'error.auth.client'; +         return 'error.auth.client';     }     /** @@ -219,8 +219,8 @@      */     public function getRequest()     { -         return $this->request; -     } +         return $this->request; +     } } @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Event/SessionOwnerEvent.php.html b/master/Event/SessionOwnerEvent.php.html index e9d260bf..5c9ca784 100644 --- a/master/Event/SessionOwnerEvent.php.html +++ b/master/Event/SessionOwnerEvent.php.html @@ -199,8 +199,8 @@      */     public function __construct(SessionEntity $session)     { -         $this->session = $session; -     } +         $this->session = $session; +     }     /**      * The name of the event @@ -209,8 +209,8 @@      */     public function getName()     { -         return 'session.owner'; -     } +         return 'session.owner'; +     }     /**      * Return session @@ -219,8 +219,8 @@      */     public function getSession()     { -         return $this->session; -     } +         return $this->session; +     } } @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Event/UserAuthenticationFailedEvent.php.html b/master/Event/UserAuthenticationFailedEvent.php.html index 9f07b17a..e18f06c2 100644 --- a/master/Event/UserAuthenticationFailedEvent.php.html +++ b/master/Event/UserAuthenticationFailedEvent.php.html @@ -42,61 +42,61 @@ - Total -
-
- 100.00% covered (success) + Total +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 66.67% covered (warning)
-
100.00%
-
2 / 2
- CRAP -
-
- 100.00% covered (success) +
66.67%
+
2 / 3
+ CRAP +
+
+ 75.00% covered (warning)
-
100.00%
-
3 / 3
+
75.00%
+
3 / 4
- UserAuthenticationFailedEvent -
-
- 100.00% covered (success) + UserAuthenticationFailedEvent +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 66.67% covered (warning)
-
100.00%
-
3 / 3
- 3 -
-
- 100.00% covered (success) +
66.67%
+
2 / 3
+ 3.14 +
+
+ 75.00% covered (warning)
-
100.00%
-
3 / 3
+
75.00%
+
3 / 4
@@ -142,24 +142,24 @@ -  getRequest -
-
- 100.00% covered (success) +  getRequest +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
- 1 -
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+ 2 +
+
+ 0.00% covered (danger)
-
100.00%
-
0 / 0
+
0.00%
+
0 / 1
@@ -199,8 +199,8 @@      */     public function __construct(Request $request)     { -         $this->request = $request; -     } +         $this->request = $request; +     }     /**      * The name of the event @@ -209,7 +209,7 @@      */     public function getName()     { -         return 'error.auth.user'; +         return 'error.auth.user';     }     /** @@ -219,8 +219,8 @@      */     public function getRequest()     { -         return $this->request; -     } +         return $this->request; +     } } @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Event/dashboard.html b/master/Event/dashboard.html index 84eadc3a..e6cdd377 100644 --- a/master/Event/dashboard.html +++ b/master/Event/dashboard.html @@ -59,6 +59,8 @@ + UserAuthenticationFailedEvent75% + ClientAuthenticationFailedEvent75% @@ -112,6 +114,8 @@ + getRequest0% + getRequest0% @@ -137,7 +141,7 @@
@@ -158,7 +162,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,3], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,2,0,0,1], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -176,7 +180,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,9], "Method Coverage")) + .datum(getCoverageDistributionData([2,0,0,0,0,0,0,0,0,0,0,7], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -226,7 +230,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,3,"ClientAuthenticationFailedEvent<\/a>"],[100,3,"SessionOwnerEvent<\/a>"],[100,3,"UserAuthenticationFailedEvent<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[75,3,"ClientAuthenticationFailedEvent<\/a>"],[100,3,"SessionOwnerEvent<\/a>"],[75,3,"UserAuthenticationFailedEvent<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -250,7 +254,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"ClientAuthenticationFailedEvent::__construct<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getName<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"SessionOwnerEvent::__construct<\/a>"],[100,1,"SessionOwnerEvent::getName<\/a>"],[100,1,"SessionOwnerEvent::getSession<\/a>"],[100,1,"UserAuthenticationFailedEvent::__construct<\/a>"],[100,1,"UserAuthenticationFailedEvent::getName<\/a>"],[100,1,"UserAuthenticationFailedEvent::getRequest<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"ClientAuthenticationFailedEvent::__construct<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getName<\/a>"],[0,1,"ClientAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"SessionOwnerEvent::__construct<\/a>"],[100,1,"SessionOwnerEvent::getName<\/a>"],[100,1,"SessionOwnerEvent::getSession<\/a>"],[100,1,"UserAuthenticationFailedEvent::__construct<\/a>"],[100,1,"UserAuthenticationFailedEvent::getName<\/a>"],[0,1,"UserAuthenticationFailedEvent::getRequest<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/Event/index.html b/master/Event/index.html index febb6fdf..19d5c7f2 100644 --- a/master/Event/index.html +++ b/master/Event/index.html @@ -42,59 +42,59 @@ - Total -
-
- 100.00% covered (success) + Total +
+
+ 83.33% covered (warning)
-
100.00%
-
10 / 10
-
-
- 100.00% covered (success) +
83.33%
+
10 / 12
+
+
+ 77.78% covered (warning)
-
100.00%
-
7 / 7
-
-
- 100.00% covered (success) +
77.78%
+
7 / 9
+
+
+ 33.33% covered (danger)
-
100.00%
-
3 / 3
+
33.33%
+
1 / 3
-
ClientAuthenticationFailedEvent.php -
-
- 100.00% covered (success) + ClientAuthenticationFailedEvent.php +
+
+ 75.00% covered (warning)
-
100.00%
-
3 / 3
-
-
- 100.00% covered (success) +
75.00%
+
3 / 4
+
+
+ 66.67% covered (warning)
-
100.00%
-
2 / 2
-
-
- 100.00% covered (success) +
66.67%
+
2 / 3
+
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
+
0.00%
+
0 / 1
@@ -126,31 +126,31 @@ - UserAuthenticationFailedEvent.php -
-
- 100.00% covered (success) + UserAuthenticationFailedEvent.php +
+
+ 75.00% covered (warning)
-
100.00%
-
3 / 3
-
-
- 100.00% covered (success) +
75.00%
+
3 / 4
+
+
+ 66.67% covered (warning)
-
100.00%
-
2 / 2
-
-
- 100.00% covered (success) +
66.67%
+
2 / 3
+
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
+
0.00%
+
0 / 1
@@ -165,7 +165,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/AccessDeniedException.php.html b/master/Exception/AccessDeniedException.php.html index 60650645..0a64552e 100644 --- a/master/Exception/AccessDeniedException.php.html +++ b/master/Exception/AccessDeniedException.php.html @@ -158,8 +158,8 @@      */     public function __construct()     { -         parent::__construct('The resource owner or authorization server denied the request.'); -     } +         parent::__construct('The resource owner or authorization server denied the request.'); +     } } @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/InvalidClientException.php.html b/master/Exception/InvalidClientException.php.html index b3256995..30031411 100644 --- a/master/Exception/InvalidClientException.php.html +++ b/master/Exception/InvalidClientException.php.html @@ -158,8 +158,8 @@      */     public function __construct()     { -         parent::__construct('Client authentication failed.'); -     } +         parent::__construct('Client authentication failed.'); +     } } @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/InvalidCredentialsException.php.html b/master/Exception/InvalidCredentialsException.php.html index 1f5dd4b7..07442de9 100644 --- a/master/Exception/InvalidCredentialsException.php.html +++ b/master/Exception/InvalidCredentialsException.php.html @@ -158,8 +158,8 @@      */     public function __construct()     { -         parent::__construct('The user credentials were incorrect.'); -     } +         parent::__construct('The user credentials were incorrect.'); +     } } @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/InvalidGrantException.php.html b/master/Exception/InvalidGrantException.php.html index f309c791..9b2f04c8 100644 --- a/master/Exception/InvalidGrantException.php.html +++ b/master/Exception/InvalidGrantException.php.html @@ -67,7 +67,7 @@
100.00%
-
4 / 4
+
7 / 7
@@ -96,7 +96,7 @@
100.00%
-
4 / 4
+
7 / 7
@@ -117,7 +117,7 @@
100.00%
-
4 / 4
+
7 / 7
@@ -159,14 +159,14 @@     public function __construct($parameter)     { -         $this->parameter = $parameter; -         parent::__construct( -             sprintf( -                 'The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. Check the "%s" parameter.', +         $this->parameter = $parameter; +         parent::__construct( +             sprintf( +                 'The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. Check the "%s" parameter.',                 $parameter -             ) -         ); -     } +             ) +         ); +     } } @@ -180,7 +180,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/InvalidRefreshException.php.html b/master/Exception/InvalidRefreshException.php.html index f1a6609a..d7a74402 100644 --- a/master/Exception/InvalidRefreshException.php.html +++ b/master/Exception/InvalidRefreshException.php.html @@ -158,8 +158,8 @@      */     public function __construct()     { -         parent::__construct('The refresh token is invalid.'); -     } +         parent::__construct('The refresh token is invalid.'); +     } } @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/InvalidRequestException.php.html b/master/Exception/InvalidRequestException.php.html index a3ea1d4d..b657fcec 100644 --- a/master/Exception/InvalidRequestException.php.html +++ b/master/Exception/InvalidRequestException.php.html @@ -67,7 +67,7 @@
100.00%
-
5 / 5
+
8 / 8
@@ -96,7 +96,7 @@
100.00%
-
5 / 5
+
8 / 8
@@ -117,7 +117,7 @@
100.00%
-
5 / 5
+
8 / 8
@@ -159,16 +159,16 @@     public function __construct($parameter, $redirectUri = null)     { -         $this->parameter = $parameter; -         parent::__construct( -             sprintf( -                 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "%s" parameter.', +         $this->parameter = $parameter; +         parent::__construct( +             sprintf( +                 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "%s" parameter.',                 $parameter -             ) -         ); +             ) +         ); -         $this->redirectUri = $redirectUri; -     } +         $this->redirectUri = $redirectUri; +     } } @@ -182,7 +182,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/InvalidScopeException.php.html b/master/Exception/InvalidScopeException.php.html index d9329424..d4c4e030 100644 --- a/master/Exception/InvalidScopeException.php.html +++ b/master/Exception/InvalidScopeException.php.html @@ -67,7 +67,7 @@
100.00%
-
5 / 5
+
8 / 8
@@ -96,7 +96,7 @@
100.00%
-
5 / 5
+
8 / 8
@@ -117,7 +117,7 @@
100.00%
-
5 / 5
+
8 / 8
@@ -159,16 +159,16 @@     public function __construct($parameter, $redirectUri = null)     { -         $this->parameter = $parameter; -         parent::__construct( -             sprintf( -                 'The requested scope is invalid, unknown, or malformed. Check the "%s" scope.', +         $this->parameter = $parameter; +         parent::__construct( +             sprintf( +                 'The requested scope is invalid, unknown, or malformed. Check the "%s" scope.',                 $parameter -             ) -         ); +             ) +         ); -         $this->redirectUri = $redirectUri; -     } +         $this->redirectUri = $redirectUri; +     } } @@ -182,7 +182,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/OAuthException.php.html b/master/Exception/OAuthException.php.html index 79340164..47fa4001 100644 --- a/master/Exception/OAuthException.php.html +++ b/master/Exception/OAuthException.php.html @@ -52,22 +52,22 @@
0.00%
0 / 1
-
- 60.00% covered (warning) +
+ 80.00% covered (warning)
-
60.00%
-
3 / 5
+
80.00%
+
4 / 5
CRAP -
-
- 78.26% covered (warning) +
+
+ 96.15% covered (success)
-
78.26%
-
18 / 23
+
96.15%
+
25 / 26
@@ -81,22 +81,22 @@
0.00%
0 / 1
-
- 60.00% covered (warning) +
+ 80.00% covered (warning)
-
60.00%
-
3 / 5
- 19.97 -
-
- 78.26% covered (warning) +
80.00%
+
4 / 5
+ 17 +
+
+ 96.15% covered (success)
-
78.26%
-
18 / 23
+
96.15%
+
25 / 26
@@ -159,7 +159,7 @@
100.00%
-
4 / 4
+
5 / 5
@@ -184,24 +184,24 @@ -  getHttpHeaders -
-
- 0.00% covered (danger) +  getHttpHeaders +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
- 14.73 -
-
- 73.33% covered (warning) +
100.00%
+
1 / 1
+ 12 +
+
+ 100.00% covered (success)
-
73.33%
-
11 / 15
+
100.00%
+
17 / 17
@@ -259,8 +259,8 @@      */     public function __construct($msg = 'An error occured')     { -         parent::__construct($msg); -     } +         parent::__construct($msg); +     }     /**      * Should the server redirect back to the client? @@ -269,7 +269,7 @@      */     public function shouldRedirect()     { -         return is_null($this->redirectUri) ? false : true; +         return is_null($this->redirectUri) ? false : true;     }     /** @@ -279,13 +279,13 @@      */     public function getRedirectUri()     { -         return RedirectUri::make( -             $this->redirectUri, +         return RedirectUri::make( +             $this->redirectUri,             [ -                 'error' =>  $this->errorType, -                 'message' =>  $this->getMessage(), +                 'error' =>  $this->errorType, +                 'message' =>  $this->getMessage(),             ] -         ); +         );     }     /** @@ -305,22 +305,22 @@      */     public function getHttpHeaders()     { -         $headers = []; -         switch ($this->httpStatusCode) { -             case 401: -                 $headers[] = 'HTTP/1.1 401 Unauthorized'; -                 break; -             case 500: -                 $headers[] = 'HTTP/1.1 500 Internal Server Error'; -                 break; -             case 501: -                 $headers[] = 'HTTP/1.1 501 Not Implemented'; -                 break; -             case 400: -             default: -                 $headers[] = 'HTTP/1.1 400 Bad Request'; -                 break; -         } +         $headers = []; +         switch ($this->httpStatusCode) { +             case 401: +                 $headers[] = 'HTTP/1.1 401 Unauthorized'; +                 break; +             case 500: +                 $headers[] = 'HTTP/1.1 500 Internal Server Error'; +                 break; +             case 501: +                 $headers[] = 'HTTP/1.1 501 Not Implemented'; +                 break; +             case 400: +             default: +                 $headers[] = 'HTTP/1.1 400 Bad Request'; +                 break; +         }         // Add "WWW-Authenticate" header         // @@ -353,7 +353,7 @@             }         }         // @codeCoverageIgnoreEnd -         return $headers; +         return $headers;     } } @@ -368,7 +368,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/ServerErrorException.php.html b/master/Exception/ServerErrorException.php.html index 8340576e..d2ec9a2b 100644 --- a/master/Exception/ServerErrorException.php.html +++ b/master/Exception/ServerErrorException.php.html @@ -158,11 +158,11 @@      */     public function __construct($parameter = null)     { -         $this->parameter = $parameter; -         $parameter = is_null($parameter) ? 'The authorization server encountered an unexpected condition which prevented it from fulfilling the request.' : $parameter; -         parent::__construct($parameter); +         $this->parameter = $parameter; +         $parameter = is_null($parameter) ? 'The authorization server encountered an unexpected condition which prevented it from fulfilling the request.' : $parameter; +         parent::__construct($parameter); -     } +     } } @@ -176,7 +176,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/UnauthorizedClientException.php.html b/master/Exception/UnauthorizedClientException.php.html index 0b62522f..12f1467d 100644 --- a/master/Exception/UnauthorizedClientException.php.html +++ b/master/Exception/UnauthorizedClientException.php.html @@ -158,8 +158,8 @@      */     public function __construct()     { -         parent::__construct('The client is not authorized to request an access token using this method.'); -     } +         parent::__construct('The client is not authorized to request an access token using this method.'); +     } } @@ -173,7 +173,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/UnsupportedGrantTypeException.php.html b/master/Exception/UnsupportedGrantTypeException.php.html index cb728a79..3a03852e 100644 --- a/master/Exception/UnsupportedGrantTypeException.php.html +++ b/master/Exception/UnsupportedGrantTypeException.php.html @@ -67,7 +67,7 @@
100.00%
-
4 / 4
+
7 / 7
@@ -96,7 +96,7 @@
100.00%
-
4 / 4
+
7 / 7
@@ -117,7 +117,7 @@
100.00%
-
4 / 4
+
7 / 7
@@ -159,14 +159,14 @@     public function __construct($parameter)     { -         $this->parameter = $parameter; -         parent::__construct( -             sprintf( -                 'The authorization grant type "%s" is not supported by the authorization server.', +         $this->parameter = $parameter; +         parent::__construct( +             sprintf( +                 'The authorization grant type "%s" is not supported by the authorization server.',                 $parameter -             ) -         ); -     } +             ) +         ); +     } } @@ -180,7 +180,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/UnsupportedResponseTypeException.php.html b/master/Exception/UnsupportedResponseTypeException.php.html index 3495e5a2..e78dc985 100644 --- a/master/Exception/UnsupportedResponseTypeException.php.html +++ b/master/Exception/UnsupportedResponseTypeException.php.html @@ -158,10 +158,10 @@      */     public function __construct($parameter, $redirectUri = null)     { -         $this->parameter = $parameter; -         parent::__construct('The authorization server does not support obtaining an access token using this method.'); -         $this->redirectUri = $redirectUri; -     } +         $this->parameter = $parameter; +         parent::__construct('The authorization server does not support obtaining an access token using this method.'); +         $this->redirectUri = $redirectUri; +     } } @@ -175,7 +175,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Exception/dashboard.html b/master/Exception/dashboard.html index e075c4ca..2cf2cf09 100644 --- a/master/Exception/dashboard.html +++ b/master/Exception/dashboard.html @@ -59,7 +59,6 @@ - OAuthException78% @@ -76,7 +75,6 @@ - OAuthException19 @@ -115,7 +113,6 @@ getParameter0% - getHttpHeaders73% @@ -132,7 +129,6 @@ - getHttpHeaders14 @@ -142,7 +138,7 @@
@@ -163,7 +159,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,1,0,0,11], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,1,11], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -181,7 +177,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,1,0,0,14], "Method Coverage")) + .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,0,0,0,15], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -231,7 +227,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,1,"AccessDeniedException<\/a>"],[100,1,"InvalidClientException<\/a>"],[100,1,"InvalidCredentialsException<\/a>"],[100,1,"InvalidGrantException<\/a>"],[100,1,"InvalidRefreshException<\/a>"],[100,1,"InvalidRequestException<\/a>"],[100,1,"InvalidScopeException<\/a>"],[78.260869565217,17,"OAuthException<\/a>"],[100,2,"ServerErrorException<\/a>"],[100,1,"UnauthorizedClientException<\/a>"],[100,1,"UnsupportedGrantTypeException<\/a>"],[100,1,"UnsupportedResponseTypeException<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,1,"AccessDeniedException<\/a>"],[100,1,"InvalidClientException<\/a>"],[100,1,"InvalidCredentialsException<\/a>"],[100,1,"InvalidGrantException<\/a>"],[100,1,"InvalidRefreshException<\/a>"],[100,1,"InvalidRequestException<\/a>"],[100,1,"InvalidScopeException<\/a>"],[96.153846153846,17,"OAuthException<\/a>"],[100,2,"ServerErrorException<\/a>"],[100,1,"UnauthorizedClientException<\/a>"],[100,1,"UnsupportedGrantTypeException<\/a>"],[100,1,"UnsupportedResponseTypeException<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -255,7 +251,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AccessDeniedException::__construct<\/a>"],[100,1,"InvalidClientException::__construct<\/a>"],[100,1,"InvalidCredentialsException::__construct<\/a>"],[100,1,"InvalidGrantException::__construct<\/a>"],[100,1,"InvalidRefreshException::__construct<\/a>"],[100,1,"InvalidRequestException::__construct<\/a>"],[100,1,"InvalidScopeException::__construct<\/a>"],[100,1,"OAuthException::__construct<\/a>"],[100,2,"OAuthException::shouldRedirect<\/a>"],[100,1,"OAuthException::getRedirectUri<\/a>"],[0,1,"OAuthException::getParameter<\/a>"],[73.333333333333,12,"OAuthException::getHttpHeaders<\/a>"],[100,2,"ServerErrorException::__construct<\/a>"],[100,1,"UnauthorizedClientException::__construct<\/a>"],[100,1,"UnsupportedGrantTypeException::__construct<\/a>"],[100,1,"UnsupportedResponseTypeException::__construct<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AccessDeniedException::__construct<\/a>"],[100,1,"InvalidClientException::__construct<\/a>"],[100,1,"InvalidCredentialsException::__construct<\/a>"],[100,1,"InvalidGrantException::__construct<\/a>"],[100,1,"InvalidRefreshException::__construct<\/a>"],[100,1,"InvalidRequestException::__construct<\/a>"],[100,1,"InvalidScopeException::__construct<\/a>"],[100,1,"OAuthException::__construct<\/a>"],[100,2,"OAuthException::shouldRedirect<\/a>"],[100,1,"OAuthException::getRedirectUri<\/a>"],[0,1,"OAuthException::getParameter<\/a>"],[100,12,"OAuthException::getHttpHeaders<\/a>"],[100,2,"ServerErrorException::__construct<\/a>"],[100,1,"UnauthorizedClientException::__construct<\/a>"],[100,1,"UnsupportedGrantTypeException::__construct<\/a>"],[100,1,"UnsupportedResponseTypeException::__construct<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/Exception/index.html b/master/Exception/index.html index eab4683a..2892cf94 100644 --- a/master/Exception/index.html +++ b/master/Exception/index.html @@ -44,21 +44,21 @@ Total
-
- 91.53% covered (success) +
+ 98.65% covered (success)
-
91.53%
-
54 / 59
-
-
- 87.50% covered (warning) +
98.65%
+
73 / 74
+
+
+ 93.75% covered (success)
-
87.50%
-
14 / 16
+
93.75%
+
15 / 16
91.67% covered (success) @@ -162,7 +162,7 @@
100.00%
-
4 / 4
+
7 / 7
100.00% covered (success) @@ -218,7 +218,7 @@
100.00%
-
5 / 5
+
8 / 8
100.00% covered (success) @@ -246,7 +246,7 @@
100.00%
-
5 / 5
+
8 / 8
100.00% covered (success) @@ -266,23 +266,23 @@ - OAuthException.php -
-
- 78.26% covered (warning) + OAuthException.php +
+
+ 96.15% covered (success)
-
78.26%
-
18 / 23
+
96.15%
+
25 / 26
-
- 60.00% covered (warning) +
+ 80.00% covered (warning)
-
60.00%
-
3 / 5
+
80.00%
+
4 / 5
0.00% covered (danger) @@ -358,7 +358,7 @@
100.00%
-
4 / 4
+
7 / 7
100.00% covered (success) @@ -417,7 +417,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Grant/AbstractGrant.php.html b/master/Grant/AbstractGrant.php.html index b9f1c018..8e06970d 100644 --- a/master/Grant/AbstractGrant.php.html +++ b/master/Grant/AbstractGrant.php.html @@ -67,7 +67,7 @@
100.00%
-
38 / 38
+
48 / 48
@@ -96,7 +96,7 @@
100.00%
-
38 / 38
+
48 / 48
@@ -243,7 +243,7 @@
100.00%
-
22 / 22
+
30 / 30
@@ -264,7 +264,7 @@
100.00%
-
5 / 5
+
7 / 7
@@ -335,7 +335,7 @@      */     public function getIdentifier()     { -         return $this->identifier; +         return $this->identifier;     }     /** @@ -343,9 +343,9 @@      */     public function setIdentifier($identifier)     { -         $this->identifier = $identifier; +         $this->identifier = $identifier; -         return $this; +         return $this;     }     /** @@ -353,7 +353,7 @@      */     public function getResponseType()     { -         return $this->responseType; +         return $this->responseType;     }     /** @@ -363,11 +363,11 @@      */     public function getAccessTokenTTL()     { -         if ($this->accessTokenTTL) { -             return $this->accessTokenTTL; -         } +         if ($this->accessTokenTTL) { +             return $this->accessTokenTTL; +         } -         return $this->server->getAccessTokenTTL(); +         return $this->server->getAccessTokenTTL();     }     /** @@ -379,9 +379,9 @@      */     public function setAccessTokenTTL($accessTokenTTL)     { -         $this->accessTokenTTL = $accessTokenTTL; +         $this->accessTokenTTL = $accessTokenTTL; -         return $this; +         return $this;     }     /** @@ -389,9 +389,9 @@      */     public function setAuthorizationServer(AuthorizationServer $server)     { -         $this->server = $server; +         $this->server = $server; -         return $this; +         return $this;     }     /** @@ -408,46 +408,46 @@      */     public function validateScopes($scopeParam = '', ClientEntity $client, $redirectUri = null)     { -         $scopesList = explode($this->server->getScopeDelimiter(), $scopeParam); +         $scopesList = explode($this->server->getScopeDelimiter(), $scopeParam); -         for ($i = 0; $i < count($scopesList); $i++) { -             $scopesList[$i] = trim($scopesList[$i]); -             if ($scopesList[$i] === '') { -                 unset($scopesList[$i]); // Remove any junk scopes -             } -         } +         for ($i = 0; $i < count($scopesList); $i++) { +             $scopesList[$i] = trim($scopesList[$i]); +             if ($scopesList[$i] === '') { +                 unset($scopesList[$i]); // Remove any junk scopes +             } +         }         if ( -             $this->server->scopeParamRequired() === true -             && $this->server->getDefaultScope() === null -             && count($scopesList) === 0 -         ) { -             throw new Exception\InvalidRequestException('scope'); -         } elseif (count($scopesList) === 0 && $this->server->getDefaultScope() !== null) { -             if (is_array($this->server->getDefaultScope())) { -                 $scopesList = $this->server->getDefaultScope(); -             } else { -                 $scopesList = [0 => $this->server->getDefaultScope()]; +             $this->server->scopeParamRequired() === true +             && $this->server->getDefaultScope() === null +             && count($scopesList) === 0 +         ) { +             throw new Exception\InvalidRequestException('scope'); +         } elseif (count($scopesList) === 0 && $this->server->getDefaultScope() !== null) { +             if (is_array($this->server->getDefaultScope())) { +                 $scopesList = $this->server->getDefaultScope(); +             } else { +                 $scopesList = [0 => $this->server->getDefaultScope()];             } -         } +         } -         $scopes = []; +         $scopes = []; -         foreach ($scopesList as $scopeItem) { -             $scope = $this->server->getScopeStorage()->get( -                 $scopeItem, -                 $this->getIdentifier(), -                 $client->getId() -             ); +         foreach ($scopesList as $scopeItem) { +             $scope = $this->server->getScopeStorage()->get( +                 $scopeItem, +                 $this->getIdentifier(), +                 $client->getId() +             ); -             if (($scope instanceof ScopeEntity) === false) { -                 throw new Exception\InvalidScopeException($scopeItem, $redirectUri); -             } +             if (($scope instanceof ScopeEntity) === false) { +                 throw new Exception\InvalidScopeException($scopeItem, $redirectUri); +             } -             $scopes[$scope->getId()] = $scope; -         } +             $scopes[$scope->getId()] = $scope; +         } -         return $scopes; +         return $scopes;     }     /** @@ -459,14 +459,14 @@      */     protected function formatScopes($unformated = [])     { -         $scopes = []; -         foreach ($unformated as $scope) { -             if ($scope instanceof ScopeEntity) { -                 $scopes[$scope->getId()] = $scope; -             } -         } +         $scopes = []; +         foreach ($unformated as $scope) { +             if ($scope instanceof ScopeEntity) { +                 $scopes[$scope->getId()] = $scope; +             } +         } -         return $scopes; +         return $scopes;     } } @@ -481,7 +481,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Grant/AuthCodeGrant.php.html b/master/Grant/AuthCodeGrant.php.html index c49db6cb..bab5ac0a 100644 --- a/master/Grant/AuthCodeGrant.php.html +++ b/master/Grant/AuthCodeGrant.php.html @@ -42,61 +42,61 @@ - Total -
-
- 100.00% covered (success) + Total +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 83.33% covered (warning)
-
100.00%
-
5 / 5
- CRAP +
83.33%
+
5 / 6
+ CRAP
-
- 100.00% covered (success) +
+ 98.15% covered (success)
-
100.00%
-
94 / 94
+
98.15%
+
106 / 108
- AuthCodeGrant -
-
- 100.00% covered (success) + AuthCodeGrant +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
-
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+
+
+ 83.33% covered (warning)
-
100.00%
-
6 / 6
- 28 +
83.33%
+
5 / 6
+ 28
-
- 100.00% covered (success) +
+ 98.15% covered (success)
-
100.00%
-
94 / 94
+
98.15%
+
106 / 108
@@ -121,24 +121,24 @@ -  setRequireClientSecret -
-
- 100.00% covered (success) +  setRequireClientSecret +
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
- 1 -
-
- 100.00% covered (success) +
0.00%
+
0 / 1
+ 2 +
+
+ 0.00% covered (danger)
-
100.00%
-
0 / 0
+
0.00%
+
0 / 2
@@ -180,7 +180,7 @@
100.00%
-
27 / 27
+
30 / 30
@@ -201,7 +201,7 @@
100.00%
-
14 / 14
+
15 / 15
@@ -222,7 +222,7 @@
100.00%
-
50 / 50
+
58 / 58
@@ -309,8 +309,8 @@      */     public function setAuthTokenTTL($authTokenTTL)     { -         $this->authTokenTTL = $authTokenTTL; -     } +         $this->authTokenTTL = $authTokenTTL; +     }     /**      * @@ -319,8 +319,8 @@      */     public function setRequireClientSecret($required)     { -         $this->requireClientSecret = $required; -     } +         $this->requireClientSecret = $required; +     }     /**      * True if client secret is required during @@ -330,8 +330,8 @@      */     public function shouldRequireClientSecret()     { -         return $this->requireClientSecret; -     } +         return $this->requireClientSecret; +     }     /**      * Check authorize parameters @@ -343,56 +343,56 @@     public function checkAuthorizeParams()     {         // Get required params -         $clientId = $this->server->getRequest()->query->get('client_id', null); -         if (is_null($clientId)) { -             throw new Exception\InvalidRequestException('client_id'); -         } +         $clientId = $this->server->getRequest()->query->get('client_id', null); +         if (is_null($clientId)) { +             throw new Exception\InvalidRequestException('client_id'); +         } -         $redirectUri = $this->server->getRequest()->query->get('redirect_uri', null); -         if (is_null($redirectUri)) { -             throw new Exception\InvalidRequestException('redirect_uri'); -         } +         $redirectUri = $this->server->getRequest()->query->get('redirect_uri', null); +         if (is_null($redirectUri)) { +             throw new Exception\InvalidRequestException('redirect_uri'); +         }         // Validate client ID and redirect URI -         $client = $this->server->getClientStorage()->get( -             $clientId, -             null, -             $redirectUri, -             $this->getIdentifier() -         ); +         $client = $this->server->getClientStorage()->get( +             $clientId, +             null, +             $redirectUri, +             $this->getIdentifier() +         ); -         if (($client instanceof ClientEntity) === false) { -             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); -             throw new Exception\InvalidClientException(); -         } +         if (($client instanceof ClientEntity) === false) { +             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); +             throw new Exception\InvalidClientException(); +         } -         $state = $this->server->getRequest()->query->get('state', null); -         if ($this->server->stateParamRequired() === true && is_null($state)) { -             throw new Exception\InvalidRequestException('state', $redirectUri); -         } +         $state = $this->server->getRequest()->query->get('state', null); +         if ($this->server->stateParamRequired() === true && is_null($state)) { +             throw new Exception\InvalidRequestException('state', $redirectUri); +         } -         $responseType = $this->server->getRequest()->query->get('response_type', null); -         if (is_null($responseType)) { -             throw new Exception\InvalidRequestException('response_type', $redirectUri); -         } +         $responseType = $this->server->getRequest()->query->get('response_type', null); +         if (is_null($responseType)) { +             throw new Exception\InvalidRequestException('response_type', $redirectUri); +         }         // Ensure response type is one that is recognised -         if (!in_array($responseType, $this->server->getResponseTypes())) { -             throw new Exception\UnsupportedResponseTypeException($responseType, $redirectUri); -         } +         if (!in_array($responseType, $this->server->getResponseTypes())) { +             throw new Exception\UnsupportedResponseTypeException($responseType, $redirectUri); +         }         // Validate any scopes that are in the request -         $scopeParam = $this->server->getRequest()->query->get('scope', ''); -         $scopes = $this->validateScopes($scopeParam, $client, $redirectUri); +         $scopeParam = $this->server->getRequest()->query->get('scope', ''); +         $scopes = $this->validateScopes($scopeParam, $client, $redirectUri);         return [ -             'client'        => $client, -             'redirect_uri'  => $redirectUri, -             'state'         => $state, -             'response_type' => $responseType, -             'scopes'        => $scopes -         ]; -     } +             'client'        => $client, +             'redirect_uri'  => $redirectUri, +             'state'         => $state, +             'response_type' => $responseType, +             'scopes'        => $scopes +         ]; +     }     /**      * Parse a new authorize request @@ -406,27 +406,27 @@     public function newAuthorizeRequest($type, $typeId, $authParams = [])     {         // Create a new session -         $session = new SessionEntity($this->server); -         $session->setOwner($type, $typeId); -         $session->associateClient($authParams['client']); +         $session = new SessionEntity($this->server); +         $session->setOwner($type, $typeId); +         $session->associateClient($authParams['client']);         // Create a new auth code -         $authCode = new AuthCodeEntity($this->server); -         $authCode->setId(SecureKey::generate()); -         $authCode->setRedirectUri($authParams['redirect_uri']); -         $authCode->setExpireTime(time() + $this->authTokenTTL); +         $authCode = new AuthCodeEntity($this->server); +         $authCode->setId(SecureKey::generate()); +         $authCode->setRedirectUri($authParams['redirect_uri']); +         $authCode->setExpireTime(time() + $this->authTokenTTL); -         foreach ($authParams['scopes'] as $scope) { -             $authCode->associateScope($scope); -             $session->associateScope($scope); -         } +         foreach ($authParams['scopes'] as $scope) { +             $authCode->associateScope($scope); +             $session->associateScope($scope); +         } -         $session->save(); -         $authCode->setSession($session); -         $authCode->save(); +         $session->save(); +         $authCode->setSession($session); +         $authCode->save(); -         return $authCode->generateRedirectUri($authParams['state']); -     } +         return $authCode->generateRedirectUri($authParams['state']); +     }     /**      * Complete the auth code grant @@ -438,100 +438,100 @@     public function completeFlow()     {         // Get the required params -         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); -         if (is_null($clientId)) { -             throw new Exception\InvalidRequestException('client_id'); -         } +         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); +         if (is_null($clientId)) { +             throw new Exception\InvalidRequestException('client_id'); +         } -         $clientSecret = $this->server->getRequest()->request->get('client_secret', -             $this->server->getRequest()->getPassword()); -         if ($this->shouldRequireClientSecret() && is_null($clientSecret)) { -             throw new Exception\InvalidRequestException('client_secret'); -         } +         $clientSecret = $this->server->getRequest()->request->get('client_secret', +             $this->server->getRequest()->getPassword()); +         if ($this->shouldRequireClientSecret() && is_null($clientSecret)) { +             throw new Exception\InvalidRequestException('client_secret'); +         } -         $redirectUri = $this->server->getRequest()->request->get('redirect_uri', null); -         if (is_null($redirectUri)) { -             throw new Exception\InvalidRequestException('redirect_uri'); -         } +         $redirectUri = $this->server->getRequest()->request->get('redirect_uri', null); +         if (is_null($redirectUri)) { +             throw new Exception\InvalidRequestException('redirect_uri'); +         }         // Validate client ID and client secret -         $client = $this->server->getClientStorage()->get( -             $clientId, -             $clientSecret, -             $redirectUri, -             $this->getIdentifier() -         ); +         $client = $this->server->getClientStorage()->get( +             $clientId, +             $clientSecret, +             $redirectUri, +             $this->getIdentifier() +         ); -         if (($client instanceof ClientEntity) === false) { -             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); -             throw new Exception\InvalidClientException(); -         } +         if (($client instanceof ClientEntity) === false) { +             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); +             throw new Exception\InvalidClientException(); +         }         // Validate the auth code -         $authCode = $this->server->getRequest()->request->get('code', null); -         if (is_null($authCode)) { -             throw new Exception\InvalidRequestException('code'); -         } +         $authCode = $this->server->getRequest()->request->get('code', null); +         if (is_null($authCode)) { +             throw new Exception\InvalidRequestException('code'); +         } -         $code = $this->server->getAuthCodeStorage()->get($authCode); -         if (($code instanceof AuthCodeEntity) === false) { -             throw new Exception\InvalidRequestException('code'); -         } +         $code = $this->server->getAuthCodeStorage()->get($authCode); +         if (($code instanceof AuthCodeEntity) === false) { +             throw new Exception\InvalidRequestException('code'); +         }         // Ensure the auth code hasn't expired -         if ($code->isExpired() === true) { -             throw new Exception\InvalidRequestException('code'); -         } +         if ($code->isExpired() === true) { +             throw new Exception\InvalidRequestException('code'); +         }         // Check redirect URI presented matches redirect URI originally used in authorize request -         if ($code->getRedirectUri() !== $redirectUri) { -             throw new Exception\InvalidRequestException('redirect_uri'); -         } +         if ($code->getRedirectUri() !== $redirectUri) { +             throw new Exception\InvalidRequestException('redirect_uri'); +         } -         $session = $code->getSession(); -         $session->associateClient($client); +         $session = $code->getSession(); +         $session->associateClient($client); -         $authCodeScopes = $code->getScopes(); +         $authCodeScopes = $code->getScopes();         // Generate the access token -         $accessToken = new AccessTokenEntity($this->server); -         $accessToken->setId(SecureKey::generate()); -         $accessToken->setExpireTime($this->getAccessTokenTTL() + time()); +         $accessToken = new AccessTokenEntity($this->server); +         $accessToken->setId(SecureKey::generate()); +         $accessToken->setExpireTime($this->getAccessTokenTTL() + time()); -         foreach ($authCodeScopes as $authCodeScope) { -             $session->associateScope($authCodeScope); -         } +         foreach ($authCodeScopes as $authCodeScope) { +             $session->associateScope($authCodeScope); +         } -         foreach ($session->getScopes() as $scope) { -             $accessToken->associateScope($scope); -         } +         foreach ($session->getScopes() as $scope) { +             $accessToken->associateScope($scope); +         } -         $this->server->getTokenType()->setSession($session); -         $this->server->getTokenType()->setParam('access_token', $accessToken->getId()); -         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); +         $this->server->getTokenType()->setSession($session); +         $this->server->getTokenType()->setParam('access_token', $accessToken->getId()); +         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL());         // Associate a refresh token if set -         if ($this->server->hasGrantType('refresh_token')) { -             $refreshToken = new RefreshTokenEntity($this->server); -             $refreshToken->setId(SecureKey::generate()); -             $refreshToken->setExpireTime($this->server->getGrantType('refresh_token')->getRefreshTokenTTL() + time()); -             $this->server->getTokenType()->setParam('refresh_token', $refreshToken->getId()); -         } +         if ($this->server->hasGrantType('refresh_token')) { +             $refreshToken = new RefreshTokenEntity($this->server); +             $refreshToken->setId(SecureKey::generate()); +             $refreshToken->setExpireTime($this->server->getGrantType('refresh_token')->getRefreshTokenTTL() + time()); +             $this->server->getTokenType()->setParam('refresh_token', $refreshToken->getId()); +         }         // Expire the auth code -         $code->expire(); +         $code->expire();         // Save all the things -         $accessToken->setSession($session); -         $accessToken->save(); +         $accessToken->setSession($session); +         $accessToken->save(); -         if (isset($refreshToken) && $this->server->hasGrantType('refresh_token')) { -             $refreshToken->setAccessToken($accessToken); -             $refreshToken->save(); -         } +         if (isset($refreshToken) && $this->server->hasGrantType('refresh_token')) { +             $refreshToken->setAccessToken($accessToken); +             $refreshToken->save(); +         } -         return $this->server->getTokenType()->generateResponse(); -     } +         return $this->server->getTokenType()->generateResponse(); +     } } @@ -545,7 +545,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Grant/ClientCredentialsGrant.php.html b/master/Grant/ClientCredentialsGrant.php.html index 417f572b..3d1955ef 100644 --- a/master/Grant/ClientCredentialsGrant.php.html +++ b/master/Grant/ClientCredentialsGrant.php.html @@ -67,7 +67,7 @@
100.00%
-
32 / 32
+
37 / 37
@@ -96,7 +96,7 @@
100.00%
-
32 / 32
+
37 / 37
@@ -117,7 +117,7 @@
100.00%
-
32 / 32
+
37 / 37
@@ -188,63 +188,63 @@     public function completeFlow()     {         // Get the required params -         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); -         if (is_null($clientId)) { -             throw new Exception\InvalidRequestException('client_id'); -         } +         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); +         if (is_null($clientId)) { +             throw new Exception\InvalidRequestException('client_id'); +         } -         $clientSecret = $this->server->getRequest()->request->get('client_secret', -             $this->server->getRequest()->getPassword()); -         if (is_null($clientSecret)) { -             throw new Exception\InvalidRequestException('client_secret'); -         } +         $clientSecret = $this->server->getRequest()->request->get('client_secret', +             $this->server->getRequest()->getPassword()); +         if (is_null($clientSecret)) { +             throw new Exception\InvalidRequestException('client_secret'); +         }         // Validate client ID and client secret -         $client = $this->server->getClientStorage()->get( -             $clientId, -             $clientSecret, -             null, -             $this->getIdentifier() -         ); +         $client = $this->server->getClientStorage()->get( +             $clientId, +             $clientSecret, +             null, +             $this->getIdentifier() +         ); -         if (($client instanceof ClientEntity) === false) { -             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); -             throw new Exception\InvalidClientException(); -         } +         if (($client instanceof ClientEntity) === false) { +             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); +             throw new Exception\InvalidClientException(); +         }         // Validate any scopes that are in the request -         $scopeParam = $this->server->getRequest()->request->get('scope', ''); -         $scopes = $this->validateScopes($scopeParam, $client); +         $scopeParam = $this->server->getRequest()->request->get('scope', ''); +         $scopes = $this->validateScopes($scopeParam, $client);         // Create a new session -         $session = new SessionEntity($this->server); -         $session->setOwner('client', $client->getId()); -         $session->associateClient($client); +         $session = new SessionEntity($this->server); +         $session->setOwner('client', $client->getId()); +         $session->associateClient($client);         // Generate an access token -         $accessToken = new AccessTokenEntity($this->server); -         $accessToken->setId(SecureKey::generate()); -         $accessToken->setExpireTime($this->getAccessTokenTTL() + time()); +         $accessToken = new AccessTokenEntity($this->server); +         $accessToken->setId(SecureKey::generate()); +         $accessToken->setExpireTime($this->getAccessTokenTTL() + time());         // Associate scopes with the session and access token -         foreach ($scopes as $scope) { -             $session->associateScope($scope); -         } +         foreach ($scopes as $scope) { +             $session->associateScope($scope); +         } -         foreach ($session->getScopes() as $scope) { -             $accessToken->associateScope($scope); -         } +         foreach ($session->getScopes() as $scope) { +             $accessToken->associateScope($scope); +         }         // Save everything -         $session->save(); -         $accessToken->setSession($session); -         $accessToken->save(); +         $session->save(); +         $accessToken->setSession($session); +         $accessToken->save(); -         $this->server->getTokenType()->setSession($session); -         $this->server->getTokenType()->setParam('access_token', $accessToken->getId()); -         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); +         $this->server->getTokenType()->setSession($session); +         $this->server->getTokenType()->setParam('access_token', $accessToken->getId()); +         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); -         return $this->server->getTokenType()->generateResponse(); +         return $this->server->getTokenType()->generateResponse();     } } @@ -259,7 +259,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Grant/GrantTypeInterface.php.html b/master/Grant/GrantTypeInterface.php.html index dde8bd21..7f5d2b59 100644 --- a/master/Grant/GrantTypeInterface.php.html +++ b/master/Grant/GrantTypeInterface.php.html @@ -146,7 +146,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Grant/PasswordGrant.php.html b/master/Grant/PasswordGrant.php.html index cd5bdb77..f6965998 100644 --- a/master/Grant/PasswordGrant.php.html +++ b/master/Grant/PasswordGrant.php.html @@ -67,7 +67,7 @@
100.00%
-
55 / 55
+
62 / 62
@@ -96,7 +96,7 @@
100.00%
-
55 / 55
+
62 / 62
@@ -159,7 +159,7 @@
100.00%
-
50 / 50
+
57 / 57
@@ -230,8 +230,8 @@      */     public function setVerifyCredentialsCallback(callable $callback)     { -         $this->callback = $callback; -     } +         $this->callback = $callback; +     }     /**      * Return the callback function @@ -242,12 +242,12 @@      */     protected function getVerifyCredentialsCallback()     { -         if (is_null($this->callback) || !is_callable($this->callback)) { -             throw new Exception\ServerErrorException('Null or non-callable callback set on Password grant'); -         } +         if (is_null($this->callback) || !is_callable($this->callback)) { +             throw new Exception\ServerErrorException('Null or non-callable callback set on Password grant'); +         } -         return $this->callback; -     } +         return $this->callback; +     }     /**      * Complete the password grant @@ -259,94 +259,94 @@     public function completeFlow()     {         // Get the required params -         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); -         if (is_null($clientId)) { -             throw new Exception\InvalidRequestException('client_id'); -         } +         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); +         if (is_null($clientId)) { +             throw new Exception\InvalidRequestException('client_id'); +         } -         $clientSecret = $this->server->getRequest()->request->get('client_secret', -             $this->server->getRequest()->getPassword()); -         if (is_null($clientSecret)) { -             throw new Exception\InvalidRequestException('client_secret'); -         } +         $clientSecret = $this->server->getRequest()->request->get('client_secret', +             $this->server->getRequest()->getPassword()); +         if (is_null($clientSecret)) { +             throw new Exception\InvalidRequestException('client_secret'); +         }         // Validate client ID and client secret -         $client = $this->server->getClientStorage()->get( -             $clientId, -             $clientSecret, -             null, -             $this->getIdentifier() -         ); +         $client = $this->server->getClientStorage()->get( +             $clientId, +             $clientSecret, +             null, +             $this->getIdentifier() +         ); -         if (($client instanceof ClientEntity) === false) { -             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); -             throw new Exception\InvalidClientException(); -         } +         if (($client instanceof ClientEntity) === false) { +             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); +             throw new Exception\InvalidClientException(); +         } -         $username = $this->server->getRequest()->request->get('username', null); -         if (is_null($username)) { -             throw new Exception\InvalidRequestException('username'); -         } +         $username = $this->server->getRequest()->request->get('username', null); +         if (is_null($username)) { +             throw new Exception\InvalidRequestException('username'); +         } -         $password = $this->server->getRequest()->request->get('password', null); -         if (is_null($password)) { -             throw new Exception\InvalidRequestException('password'); -         } +         $password = $this->server->getRequest()->request->get('password', null); +         if (is_null($password)) { +             throw new Exception\InvalidRequestException('password'); +         }         // Check if user's username and password are correct -         $userId = call_user_func($this->getVerifyCredentialsCallback(), $username, $password); +         $userId = call_user_func($this->getVerifyCredentialsCallback(), $username, $password); -         if ($userId === false) { -             $this->server->getEventEmitter()->emit(new Event\UserAuthenticationFailedEvent($this->server->getRequest())); -             throw new Exception\InvalidCredentialsException(); -         } +         if ($userId === false) { +             $this->server->getEventEmitter()->emit(new Event\UserAuthenticationFailedEvent($this->server->getRequest())); +             throw new Exception\InvalidCredentialsException(); +         }         // Validate any scopes that are in the request -         $scopeParam = $this->server->getRequest()->request->get('scope', ''); -         $scopes = $this->validateScopes($scopeParam, $client); +         $scopeParam = $this->server->getRequest()->request->get('scope', ''); +         $scopes = $this->validateScopes($scopeParam, $client);         // Create a new session -         $session = new SessionEntity($this->server); -         $session->setOwner('user', $userId); -         $session->associateClient($client); +         $session = new SessionEntity($this->server); +         $session->setOwner('user', $userId); +         $session->associateClient($client);         // Generate an access token -         $accessToken = new AccessTokenEntity($this->server); -         $accessToken->setId(SecureKey::generate()); -         $accessToken->setExpireTime($this->getAccessTokenTTL() + time()); +         $accessToken = new AccessTokenEntity($this->server); +         $accessToken->setId(SecureKey::generate()); +         $accessToken->setExpireTime($this->getAccessTokenTTL() + time());         // Associate scopes with the session and access token -         foreach ($scopes as $scope) { -             $session->associateScope($scope); -         } +         foreach ($scopes as $scope) { +             $session->associateScope($scope); +         } -         foreach ($session->getScopes() as $scope) { -             $accessToken->associateScope($scope); -         } +         foreach ($session->getScopes() as $scope) { +             $accessToken->associateScope($scope); +         } -         $this->server->getTokenType()->setSession($session); -         $this->server->getTokenType()->setParam('access_token', $accessToken->getId()); -         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); +         $this->server->getTokenType()->setSession($session); +         $this->server->getTokenType()->setParam('access_token', $accessToken->getId()); +         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL());         // Associate a refresh token if set -         if ($this->server->hasGrantType('refresh_token')) { -             $refreshToken = new RefreshTokenEntity($this->server); -             $refreshToken->setId(SecureKey::generate()); -             $refreshToken->setExpireTime($this->server->getGrantType('refresh_token')->getRefreshTokenTTL() + time()); -             $this->server->getTokenType()->setParam('refresh_token', $refreshToken->getId()); -         } +         if ($this->server->hasGrantType('refresh_token')) { +             $refreshToken = new RefreshTokenEntity($this->server); +             $refreshToken->setId(SecureKey::generate()); +             $refreshToken->setExpireTime($this->server->getGrantType('refresh_token')->getRefreshTokenTTL() + time()); +             $this->server->getTokenType()->setParam('refresh_token', $refreshToken->getId()); +         }         // Save everything -         $session->save(); -         $accessToken->setSession($session); -         $accessToken->save(); +         $session->save(); +         $accessToken->setSession($session); +         $accessToken->save(); -         if ($this->server->hasGrantType('refresh_token')) { -             $refreshToken->setAccessToken($accessToken); -             $refreshToken->save(); -         } +         if ($this->server->hasGrantType('refresh_token')) { +             $refreshToken->setAccessToken($accessToken); +             $refreshToken->save(); +         } -         return $this->server->getTokenType()->generateResponse(); +         return $this->server->getTokenType()->generateResponse();     } } @@ -361,7 +361,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Grant/RefreshTokenGrant.php.html b/master/Grant/RefreshTokenGrant.php.html index 66f4cb7b..0f1ea672 100644 --- a/master/Grant/RefreshTokenGrant.php.html +++ b/master/Grant/RefreshTokenGrant.php.html @@ -67,7 +67,7 @@
100.00%
-
62 / 62
+
69 / 69
@@ -96,7 +96,7 @@
100.00%
-
62 / 62
+
69 / 69
@@ -243,7 +243,7 @@
100.00%
-
53 / 53
+
60 / 60
@@ -312,8 +312,8 @@      */     public function setRefreshTokenTTL($refreshTokenTTL)     { -         $this->refreshTokenTTL = $refreshTokenTTL; -     } +         $this->refreshTokenTTL = $refreshTokenTTL; +     }     /**      * Get the TTL of the refresh token @@ -322,7 +322,7 @@      */     public function getRefreshTokenTTL()     { -         return $this->refreshTokenTTL; +         return $this->refreshTokenTTL;     }     /** @@ -331,8 +331,8 @@      */     public function setRefreshTokenRotation($refreshTokenRotate = true)     { -         $this->refreshTokenRotate = $refreshTokenRotate; -     } +         $this->refreshTokenRotate = $refreshTokenRotate; +     }     /**      * Get rotation boolean of the refresh token @@ -341,8 +341,8 @@      */     public function shouldRotateRefreshTokens()     { -         return $this->refreshTokenRotate; -     } +         return $this->refreshTokenRotate; +     }     /**      * @@ -351,8 +351,8 @@      */     public function setRequireClientSecret($required)     { -         $this->requireClientSecret = $required; -     } +         $this->requireClientSecret = $required; +     }     /**      * True if client secret is required during @@ -362,8 +362,8 @@      */     public function shouldRequireClientSecret()     { -         return $this->requireClientSecret; -     } +         return $this->requireClientSecret; +     }     /** @@ -371,108 +371,108 @@      */     public function completeFlow()     { -         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); -         if (is_null($clientId)) { -             throw new Exception\InvalidRequestException('client_id'); -         } +         $clientId = $this->server->getRequest()->request->get('client_id', $this->server->getRequest()->getUser()); +         if (is_null($clientId)) { +             throw new Exception\InvalidRequestException('client_id'); +         } -         $clientSecret = $this->server->getRequest()->request->get('client_secret', -             $this->server->getRequest()->getPassword()); -         if ($this->shouldRequireClientSecret() && is_null($clientSecret)) { -             throw new Exception\InvalidRequestException('client_secret'); -         } +         $clientSecret = $this->server->getRequest()->request->get('client_secret', +             $this->server->getRequest()->getPassword()); +         if ($this->shouldRequireClientSecret() && is_null($clientSecret)) { +             throw new Exception\InvalidRequestException('client_secret'); +         }         // Validate client ID and client secret -         $client = $this->server->getClientStorage()->get( -             $clientId, -             $clientSecret, -             null, -             $this->getIdentifier() -         ); +         $client = $this->server->getClientStorage()->get( +             $clientId, +             $clientSecret, +             null, +             $this->getIdentifier() +         ); -         if (($client instanceof ClientEntity) === false) { -             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); -             throw new Exception\InvalidClientException(); -         } +         if (($client instanceof ClientEntity) === false) { +             $this->server->getEventEmitter()->emit(new Event\ClientAuthenticationFailedEvent($this->server->getRequest())); +             throw new Exception\InvalidClientException(); +         } -         $oldRefreshTokenParam = $this->server->getRequest()->request->get('refresh_token', null); -         if ($oldRefreshTokenParam === null) { -             throw new Exception\InvalidRequestException('refresh_token'); -         } +         $oldRefreshTokenParam = $this->server->getRequest()->request->get('refresh_token', null); +         if ($oldRefreshTokenParam === null) { +             throw new Exception\InvalidRequestException('refresh_token'); +         }         // Validate refresh token -         $oldRefreshToken = $this->server->getRefreshTokenStorage()->get($oldRefreshTokenParam); +         $oldRefreshToken = $this->server->getRefreshTokenStorage()->get($oldRefreshTokenParam); -         if (($oldRefreshToken instanceof RefreshTokenEntity) === false) { -             throw new Exception\InvalidRefreshException(); -         } +         if (($oldRefreshToken instanceof RefreshTokenEntity) === false) { +             throw new Exception\InvalidRefreshException(); +         }         // Ensure the old refresh token hasn't expired -         if ($oldRefreshToken->isExpired() === true) { -             throw new Exception\InvalidRefreshException(); -         } +         if ($oldRefreshToken->isExpired() === true) { +             throw new Exception\InvalidRefreshException(); +         } -         $oldAccessToken = $oldRefreshToken->getAccessToken(); +         $oldAccessToken = $oldRefreshToken->getAccessToken();         // Get the scopes for the original session -         $session = $oldAccessToken->getSession(); -         $scopes = $this->formatScopes($session->getScopes()); +         $session = $oldAccessToken->getSession(); +         $scopes = $this->formatScopes($session->getScopes());         // Get and validate any requested scopes -         $requestedScopesString = $this->server->getRequest()->request->get('scope', ''); -         $requestedScopes = $this->validateScopes($requestedScopesString, $client); +         $requestedScopesString = $this->server->getRequest()->request->get('scope', ''); +         $requestedScopes = $this->validateScopes($requestedScopesString, $client);         // If no new scopes are requested then give the access token the original session scopes -         if (count($requestedScopes) === 0) { -             $newScopes = $scopes; -         } else { +         if (count($requestedScopes) === 0) { +             $newScopes = $scopes; +         } else {             // The OAuth spec says that a refreshed access token can have the original scopes or fewer so ensure             //  the request doesn't include any new scopes -             foreach ($requestedScopes as $requestedScope) { -                 if (!isset($scopes[$requestedScope->getId()])) { -                     throw new Exception\InvalidScopeException($requestedScope->getId()); -                 } -             } +             foreach ($requestedScopes as $requestedScope) { +                 if (!isset($scopes[$requestedScope->getId()])) { +                     throw new Exception\InvalidScopeException($requestedScope->getId()); +                 } +             } -             $newScopes = $requestedScopes; +             $newScopes = $requestedScopes;         }         // Generate a new access token and assign it the correct sessions -         $newAccessToken = new AccessTokenEntity($this->server); -         $newAccessToken->setId(SecureKey::generate()); -         $newAccessToken->setExpireTime($this->getAccessTokenTTL() + time()); -         $newAccessToken->setSession($session); +         $newAccessToken = new AccessTokenEntity($this->server); +         $newAccessToken->setId(SecureKey::generate()); +         $newAccessToken->setExpireTime($this->getAccessTokenTTL() + time()); +         $newAccessToken->setSession($session); -         foreach ($newScopes as $newScope) { -             $newAccessToken->associateScope($newScope); -         } +         foreach ($newScopes as $newScope) { +             $newAccessToken->associateScope($newScope); +         }         // Expire the old token and save the new one -         $oldAccessToken->expire(); -         $newAccessToken->save(); +         $oldAccessToken->expire(); +         $newAccessToken->save(); -         $this->server->getTokenType()->setSession($session); -         $this->server->getTokenType()->setParam('access_token', $newAccessToken->getId()); -         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); +         $this->server->getTokenType()->setSession($session); +         $this->server->getTokenType()->setParam('access_token', $newAccessToken->getId()); +         $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); -         if ($this->shouldRotateRefreshTokens()) { +         if ($this->shouldRotateRefreshTokens()) {             // Expire the old refresh token -             $oldRefreshToken->expire(); +             $oldRefreshToken->expire();             // Generate a new refresh token -             $newRefreshToken = new RefreshTokenEntity($this->server); -             $newRefreshToken->setId(SecureKey::generate()); -             $newRefreshToken->setExpireTime($this->getRefreshTokenTTL() + time()); -             $newRefreshToken->setAccessToken($newAccessToken); -             $newRefreshToken->save(); +             $newRefreshToken = new RefreshTokenEntity($this->server); +             $newRefreshToken->setId(SecureKey::generate()); +             $newRefreshToken->setExpireTime($this->getRefreshTokenTTL() + time()); +             $newRefreshToken->setAccessToken($newAccessToken); +             $newRefreshToken->save(); -             $this->server->getTokenType()->setParam('refresh_token', $newRefreshToken->getId()); -         } else { -             $this->server->getTokenType()->setParam('refresh_token', $oldRefreshToken->getId()); +             $this->server->getTokenType()->setParam('refresh_token', $newRefreshToken->getId()); +         } else { +             $this->server->getTokenType()->setParam('refresh_token', $oldRefreshToken->getId());         } -         return $this->server->getTokenType()->generateResponse(); -     } +         return $this->server->getTokenType()->generateResponse(); +     } } @@ -486,7 +486,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Grant/dashboard.html b/master/Grant/dashboard.html index 9b6f7f4e..75a9eadd 100644 --- a/master/Grant/dashboard.html +++ b/master/Grant/dashboard.html @@ -112,6 +112,7 @@ + setRequireClientSecret0% @@ -137,7 +138,7 @@
@@ -158,7 +159,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,5], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,1,4], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -176,7 +177,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,25], "Method Coverage")) + .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,0,0,0,24], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -226,7 +227,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,21,"AbstractGrant<\/a>"],[100,28,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,19,"RefreshTokenGrant<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,21,"AbstractGrant<\/a>"],[98.148148148148,28,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,19,"RefreshTokenGrant<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -250,7 +251,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[100,1,"AuthCodeGrant::setRequireClientSecret<\/a>"],[100,1,"AuthCodeGrant::shouldRequireClientSecret<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,15,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenRotation<\/a>"],[100,1,"RefreshTokenGrant::shouldRotateRefreshTokens<\/a>"],[100,1,"RefreshTokenGrant::setRequireClientSecret<\/a>"],[100,1,"RefreshTokenGrant::shouldRequireClientSecret<\/a>"],[100,13,"RefreshTokenGrant::completeFlow<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[0,1,"AuthCodeGrant::setRequireClientSecret<\/a>"],[100,1,"AuthCodeGrant::shouldRequireClientSecret<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,15,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenRotation<\/a>"],[100,1,"RefreshTokenGrant::shouldRotateRefreshTokens<\/a>"],[100,1,"RefreshTokenGrant::setRequireClientSecret<\/a>"],[100,1,"RefreshTokenGrant::shouldRequireClientSecret<\/a>"],[100,13,"RefreshTokenGrant::completeFlow<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/Grant/index.html b/master/Grant/index.html index d47e551d..126fed0e 100644 --- a/master/Grant/index.html +++ b/master/Grant/index.html @@ -44,29 +44,29 @@ Total
-
- 100.00% covered (success) +
+ 99.38% covered (success)
-
100.00%
-
281 / 281
+
99.38%
+
322 / 324
-
- 100.00% covered (success) +
+ 96.00% covered (success)
-
100.00%
-
24 / 24
-
-
- 100.00% covered (success) +
96.00%
+
24 / 25
+
+
+ 80.00% covered (warning)
-
100.00%
-
5 / 5
+
80.00%
+
4 / 5
@@ -78,7 +78,7 @@
100.00%
-
38 / 38
+
48 / 48
100.00% covered (success) @@ -100,29 +100,29 @@ AuthCodeGrant.php
-
- 100.00% covered (success) +
+ 98.15% covered (success)
-
100.00%
-
94 / 94
-
-
- 100.00% covered (success) +
98.15%
+
106 / 108
+
+
+ 83.33% covered (warning)
-
100.00%
-
5 / 5
-
-
- 100.00% covered (success) +
83.33%
+
5 / 6
+
+
+ 0.00% covered (danger)
-
100.00%
-
1 / 1
+
0.00%
+
0 / 1
@@ -134,7 +134,7 @@
100.00%
-
32 / 32
+
37 / 37
100.00% covered (success) @@ -190,7 +190,7 @@
100.00%
-
55 / 55
+
62 / 62
100.00% covered (success) @@ -218,7 +218,7 @@
100.00%
-
62 / 62
+
69 / 69
100.00% covered (success) @@ -249,7 +249,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/ResourceServer.php.html b/master/ResourceServer.php.html index 484577c3..34dcff22 100644 --- a/master/ResourceServer.php.html +++ b/master/ResourceServer.php.html @@ -66,7 +66,7 @@
100.00%
-
27 / 27
+
29 / 29
@@ -95,7 +95,7 @@
100.00%
-
27 / 27
+
29 / 29
@@ -205,7 +205,7 @@
100.00%
-
8 / 8
+
10 / 10
@@ -271,17 +271,17 @@         ClientInterface $clientStorage,         ScopeInterface $scopeStorage     ) { -         $this->setSessionStorage($sessionStorage); -         $this->setAccessTokenStorage($accessTokenStorage); -         $this->setClientStorage($clientStorage); -         $this->setScopeStorage($scopeStorage); +         $this->setSessionStorage($sessionStorage); +         $this->setAccessTokenStorage($accessTokenStorage); +         $this->setClientStorage($clientStorage); +         $this->setScopeStorage($scopeStorage);         // Set Bearer as the default token type -         $this->setTokenType(new Bearer()); +         $this->setTokenType(new Bearer()); -         parent::__construct(); +         parent::__construct(); -         return $this; +         return $this;     }     /** @@ -293,10 +293,10 @@      */     public function setIdKey($key)     { -         $this->tokenKey = $key; +         $this->tokenKey = $key; -         return $this; -     } +         return $this; +     }     /**      * Gets the access token @@ -305,8 +305,8 @@      */     public function getAccessToken()     { -         return $this->accessToken; -     } +         return $this->accessToken; +     }     /**      * Checks if the access token is valid or not @@ -321,26 +321,26 @@      */     public function isValidRequest($headerOnly = true, $accessToken = null)     { -         $accessTokenString = ($accessToken !== null) -                                 ? $accessToken -                                 : $this->determineAccessToken($headerOnly); +         $accessTokenString = ($accessToken !== null) +                                 ? $accessToken +                                 : $this->determineAccessToken($headerOnly);         // Set the access token -         $this->accessToken = $this->getAccessTokenStorage()->get($accessTokenString); +         $this->accessToken = $this->getAccessTokenStorage()->get($accessTokenString);         // Ensure the access token exists -         if (!$this->accessToken instanceof AccessTokenEntity) { -             throw new AccessDeniedException(); -         } +         if (!$this->accessToken instanceof AccessTokenEntity) { +             throw new AccessDeniedException(); +         }         // Check the access token hasn't expired         // Ensure the auth code hasn't expired -         if ($this->accessToken->isExpired() === true) { -             throw new AccessDeniedException(); -         } +         if ($this->accessToken->isExpired() === true) { +             throw new AccessDeniedException(); +         } -         return true; -     } +         return true; +     }     /**      * Reads in the access token from the headers @@ -353,20 +353,20 @@      */     public function determineAccessToken($headerOnly = false)     { -         if ($this->getRequest()->headers->get('Authorization') !== null) { -             $accessToken = $this->getTokenType()->determineAccessTokenInHeader($this->getRequest()); -         } elseif ($headerOnly === false && (! $this->getTokenType() instanceof MAC)) { -             $accessToken = ($this->getRequest()->server->get('REQUEST_METHOD') === 'GET') -                                 ? $this->getRequest()->query->get($this->tokenKey) -                                 : $this->getRequest()->request->get($this->tokenKey); -         } +         if ($this->getRequest()->headers->get('Authorization') !== null) { +             $accessToken = $this->getTokenType()->determineAccessTokenInHeader($this->getRequest()); +         } elseif ($headerOnly === false && (! $this->getTokenType() instanceof MAC)) { +             $accessToken = ($this->getRequest()->server->get('REQUEST_METHOD') === 'GET') +                                 ? $this->getRequest()->query->get($this->tokenKey) +                                 : $this->getRequest()->request->get($this->tokenKey); +         } -         if (empty($accessToken)) { -             throw new InvalidRequestException('access token'); -         } +         if (empty($accessToken)) { +             throw new InvalidRequestException('access token'); +         } -         return $accessToken; -     } +         return $accessToken; +     } } @@ -380,7 +380,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/AbstractStorage.php.html b/master/Storage/AbstractStorage.php.html index d8d4cb4a..8c6d3611 100644 --- a/master/Storage/AbstractStorage.php.html +++ b/master/Storage/AbstractStorage.php.html @@ -182,9 +182,9 @@      */     public function setServer(AbstractServer $server)     { -         $this->server = $server; +         $this->server = $server; -         return $this; +         return $this;     }     /** @@ -194,7 +194,7 @@      */     protected function getServer()     { -         return $this->server; +         return $this->server;     } } @@ -209,7 +209,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/AccessTokenInterface.php.html b/master/Storage/AccessTokenInterface.php.html index d51fde19..9c9586e8 100644 --- a/master/Storage/AccessTokenInterface.php.html +++ b/master/Storage/AccessTokenInterface.php.html @@ -156,7 +156,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/AuthCodeInterface.php.html b/master/Storage/AuthCodeInterface.php.html index 008f61b9..50d7fb32 100644 --- a/master/Storage/AuthCodeInterface.php.html +++ b/master/Storage/AuthCodeInterface.php.html @@ -157,7 +157,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/ClientInterface.php.html b/master/Storage/ClientInterface.php.html index c914f78f..b0ceb55a 100644 --- a/master/Storage/ClientInterface.php.html +++ b/master/Storage/ClientInterface.php.html @@ -128,7 +128,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/MacTokenInterface.php.html b/master/Storage/MacTokenInterface.php.html index 1beac895..56d1c77b 100644 --- a/master/Storage/MacTokenInterface.php.html +++ b/master/Storage/MacTokenInterface.php.html @@ -121,7 +121,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/RefreshTokenInterface.php.html b/master/Storage/RefreshTokenInterface.php.html index f4651a1b..874f8dcd 100644 --- a/master/Storage/RefreshTokenInterface.php.html +++ b/master/Storage/RefreshTokenInterface.php.html @@ -136,7 +136,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/ScopeInterface.php.html b/master/Storage/ScopeInterface.php.html index ca28fe24..8027dca1 100644 --- a/master/Storage/ScopeInterface.php.html +++ b/master/Storage/ScopeInterface.php.html @@ -116,7 +116,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/SessionInterface.php.html b/master/Storage/SessionInterface.php.html index c494dc39..40b4e32d 100644 --- a/master/Storage/SessionInterface.php.html +++ b/master/Storage/SessionInterface.php.html @@ -159,7 +159,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/StorageInterface.php.html b/master/Storage/StorageInterface.php.html index 9f587991..df546383 100644 --- a/master/Storage/StorageInterface.php.html +++ b/master/Storage/StorageInterface.php.html @@ -114,7 +114,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Storage/dashboard.html b/master/Storage/dashboard.html index 77d16b88..c4093421 100644 --- a/master/Storage/dashboard.html +++ b/master/Storage/dashboard.html @@ -137,7 +137,7 @@
diff --git a/master/Storage/index.html b/master/Storage/index.html index 2f21b86f..7f26a24c 100644 --- a/master/Storage/index.html +++ b/master/Storage/index.html @@ -333,7 +333,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/TokenType/AbstractTokenType.php.html b/master/TokenType/AbstractTokenType.php.html index e6216fe5..5b683b64 100644 --- a/master/TokenType/AbstractTokenType.php.html +++ b/master/TokenType/AbstractTokenType.php.html @@ -232,9 +232,9 @@      */     public function setServer(AbstractServer $server)     { -         $this->server = $server; +         $this->server = $server; -         return $this; +         return $this;     }     /** @@ -242,9 +242,9 @@      */     public function setSession(SessionEntity $session)     { -         $this->session = $session; +         $this->session = $session; -         return $this; +         return $this;     }     /** @@ -252,15 +252,15 @@      */     public function setParam($key, $value)     { -         $this->response[$key] = $value; -     } +         $this->response[$key] = $value; +     }     /**      * {@inheritdoc}      */     public function getParam($key)     { -         return isset($this->response[$key]) ? $this->response[$key] : null; +         return isset($this->response[$key]) ? $this->response[$key] : null;     } } @@ -275,7 +275,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/TokenType/Bearer.php.html b/master/TokenType/Bearer.php.html index f61a4b79..f6119e5d 100644 --- a/master/TokenType/Bearer.php.html +++ b/master/TokenType/Bearer.php.html @@ -61,13 +61,13 @@
1 / 2
CRAP
-
- 83.33% covered (warning) +
+ 85.71% covered (warning)
-
83.33%
-
10 / 12
+
85.71%
+
12 / 14
@@ -88,15 +88,15 @@
50.00%
1 / 2
- 5.12 + 5.07
-
- 83.33% covered (warning) +
+ 85.71% covered (warning)
-
83.33%
-
10 / 12
+
85.71%
+
12 / 14
@@ -117,7 +117,7 @@
100.00%
-
6 / 6
+
8 / 8
@@ -169,16 +169,16 @@     public function generateResponse()     {         $return = [ -             'access_token'  =>  $this->getParam('access_token'), -             'token_type'    =>  'Bearer', -             'expires_in'    =>  $this->getParam('expires_in'), -         ]; +             'access_token'  =>  $this->getParam('access_token'), +             'token_type'    =>  'Bearer', +             'expires_in'    =>  $this->getParam('expires_in'), +         ]; -         if (!is_null($this->getParam('refresh_token'))) { -             $return['refresh_token'] = $this->getParam('refresh_token'); -         } +         if (!is_null($this->getParam('refresh_token'))) { +             $return['refresh_token'] = $this->getParam('refresh_token'); +         } -         return $return; +         return $return;     }     /** @@ -186,17 +186,17 @@      */     public function determineAccessTokenInHeader(Request $request)     { -         if ($request->headers->has('Authorization') === false) { +         if ($request->headers->has('Authorization') === false) {             return; -         } +         } -         $header = $request->headers->get('Authorization'); +         $header = $request->headers->get('Authorization'); -         if (substr($header, 0, 7) !== 'Bearer ') { +         if (substr($header, 0, 7) !== 'Bearer ') {             return; -         } +         } -         return trim(substr($header, 7)); +         return trim(substr($header, 7));     } } @@ -211,7 +211,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/TokenType/MAC.php.html b/master/TokenType/MAC.php.html index cfb2dbdc..1e4589fe 100644 --- a/master/TokenType/MAC.php.html +++ b/master/TokenType/MAC.php.html @@ -60,14 +60,14 @@
50.00%
2 / 4
CRAP -
-
- 84.48% covered (warning) +
+
+ 93.94% covered (success)
-
84.48%
-
49 / 58
+
93.94%
+
62 / 66
@@ -88,15 +88,15 @@
50.00%
2 / 4
- 23.81 -
-
- 84.48% covered (warning) + 22.11 +
+
+ 93.94% covered (success)
-
84.48%
-
49 / 58
+
93.94%
+
62 / 66
@@ -109,15 +109,15 @@
0.00%
0 / 1
- 2.00 -
-
- 90.00% covered (success) + 2.02 +
+
+ 83.33% covered (warning)
-
90.00%
-
9 / 10
+
83.33%
+
10 / 12
@@ -172,15 +172,15 @@
0.00%
0 / 1
- 11.53 -
-
- 22.22% covered (danger) + 4.02 +
+
+ 90.00% covered (success)
-
22.22%
-
2 / 9
+
90.00%
+
9 / 10
@@ -215,22 +215,22 @@      */     public function generateResponse()     { -         $macKey = SecureKey::generate(); -         $this->server->getMacStorage()->create($macKey, $this->getParam('access_token')); +         $macKey = SecureKey::generate(); +         $this->server->getMacStorage()->create($macKey, $this->getParam('access_token'));         $response = [ -             'access_token'  =>  $this->getParam('access_token'), -             'token_type'    =>  'mac', -             'expires_in'    =>  $this->getParam('expires_in'), -             'mac_key'       =>  $macKey, -             'mac_algorithm' =>  'hmac-sha-256', -         ]; +             'access_token'  =>  $this->getParam('access_token'), +             'token_type'    =>  'mac', +             'expires_in'    =>  $this->getParam('expires_in'), +             'mac_key'       =>  $macKey, +             'mac_algorithm' =>  'hmac-sha-256', +         ]; -         if (!is_null($this->getParam('refresh_token'))) { +         if (!is_null($this->getParam('refresh_token'))) {             $response['refresh_token'] = $this->getParam('refresh_token'); -         } +         } -         return $response; +         return $response;     }     /** @@ -238,24 +238,24 @@      */     public function determineAccessTokenInHeader(Request $request)     { -         if ($request->headers->has('Authorization') === false) { -             return; -         } +         if ($request->headers->has('Authorization') === false) { +             return; +         } -         $header = $request->headers->get('Authorization'); +         $header = $request->headers->get('Authorization'); -         if (substr($header, 0, 4) !== 'MAC ') { -             return; -         } +         if (substr($header, 0, 4) !== 'MAC ') { +             return; +         }         // Find all the parameters expressed in the header -         $paramsRaw = explode(',', substr($header, 4)); -         $params = new ParameterBag(); +         $paramsRaw = explode(',', substr($header, 4)); +         $params = new ParameterBag();         array_map(function ($param) use (&$params) { -             $param = trim($param); +             $param = trim($param); -             preg_match_all('/([a-zA-Z]*)="([\w=\/+]*)"/', $param, $matches); +             preg_match_all('/([a-zA-Z]*)="([\w=\/+]*)"/', $param, $matches);             // @codeCoverageIgnoreStart             if (count($matches) !== 3) { @@ -263,62 +263,62 @@             }             // @codeCoverageIgnoreEnd -             $key = reset($matches[1]); -             $value = trim(reset($matches[2])); +             $key = reset($matches[1]); +             $value = trim(reset($matches[2])); -             if (empty($value)) { -                 return; -             } +             if (empty($value)) { +                 return; +             } -             $params->set($key, $value); -         }, $paramsRaw); +             $params->set($key, $value); +         }, $paramsRaw);         // Validate parameters -         if ($params->has('id') === false || $params->has('ts') === false || $params->has('nonce') === false || $params->has('mac') === false) { -             return; -         } +         if ($params->has('id') === false || $params->has('ts') === false || $params->has('nonce') === false || $params->has('mac') === false) { +             return; +         } -         if (abs($params->get('ts') - time()) > 300) { +         if (abs($params->get('ts') - time()) > 300) {             return; -         } +         } -         $accessToken = $params->get('id'); -         $timestamp = (int) $params->get('ts'); -         $nonce = $params->get('nonce'); -         $signature = $params->get('mac'); +         $accessToken = $params->get('id'); +         $timestamp = (int) $params->get('ts'); +         $nonce = $params->get('nonce'); +         $signature = $params->get('mac');         // Try to find the MAC key for the access token -         $macKey = $this->server->getMacStorage()->getByAccessToken($accessToken); +         $macKey = $this->server->getMacStorage()->getByAccessToken($accessToken); -         if ($macKey === null) { -             return; -         } +         if ($macKey === null) { +             return; +         }         // Calculate and compare the signature         $calculatedSignatureParts = [ -             $timestamp, -             $nonce, -             strtoupper($request->getMethod()), -             $request->getRequestUri(), -             $request->getHost(), -             $request->getPort(), -         ]; +             $timestamp, +             $nonce, +             strtoupper($request->getMethod()), +             $request->getRequestUri(), +             $request->getHost(), +             $request->getPort(), +         ]; -         if ($params->has('ext')) { -             $calculatedSignatureParts[] = $params->get('ext'); -         } +         if ($params->has('ext')) { +             $calculatedSignatureParts[] = $params->get('ext'); +         } -         $calculatedSignature = base64_encode( -             hash_hmac( -                 'sha256', -                 implode("\n", $calculatedSignatureParts), -                 $macKey, -                 true  // raw_output: outputs raw binary data -             ) -         ); +         $calculatedSignature = base64_encode( +             hash_hmac( +                 'sha256', +                 implode("\n", $calculatedSignatureParts), +                 $macKey, +                 true  // raw_output: outputs raw binary data +             ) +         );         // Return the access token if the signature matches -         return ($this->hash_equals($calculatedSignature, $signature)) ? $accessToken : null; +         return ($this->hash_equals($calculatedSignature, $signature)) ? $accessToken : null;     }     /** @@ -329,19 +329,19 @@      */     private function hash_equals($knownString, $userString)     { -         if (function_exists('\hash_equals')) { -             return \hash_equals($knownString, $userString); -         } -         if (strlen($knownString) !== strlen($userString)) { -             return false; -         } -         $len = strlen($knownString); -         $result = 0; -         for ($i = 0; $i < $len; $i++) { -             $result |= (ord($knownString[$i]) ^ ord($userString[$i])); -         } +         if (function_exists('\hash_equals')) { +             return \hash_equals($knownString, $userString); +         } +         if (strlen($knownString) !== strlen($userString)) { +             return false; +         } +         $len = strlen($knownString); +         $result = 0; +         for ($i = 0; $i < $len; $i++) { +             $result |= (ord($knownString[$i]) ^ ord($userString[$i])); +         }         // They are only identical strings if $result is exactly 0... -         return 0 === $result; +         return 0 === $result;     } } @@ -356,7 +356,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/TokenType/TokenTypeInterface.php.html b/master/TokenType/TokenTypeInterface.php.html index e6209e21..b95439c7 100644 --- a/master/TokenType/TokenTypeInterface.php.html +++ b/master/TokenType/TokenTypeInterface.php.html @@ -155,7 +155,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/TokenType/dashboard.html b/master/TokenType/dashboard.html index 8142dd8a..18e78085 100644 --- a/master/TokenType/dashboard.html +++ b/master/TokenType/dashboard.html @@ -59,8 +59,7 @@ - Bearer83% - MAC84% + Bearer85% @@ -77,7 +76,6 @@ - MAC23 Bearer5 @@ -116,8 +114,8 @@ - hash_equals22% determineAccessTokenInHeader66% + generateResponse83% @@ -134,8 +132,8 @@ - hash_equals11 determineAccessTokenInHeader3 + generateResponse2 @@ -145,7 +143,7 @@
@@ -166,7 +164,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,2,0,1], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,1,1,1], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -184,7 +182,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,1,0,0,0,1,0,0,1,7], "Method Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,1,0,1,1,7], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -234,7 +232,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,5,"AbstractTokenType<\/a>"],[83.333333333333,5,"Bearer<\/a>"],[84.48275862069,22,"MAC<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,5,"AbstractTokenType<\/a>"],[85.714285714286,5,"Bearer<\/a>"],[93.939393939394,22,"MAC<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -258,7 +256,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[66.666666666667,3,"Bearer::determineAccessTokenInHeader<\/a>"],[90,2,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[22.222222222222,4,"MAC::hash_equals<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[66.666666666667,3,"Bearer::determineAccessTokenInHeader<\/a>"],[83.333333333333,2,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[90,4,"MAC::hash_equals<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/TokenType/index.html b/master/TokenType/index.html index dd575a5f..842d95fa 100644 --- a/master/TokenType/index.html +++ b/master/TokenType/index.html @@ -42,15 +42,15 @@ - Total -
-
- 85.71% covered (warning) + Total +
+
+ 93.10% covered (success)
-
85.71%
-
66 / 77
+
93.10%
+
81 / 87
70.00% covered (warning) @@ -100,13 +100,13 @@ Bearer.php
-
- 83.33% covered (warning) +
+ 85.71% covered (warning)
-
83.33%
-
10 / 12
+
85.71%
+
12 / 14
50.00% covered (danger) @@ -126,15 +126,15 @@ - MAC.php -
-
- 84.48% covered (warning) + MAC.php +
+
+ 93.94% covered (success)
-
84.48%
-
49 / 58
+
93.94%
+
62 / 66
50.00% covered (danger) @@ -193,7 +193,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html b/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html index 9dc04d4a..c22c5244 100644 --- a/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html +++ b/master/Util/KeyAlgorithm/DefaultAlgorithm.php.html @@ -146,20 +146,20 @@      */     public function generate($len = 40)     { -         $stripped = ''; +         $stripped = '';         do { -             $bytes = openssl_random_pseudo_bytes($len, $strong); +             $bytes = openssl_random_pseudo_bytes($len, $strong);             // We want to stop execution if the key fails because, well, that is bad. -             if ($bytes === false || $strong === false) { +             if ($bytes === false || $strong === false) {                 // @codeCoverageIgnoreStart                 throw new \Exception('Error Generating Key');                 // @codeCoverageIgnoreEnd -             } -             $stripped .= str_replace(['/', '+', '='], '', base64_encode($bytes)); -         } while (strlen($stripped) < $len); +             } +             $stripped .= str_replace(['/', '+', '='], '', base64_encode($bytes)); +         } while (strlen($stripped) < $len); -         return substr($stripped, 0, $len); +         return substr($stripped, 0, $len);     } } @@ -174,7 +174,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html b/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html index dcbd54fa..816c87ff 100644 --- a/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html +++ b/master/Util/KeyAlgorithm/KeyAlgorithmInterface.php.html @@ -112,7 +112,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Util/KeyAlgorithm/dashboard.html b/master/Util/KeyAlgorithm/dashboard.html index 2013fd46..799137db 100644 --- a/master/Util/KeyAlgorithm/dashboard.html +++ b/master/Util/KeyAlgorithm/dashboard.html @@ -138,7 +138,7 @@
diff --git a/master/Util/KeyAlgorithm/index.html b/master/Util/KeyAlgorithm/index.html index 624396c5..3b534243 100644 --- a/master/Util/KeyAlgorithm/index.html +++ b/master/Util/KeyAlgorithm/index.html @@ -138,7 +138,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Util/RedirectUri.php.html b/master/Util/RedirectUri.php.html index cf9b459d..e0fd4b25 100644 --- a/master/Util/RedirectUri.php.html +++ b/master/Util/RedirectUri.php.html @@ -154,9 +154,9 @@      */     public static function make($uri, $params = [], $queryDelimeter = '?')     { -         $uri .= (strstr($uri, $queryDelimeter) === false) ? $queryDelimeter : '&'; +         $uri .= (strstr($uri, $queryDelimeter) === false) ? $queryDelimeter : '&'; -         return $uri.http_build_query($params); +         return $uri.http_build_query($params);     } } @@ -171,7 +171,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Util/SecureKey.php.html b/master/Util/SecureKey.php.html index 70758dde..cd44039b 100644 --- a/master/Util/SecureKey.php.html +++ b/master/Util/SecureKey.php.html @@ -67,7 +67,7 @@
100.00%
-
6 / 6
+
7 / 7
@@ -96,7 +96,7 @@
100.00%
-
6 / 6
+
7 / 7
@@ -159,7 +159,7 @@
100.00%
-
3 / 3
+
4 / 4
@@ -199,7 +199,7 @@      */     public static function generate($len = 40)     { -         return self::getAlgorithm()->generate($len); +         return self::getAlgorithm()->generate($len);     }     /** @@ -207,19 +207,19 @@      */     public static function setAlgorithm(KeyAlgorithmInterface $algorithm)     { -         self::$algorithm = $algorithm; -     } +         self::$algorithm = $algorithm; +     }     /**      * @return KeyAlgorithmInterface      */     public static function getAlgorithm()     { -         if (is_null(self::$algorithm)) { -             self::$algorithm = new DefaultAlgorithm(); -         } +         if (is_null(self::$algorithm)) { +             self::$algorithm = new DefaultAlgorithm(); +         } -         return self::$algorithm; +         return self::$algorithm;     } } @@ -234,7 +234,7 @@ Dead Code

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/Util/dashboard.html b/master/Util/dashboard.html index 39cd107b..ad9c9287 100644 --- a/master/Util/dashboard.html +++ b/master/Util/dashboard.html @@ -137,7 +137,7 @@
diff --git a/master/Util/index.html b/master/Util/index.html index 77a7633f..eee30743 100644 --- a/master/Util/index.html +++ b/master/Util/index.html @@ -50,7 +50,7 @@
100.00%
-
14 / 14
+
15 / 15
100.00% covered (success) @@ -134,7 +134,7 @@
100.00%
-
6 / 6
+
7 / 7
100.00% covered (success) @@ -165,7 +165,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.

diff --git a/master/dashboard.html b/master/dashboard.html index 6be2d52a..be608753 100644 --- a/master/dashboard.html +++ b/master/dashboard.html @@ -58,9 +58,10 @@ - OAuthException78% - Bearer83% - MAC84% + UserAuthenticationFailedEvent75% + ClientAuthenticationFailedEvent75% + AccessTokenEntity84% + Bearer85% @@ -77,8 +78,7 @@ - MAC23 - OAuthException19 + AccessTokenEntity9 Bearer5 @@ -117,11 +117,14 @@ + setRequireClientSecret0% getParameter0% - hash_equals22% + getRequest0% + getRequest0% + hasScope0% determineAccessTokenInHeader66% - getHttpHeaders73% - formatScopes85% + generateResponse83% + formatScopes88% @@ -138,10 +141,10 @@ - getHttpHeaders14 - hash_equals11 + hasScope6 formatScopes4 determineAccessTokenInHeader3 + generateResponse2 @@ -151,7 +154,7 @@
@@ -172,7 +175,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,1,2,1,34], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,2,2,4,30], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -190,7 +193,7 @@ $(document).ready(function() { .yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([1,0,0,1,0,0,0,1,1,1,1,158], "Method Coverage")) + .datum(getCoverageDistributionData([5,0,0,0,0,0,0,1,0,2,1,155], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -240,7 +243,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,24,"AbstractServer<\/a>"],[100,21,"AuthorizationServer<\/a>"],[95.833333333333,18,"AbstractTokenEntity<\/a>"],[100,9,"AccessTokenEntity<\/a>"],[100,11,"AuthCodeEntity<\/a>"],[100,5,"ClientEntity<\/a>"],[100,6,"RefreshTokenEntity<\/a>"],[100,4,"ScopeEntity<\/a>"],[100,23,"SessionEntity<\/a>"],[100,3,"ClientAuthenticationFailedEvent<\/a>"],[100,3,"SessionOwnerEvent<\/a>"],[100,3,"UserAuthenticationFailedEvent<\/a>"],[100,1,"AccessDeniedException<\/a>"],[100,1,"InvalidClientException<\/a>"],[100,1,"InvalidCredentialsException<\/a>"],[100,1,"InvalidGrantException<\/a>"],[100,1,"InvalidRefreshException<\/a>"],[100,1,"InvalidRequestException<\/a>"],[100,1,"InvalidScopeException<\/a>"],[78.260869565217,17,"OAuthException<\/a>"],[100,2,"ServerErrorException<\/a>"],[100,1,"UnauthorizedClientException<\/a>"],[100,1,"UnsupportedGrantTypeException<\/a>"],[100,1,"UnsupportedResponseTypeException<\/a>"],[100,21,"AbstractGrant<\/a>"],[100,28,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,19,"RefreshTokenGrant<\/a>"],[100,13,"ResourceServer<\/a>"],[100,2,"AbstractStorage<\/a>"],[100,5,"AbstractTokenType<\/a>"],[83.333333333333,5,"Bearer<\/a>"],[84.48275862069,22,"MAC<\/a>"],[100,4,"DefaultAlgorithm<\/a>"],[100,2,"RedirectUri<\/a>"],[100,4,"SecureKey<\/a>"],[100,3,"EntityTrait<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,24,"AbstractServer<\/a>"],[100,21,"AuthorizationServer<\/a>"],[96.296296296296,18,"AbstractTokenEntity<\/a>"],[84,9,"AccessTokenEntity<\/a>"],[100,11,"AuthCodeEntity<\/a>"],[100,5,"ClientEntity<\/a>"],[100,6,"RefreshTokenEntity<\/a>"],[100,4,"ScopeEntity<\/a>"],[100,23,"SessionEntity<\/a>"],[75,3,"ClientAuthenticationFailedEvent<\/a>"],[100,3,"SessionOwnerEvent<\/a>"],[75,3,"UserAuthenticationFailedEvent<\/a>"],[100,1,"AccessDeniedException<\/a>"],[100,1,"InvalidClientException<\/a>"],[100,1,"InvalidCredentialsException<\/a>"],[100,1,"InvalidGrantException<\/a>"],[100,1,"InvalidRefreshException<\/a>"],[100,1,"InvalidRequestException<\/a>"],[100,1,"InvalidScopeException<\/a>"],[96.153846153846,17,"OAuthException<\/a>"],[100,2,"ServerErrorException<\/a>"],[100,1,"UnauthorizedClientException<\/a>"],[100,1,"UnsupportedGrantTypeException<\/a>"],[100,1,"UnsupportedResponseTypeException<\/a>"],[100,21,"AbstractGrant<\/a>"],[98.148148148148,28,"AuthCodeGrant<\/a>"],[100,6,"ClientCredentialsGrant<\/a>"],[100,15,"PasswordGrant<\/a>"],[100,19,"RefreshTokenGrant<\/a>"],[100,13,"ResourceServer<\/a>"],[100,2,"AbstractStorage<\/a>"],[100,5,"AbstractTokenType<\/a>"],[85.714285714286,5,"Bearer<\/a>"],[93.939393939394,22,"MAC<\/a>"],[100,4,"DefaultAlgorithm<\/a>"],[100,2,"RedirectUri<\/a>"],[100,4,"SecureKey<\/a>"],[100,3,"EntityTrait<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -264,7 +267,7 @@ $(document).ready(function() { chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"AbstractServer::__construct<\/a>"],[100,2,"AbstractServer::setEventEmitter<\/a>"],[100,1,"AbstractServer::addEventListener<\/a>"],[100,1,"AbstractServer::getEventEmitter<\/a>"],[100,1,"AbstractServer::setRequest<\/a>"],[100,2,"AbstractServer::getRequest<\/a>"],[100,1,"AbstractServer::setClientStorage<\/a>"],[100,1,"AbstractServer::setSessionStorage<\/a>"],[100,1,"AbstractServer::setAccessTokenStorage<\/a>"],[100,1,"AbstractServer::setRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::setAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setScopeStorage<\/a>"],[100,1,"AbstractServer::getClientStorage<\/a>"],[100,1,"AbstractServer::getScopeStorage<\/a>"],[100,1,"AbstractServer::getSessionStorage<\/a>"],[100,1,"AbstractServer::getRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::getAccessTokenStorage<\/a>"],[100,1,"AbstractServer::getAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setTokenType<\/a>"],[100,1,"AbstractServer::getTokenType<\/a>"],[100,1,"AbstractServer::getMacStorage<\/a>"],[100,1,"AbstractServer::setMacStorage<\/a>"],[100,1,"AuthorizationServer::__construct<\/a>"],[100,3,"AuthorizationServer::addGrantType<\/a>"],[100,1,"AuthorizationServer::hasGrantType<\/a>"],[100,1,"AuthorizationServer::getResponseTypes<\/a>"],[100,1,"AuthorizationServer::requireScopeParam<\/a>"],[100,1,"AuthorizationServer::scopeParamRequired<\/a>"],[100,1,"AuthorizationServer::setDefaultScope<\/a>"],[100,1,"AuthorizationServer::getDefaultScope<\/a>"],[100,1,"AuthorizationServer::stateParamRequired<\/a>"],[100,1,"AuthorizationServer::requireStateParam<\/a>"],[100,1,"AuthorizationServer::getScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::setScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::getAccessTokenTTL<\/a>"],[100,1,"AuthorizationServer::setAccessTokenTTL<\/a>"],[100,3,"AuthorizationServer::issueAccessToken<\/a>"],[100,2,"AuthorizationServer::getGrantType<\/a>"],[100,1,"AbstractTokenEntity::__construct<\/a>"],[100,1,"AbstractTokenEntity::setSession<\/a>"],[100,1,"AbstractTokenEntity::setExpireTime<\/a>"],[100,1,"AbstractTokenEntity::getExpireTime<\/a>"],[100,1,"AbstractTokenEntity::isExpired<\/a>"],[100,2,"AbstractTokenEntity::setId<\/a>"],[100,1,"AbstractTokenEntity::getId<\/a>"],[100,2,"AbstractTokenEntity::associateScope<\/a>"],[85.714285714286,4,"AbstractTokenEntity::formatScopes<\/a>"],[100,2,"AbstractTokenEntity::__toString<\/a>"],[100,1,"AbstractTokenEntity::expire<\/a>"],[100,1,"AbstractTokenEntity::save<\/a>"],[100,2,"AccessTokenEntity::getSession<\/a>"],[100,2,"AccessTokenEntity::hasScope<\/a>"],[100,2,"AccessTokenEntity::getScopes<\/a>"],[100,2,"AccessTokenEntity::save<\/a>"],[100,1,"AccessTokenEntity::expire<\/a>"],[100,1,"AuthCodeEntity::setRedirectUri<\/a>"],[100,1,"AuthCodeEntity::getRedirectUri<\/a>"],[100,2,"AuthCodeEntity::generateRedirectUri<\/a>"],[100,2,"AuthCodeEntity::getSession<\/a>"],[100,2,"AuthCodeEntity::getScopes<\/a>"],[100,2,"AuthCodeEntity::save<\/a>"],[100,1,"AuthCodeEntity::expire<\/a>"],[100,1,"ClientEntity::__construct<\/a>"],[100,1,"ClientEntity::getId<\/a>"],[100,1,"ClientEntity::getSecret<\/a>"],[100,1,"ClientEntity::getName<\/a>"],[100,1,"ClientEntity::getRedirectUri<\/a>"],[100,1,"RefreshTokenEntity::setAccessTokenId<\/a>"],[100,1,"RefreshTokenEntity::setAccessToken<\/a>"],[100,2,"RefreshTokenEntity::getAccessToken<\/a>"],[100,1,"RefreshTokenEntity::save<\/a>"],[100,1,"RefreshTokenEntity::expire<\/a>"],[100,1,"ScopeEntity::__construct<\/a>"],[100,1,"ScopeEntity::getId<\/a>"],[100,1,"ScopeEntity::getDescription<\/a>"],[100,1,"ScopeEntity::jsonSerialize<\/a>"],[100,1,"SessionEntity::__construct<\/a>"],[100,1,"SessionEntity::setId<\/a>"],[100,1,"SessionEntity::getId<\/a>"],[100,2,"SessionEntity::associateScope<\/a>"],[100,2,"SessionEntity::hasScope<\/a>"],[100,2,"SessionEntity::getScopes<\/a>"],[100,4,"SessionEntity::formatScopes<\/a>"],[100,1,"SessionEntity::associateAccessToken<\/a>"],[100,1,"SessionEntity::associateRefreshToken<\/a>"],[100,1,"SessionEntity::associateClient<\/a>"],[100,2,"SessionEntity::getClient<\/a>"],[100,1,"SessionEntity::setOwner<\/a>"],[100,1,"SessionEntity::getOwnerId<\/a>"],[100,1,"SessionEntity::getOwnerType<\/a>"],[100,2,"SessionEntity::save<\/a>"],[100,1,"ClientAuthenticationFailedEvent::__construct<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getName<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"SessionOwnerEvent::__construct<\/a>"],[100,1,"SessionOwnerEvent::getName<\/a>"],[100,1,"SessionOwnerEvent::getSession<\/a>"],[100,1,"UserAuthenticationFailedEvent::__construct<\/a>"],[100,1,"UserAuthenticationFailedEvent::getName<\/a>"],[100,1,"UserAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"AccessDeniedException::__construct<\/a>"],[100,1,"InvalidClientException::__construct<\/a>"],[100,1,"InvalidCredentialsException::__construct<\/a>"],[100,1,"InvalidGrantException::__construct<\/a>"],[100,1,"InvalidRefreshException::__construct<\/a>"],[100,1,"InvalidRequestException::__construct<\/a>"],[100,1,"InvalidScopeException::__construct<\/a>"],[100,1,"OAuthException::__construct<\/a>"],[100,2,"OAuthException::shouldRedirect<\/a>"],[100,1,"OAuthException::getRedirectUri<\/a>"],[0,1,"OAuthException::getParameter<\/a>"],[73.333333333333,12,"OAuthException::getHttpHeaders<\/a>"],[100,2,"ServerErrorException::__construct<\/a>"],[100,1,"UnauthorizedClientException::__construct<\/a>"],[100,1,"UnsupportedGrantTypeException::__construct<\/a>"],[100,1,"UnsupportedResponseTypeException::__construct<\/a>"],[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[100,1,"AuthCodeGrant::setRequireClientSecret<\/a>"],[100,1,"AuthCodeGrant::shouldRequireClientSecret<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,15,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenRotation<\/a>"],[100,1,"RefreshTokenGrant::shouldRotateRefreshTokens<\/a>"],[100,1,"RefreshTokenGrant::setRequireClientSecret<\/a>"],[100,1,"RefreshTokenGrant::shouldRequireClientSecret<\/a>"],[100,13,"RefreshTokenGrant::completeFlow<\/a>"],[100,1,"ResourceServer::__construct<\/a>"],[100,1,"ResourceServer::setIdKey<\/a>"],[100,1,"ResourceServer::getAccessToken<\/a>"],[100,4,"ResourceServer::isValidRequest<\/a>"],[100,6,"ResourceServer::determineAccessToken<\/a>"],[100,1,"AbstractStorage::setServer<\/a>"],[100,1,"AbstractStorage::getServer<\/a>"],[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[66.666666666667,3,"Bearer::determineAccessTokenInHeader<\/a>"],[90,2,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[22.222222222222,4,"MAC::hash_equals<\/a>"],[100,4,"DefaultAlgorithm::generate<\/a>"],[100,2,"RedirectUri::make<\/a>"],[100,1,"SecureKey::generate<\/a>"],[100,1,"SecureKey::setAlgorithm<\/a>"],[100,2,"SecureKey::getAlgorithm<\/a>"],[100,3,"EntityTrait::hydrate<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"AbstractServer::__construct<\/a>"],[100,2,"AbstractServer::setEventEmitter<\/a>"],[100,1,"AbstractServer::addEventListener<\/a>"],[100,1,"AbstractServer::getEventEmitter<\/a>"],[100,1,"AbstractServer::setRequest<\/a>"],[100,2,"AbstractServer::getRequest<\/a>"],[100,1,"AbstractServer::setClientStorage<\/a>"],[100,1,"AbstractServer::setSessionStorage<\/a>"],[100,1,"AbstractServer::setAccessTokenStorage<\/a>"],[100,1,"AbstractServer::setRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::setAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setScopeStorage<\/a>"],[100,1,"AbstractServer::getClientStorage<\/a>"],[100,1,"AbstractServer::getScopeStorage<\/a>"],[100,1,"AbstractServer::getSessionStorage<\/a>"],[100,1,"AbstractServer::getRefreshTokenStorage<\/a>"],[100,1,"AbstractServer::getAccessTokenStorage<\/a>"],[100,1,"AbstractServer::getAuthCodeStorage<\/a>"],[100,1,"AbstractServer::setTokenType<\/a>"],[100,1,"AbstractServer::getTokenType<\/a>"],[100,1,"AbstractServer::getMacStorage<\/a>"],[100,1,"AbstractServer::setMacStorage<\/a>"],[100,1,"AuthorizationServer::__construct<\/a>"],[100,3,"AuthorizationServer::addGrantType<\/a>"],[100,1,"AuthorizationServer::hasGrantType<\/a>"],[100,1,"AuthorizationServer::getResponseTypes<\/a>"],[100,1,"AuthorizationServer::requireScopeParam<\/a>"],[100,1,"AuthorizationServer::scopeParamRequired<\/a>"],[100,1,"AuthorizationServer::setDefaultScope<\/a>"],[100,1,"AuthorizationServer::getDefaultScope<\/a>"],[100,1,"AuthorizationServer::stateParamRequired<\/a>"],[100,1,"AuthorizationServer::requireStateParam<\/a>"],[100,1,"AuthorizationServer::getScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::setScopeDelimiter<\/a>"],[100,1,"AuthorizationServer::getAccessTokenTTL<\/a>"],[100,1,"AuthorizationServer::setAccessTokenTTL<\/a>"],[100,3,"AuthorizationServer::issueAccessToken<\/a>"],[100,2,"AuthorizationServer::getGrantType<\/a>"],[100,1,"AbstractTokenEntity::__construct<\/a>"],[100,1,"AbstractTokenEntity::setSession<\/a>"],[100,1,"AbstractTokenEntity::setExpireTime<\/a>"],[100,1,"AbstractTokenEntity::getExpireTime<\/a>"],[100,1,"AbstractTokenEntity::isExpired<\/a>"],[100,2,"AbstractTokenEntity::setId<\/a>"],[100,1,"AbstractTokenEntity::getId<\/a>"],[100,2,"AbstractTokenEntity::associateScope<\/a>"],[88.888888888889,4,"AbstractTokenEntity::formatScopes<\/a>"],[100,2,"AbstractTokenEntity::__toString<\/a>"],[100,1,"AbstractTokenEntity::expire<\/a>"],[100,1,"AbstractTokenEntity::save<\/a>"],[100,2,"AccessTokenEntity::getSession<\/a>"],[0,2,"AccessTokenEntity::hasScope<\/a>"],[100,2,"AccessTokenEntity::getScopes<\/a>"],[100,2,"AccessTokenEntity::save<\/a>"],[100,1,"AccessTokenEntity::expire<\/a>"],[100,1,"AuthCodeEntity::setRedirectUri<\/a>"],[100,1,"AuthCodeEntity::getRedirectUri<\/a>"],[100,2,"AuthCodeEntity::generateRedirectUri<\/a>"],[100,2,"AuthCodeEntity::getSession<\/a>"],[100,2,"AuthCodeEntity::getScopes<\/a>"],[100,2,"AuthCodeEntity::save<\/a>"],[100,1,"AuthCodeEntity::expire<\/a>"],[100,1,"ClientEntity::__construct<\/a>"],[100,1,"ClientEntity::getId<\/a>"],[100,1,"ClientEntity::getSecret<\/a>"],[100,1,"ClientEntity::getName<\/a>"],[100,1,"ClientEntity::getRedirectUri<\/a>"],[100,1,"RefreshTokenEntity::setAccessTokenId<\/a>"],[100,1,"RefreshTokenEntity::setAccessToken<\/a>"],[100,2,"RefreshTokenEntity::getAccessToken<\/a>"],[100,1,"RefreshTokenEntity::save<\/a>"],[100,1,"RefreshTokenEntity::expire<\/a>"],[100,1,"ScopeEntity::__construct<\/a>"],[100,1,"ScopeEntity::getId<\/a>"],[100,1,"ScopeEntity::getDescription<\/a>"],[100,1,"ScopeEntity::jsonSerialize<\/a>"],[100,1,"SessionEntity::__construct<\/a>"],[100,1,"SessionEntity::setId<\/a>"],[100,1,"SessionEntity::getId<\/a>"],[100,2,"SessionEntity::associateScope<\/a>"],[100,2,"SessionEntity::hasScope<\/a>"],[100,2,"SessionEntity::getScopes<\/a>"],[100,4,"SessionEntity::formatScopes<\/a>"],[100,1,"SessionEntity::associateAccessToken<\/a>"],[100,1,"SessionEntity::associateRefreshToken<\/a>"],[100,1,"SessionEntity::associateClient<\/a>"],[100,2,"SessionEntity::getClient<\/a>"],[100,1,"SessionEntity::setOwner<\/a>"],[100,1,"SessionEntity::getOwnerId<\/a>"],[100,1,"SessionEntity::getOwnerType<\/a>"],[100,2,"SessionEntity::save<\/a>"],[100,1,"ClientAuthenticationFailedEvent::__construct<\/a>"],[100,1,"ClientAuthenticationFailedEvent::getName<\/a>"],[0,1,"ClientAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"SessionOwnerEvent::__construct<\/a>"],[100,1,"SessionOwnerEvent::getName<\/a>"],[100,1,"SessionOwnerEvent::getSession<\/a>"],[100,1,"UserAuthenticationFailedEvent::__construct<\/a>"],[100,1,"UserAuthenticationFailedEvent::getName<\/a>"],[0,1,"UserAuthenticationFailedEvent::getRequest<\/a>"],[100,1,"AccessDeniedException::__construct<\/a>"],[100,1,"InvalidClientException::__construct<\/a>"],[100,1,"InvalidCredentialsException::__construct<\/a>"],[100,1,"InvalidGrantException::__construct<\/a>"],[100,1,"InvalidRefreshException::__construct<\/a>"],[100,1,"InvalidRequestException::__construct<\/a>"],[100,1,"InvalidScopeException::__construct<\/a>"],[100,1,"OAuthException::__construct<\/a>"],[100,2,"OAuthException::shouldRedirect<\/a>"],[100,1,"OAuthException::getRedirectUri<\/a>"],[0,1,"OAuthException::getParameter<\/a>"],[100,12,"OAuthException::getHttpHeaders<\/a>"],[100,2,"ServerErrorException::__construct<\/a>"],[100,1,"UnauthorizedClientException::__construct<\/a>"],[100,1,"UnsupportedGrantTypeException::__construct<\/a>"],[100,1,"UnsupportedResponseTypeException::__construct<\/a>"],[100,1,"AbstractGrant::getIdentifier<\/a>"],[100,1,"AbstractGrant::setIdentifier<\/a>"],[100,1,"AbstractGrant::getResponseType<\/a>"],[100,2,"AbstractGrant::getAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAccessTokenTTL<\/a>"],[100,1,"AbstractGrant::setAuthorizationServer<\/a>"],[100,11,"AbstractGrant::validateScopes<\/a>"],[100,3,"AbstractGrant::formatScopes<\/a>"],[100,1,"AuthCodeGrant::setAuthTokenTTL<\/a>"],[0,1,"AuthCodeGrant::setRequireClientSecret<\/a>"],[100,1,"AuthCodeGrant::shouldRequireClientSecret<\/a>"],[100,8,"AuthCodeGrant::checkAuthorizeParams<\/a>"],[100,2,"AuthCodeGrant::newAuthorizeRequest<\/a>"],[100,15,"AuthCodeGrant::completeFlow<\/a>"],[100,6,"ClientCredentialsGrant::completeFlow<\/a>"],[100,1,"PasswordGrant::setVerifyCredentialsCallback<\/a>"],[100,3,"PasswordGrant::getVerifyCredentialsCallback<\/a>"],[100,11,"PasswordGrant::completeFlow<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::getRefreshTokenTTL<\/a>"],[100,1,"RefreshTokenGrant::setRefreshTokenRotation<\/a>"],[100,1,"RefreshTokenGrant::shouldRotateRefreshTokens<\/a>"],[100,1,"RefreshTokenGrant::setRequireClientSecret<\/a>"],[100,1,"RefreshTokenGrant::shouldRequireClientSecret<\/a>"],[100,13,"RefreshTokenGrant::completeFlow<\/a>"],[100,1,"ResourceServer::__construct<\/a>"],[100,1,"ResourceServer::setIdKey<\/a>"],[100,1,"ResourceServer::getAccessToken<\/a>"],[100,4,"ResourceServer::isValidRequest<\/a>"],[100,6,"ResourceServer::determineAccessToken<\/a>"],[100,1,"AbstractStorage::setServer<\/a>"],[100,1,"AbstractStorage::getServer<\/a>"],[100,1,"AbstractTokenType::setServer<\/a>"],[100,1,"AbstractTokenType::setSession<\/a>"],[100,1,"AbstractTokenType::setParam<\/a>"],[100,2,"AbstractTokenType::getParam<\/a>"],[100,2,"Bearer::generateResponse<\/a>"],[66.666666666667,3,"Bearer::determineAccessTokenInHeader<\/a>"],[83.333333333333,2,"MAC::generateResponse<\/a>"],[100,13,"MAC::determineAccessTokenInHeader<\/a>"],[100,3,"MAC::anonymous function<\/a>"],[90,4,"MAC::hash_equals<\/a>"],[100,4,"DefaultAlgorithm::generate<\/a>"],[100,2,"RedirectUri::make<\/a>"],[100,1,"SecureKey::generate<\/a>"],[100,1,"SecureKey::setAlgorithm<\/a>"],[100,2,"SecureKey::getAlgorithm<\/a>"],[100,3,"EntityTrait::hydrate<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/master/index.html b/master/index.html index dfa45f63..fc9f2714 100644 --- a/master/index.html +++ b/master/index.html @@ -43,105 +43,105 @@ Total
-
- 97.55% covered (success) +
+ 98.00% covered (success)
-
97.55%
-
677 / 694
+
98.00%
+
785 / 801
-
- 96.20% covered (success) +
+ 94.44% covered (success)
-
96.20%
-
152 / 158
+
94.44%
+
153 / 162
-
- 89.47% covered (warning) +
+ 78.95% covered (warning)
-
89.47%
-
34 / 38
+
78.95%
+
30 / 38
Entity
-
- 99.30% covered (success) +
+ 97.08% covered (success)
-
99.30%
-
141 / 142
+
97.08%
+
166 / 171
-
- 98.04% covered (success) +
+ 96.15% covered (success)
-
98.04%
-
50 / 51
+
96.15%
+
50 / 52
-
- 87.50% covered (warning) +
+ 75.00% covered (warning)
-
87.50%
-
7 / 8
+
75.00%
+
6 / 8
- Event -
-
- 100.00% covered (success) + Event +
+
+ 83.33% covered (warning)
-
100.00%
-
10 / 10
-
-
- 100.00% covered (success) +
83.33%
+
10 / 12
+
+
+ 77.78% covered (warning)
-
100.00%
-
7 / 7
-
-
- 100.00% covered (success) +
77.78%
+
7 / 9
+
+
+ 33.33% covered (danger)
-
100.00%
-
3 / 3
+
33.33%
+
1 / 3
Exception
-
- 91.53% covered (success) +
+ 98.65% covered (success)
-
91.53%
-
54 / 59
-
-
- 87.50% covered (warning) +
98.65%
+
73 / 74
+
+
+ 93.75% covered (success)
-
87.50%
-
14 / 16
+
93.75%
+
15 / 16
91.67% covered (success) @@ -155,29 +155,29 @@ Grant
-
- 100.00% covered (success) +
+ 99.38% covered (success)
-
100.00%
-
281 / 281
+
99.38%
+
322 / 324
-
- 100.00% covered (success) +
+ 96.00% covered (success)
-
100.00%
-
24 / 24
-
-
- 100.00% covered (success) +
96.00%
+
24 / 25
+
+
+ 80.00% covered (warning)
-
100.00%
-
5 / 5
+
80.00%
+
4 / 5
@@ -209,15 +209,15 @@ - TokenType -
-
- 85.71% covered (warning) + TokenType +
+
+ 93.10% covered (success)
-
85.71%
-
66 / 77
+
93.10%
+
81 / 87
70.00% covered (warning) @@ -245,7 +245,7 @@
100.00%
-
14 / 14
+
15 / 15
100.00% covered (success) @@ -273,7 +273,7 @@
100.00%
-
45 / 45
+
47 / 47
100.00% covered (success) @@ -301,7 +301,7 @@
100.00%
-
36 / 36
+
39 / 39
100.00% covered (success) @@ -329,7 +329,7 @@
100.00%
-
27 / 27
+
29 / 29
100.00% covered (success) @@ -360,7 +360,7 @@ High: 90% to 100%

- Generated by PHP_CodeCoverage 3.1.0 using PHP 7.0.2 and PHPUnit 5.1.4 at Sun Jan 17 14:58:54 UTC 2016. + Generated by PHP_CodeCoverage 2.2.4 using PHP 5.4.37 and PHPUnit 4.3.5 at Wed Jan 20 11:34:25 UTC 2016.