@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | - * @param StatusCode|null $statusCode |
|
52 | + * @param StatusCode $statusCode |
|
53 | 53 | * |
54 | 54 | * @return StatusCode |
55 | 55 | */ |
@@ -224,7 +224,7 @@ |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | /** |
227 | - * @return \LightSaml\Model\Assertion\NameID|null |
|
227 | + * @return Issuer|null |
|
228 | 228 | */ |
229 | 229 | public function getIssuer() |
230 | 230 | { |
@@ -23,15 +23,15 @@ |
||
23 | 23 | */ |
24 | 24 | public function register(Container $pimple) |
25 | 25 | { |
26 | - $pimple[ProviderContainer::ATTRIBUTE_VALUE_PROVIDER] = function () { |
|
26 | + $pimple[ProviderContainer::ATTRIBUTE_VALUE_PROVIDER] = function() { |
|
27 | 27 | throw new LightSamlBuildException('Attribute value provider not set'); |
28 | 28 | }; |
29 | 29 | |
30 | - $pimple[ProviderContainer::SESSION_INFO_PROVIDER] = function () { |
|
30 | + $pimple[ProviderContainer::SESSION_INFO_PROVIDER] = function() { |
|
31 | 31 | throw new LightSamlBuildException('Session info provider not set'); |
32 | 32 | }; |
33 | 33 | |
34 | - $pimple[ProviderContainer::NAME_ID_PROVIDER] = function () { |
|
34 | + $pimple[ProviderContainer::NAME_ID_PROVIDER] = function() { |
|
35 | 35 | throw new LightSamlBuildException('Name ID provider not set'); |
36 | 36 | }; |
37 | 37 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | libxml_clear_errors(); |
48 | 48 | $doc = new \DOMDocument(); |
49 | 49 | |
50 | - set_error_handler(function ($errno, $errstr, $errfile, $errline, array $errcontext) use (&$result) { |
|
50 | + set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) use (&$result) { |
|
51 | 51 | $error = new XsdError(XsdError::FATAL, $errno, $errstr, 0, 0); |
52 | 52 | $result[] = $error; |
53 | 53 | }); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @param string $id |
26 | - * @param mixed $nonce |
|
26 | + * @param string $nonce |
|
27 | 27 | */ |
28 | 28 | public function __construct($id = null, $nonce = null) |
29 | 29 | { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @deprecated Since 1.2, to be removed in 2.0. Use getParameters() instead |
72 | 72 | * |
73 | 73 | * @param string $name |
74 | - * @param mixed $value |
|
74 | + * @param integer $value |
|
75 | 75 | * |
76 | 76 | * @return SsoState |
77 | 77 | */ |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * @param $idpEntityId |
|
148 | - * @param $spEntityId |
|
147 | + * @param string|null $idpEntityId |
|
148 | + * @param string|null $spEntityId |
|
149 | 149 | * @param $nameId |
150 | 150 | * @param $nameIdFormat |
151 | 151 | * @param $sessionIndex |
@@ -242,8 +242,8 @@ |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | /** |
245 | - * @param array $arrIdp |
|
246 | - * @param array $arrSp |
|
245 | + * @param string[] $arrIdp |
|
246 | + * @param string[] $arrSp |
|
247 | 247 | * |
248 | 248 | * @return SsoState |
249 | 249 | */ |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | { |
210 | 210 | $state = new SsoState(); |
211 | 211 | $state->setLocalSessionId('local-id'); |
212 | - $state->getParameters()->add(['a' => 'aaa', 'b' => 2, 'c' => [1,2,3]]); |
|
212 | + $state->getParameters()->add(['a' => 'aaa', 'b' => 2, 'c' => [1, 2, 3]]); |
|
213 | 213 | $state->addSsoSession($session1 = new SsoSessionState()); |
214 | 214 | $session1->setIdpEntityId($idp1 = 'idp1'); |
215 | 215 | $state->addSsoSession($session2 = new SsoSessionState()); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $state->addSsoSession($session2 = new SsoSessionState()); |
233 | 233 | $session2->setIdpEntityId('idp-2'); |
234 | 234 | |
235 | - $state->modify(function (SsoSessionState $session) use ($session1) { |
|
235 | + $state->modify(function(SsoSessionState $session) use ($session1) { |
|
236 | 236 | return $session->getIdpEntityId() != $session1->getIdpEntityId(); |
237 | 237 | }); |
238 | 238 |
@@ -109,7 +109,7 @@ |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
112 | - * @return \PHPUnit_Framework_MockObject_MockObject|TrustOptionsStoreInterface |
|
112 | + * @return TrustOptionsStoreInterface |
|
113 | 113 | */ |
114 | 114 | private function getTrustOptionsStoreMock() |
115 | 115 | { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function test_validate_returns_false_when_no_signature_set() |
31 | 31 | { |
32 | - $publicKey = KeyHelper::createPublicKey(X509Certificate::fromFile(__DIR__ . '/../../../../../resources/sample/Certificate/saml.crt')); |
|
32 | + $publicKey = KeyHelper::createPublicKey(X509Certificate::fromFile(__DIR__.'/../../../../../resources/sample/Certificate/saml.crt')); |
|
33 | 33 | $reader = new SignatureStringReader(); |
34 | 34 | $result = $reader->validate($publicKey); |
35 | 35 | $this->assertFalse($result); |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | |
38 | 38 | public function test_validate_correct_signature() |
39 | 39 | { |
40 | - $publicKey = KeyHelper::createPublicKey(X509Certificate::fromFile(__DIR__ . '/../../../../../resources/sample/Certificate/saml.crt')); |
|
41 | - $privateKey = KeyHelper::createPrivateKey(__DIR__ . '/../../../../../resources/sample/Certificate/saml.pem', '', true); |
|
40 | + $publicKey = KeyHelper::createPublicKey(X509Certificate::fromFile(__DIR__.'/../../../../../resources/sample/Certificate/saml.crt')); |
|
41 | + $privateKey = KeyHelper::createPrivateKey(__DIR__.'/../../../../../resources/sample/Certificate/saml.pem', '', true); |
|
42 | 42 | $data = 'Some message data'; |
43 | 43 | $signature = base64_encode($privateKey->signData($data)); |
44 | 44 |