Completed
Push — master ( 3ba758...b5e37b )
by Liaw
02:27
created
tests/LightSaml/Tests/Context/AbstractContextTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@
 block discarded – undo
222 222
         $profileContext->addSubContext('assertion_01', $assertionSubContext01 = new AssertionContext());
223 223
         $assertionSubContext01->addSubContext('rs', new RequestStateContext());
224 224
 
225
-        $actual = (string)$profileContext;
225
+        $actual = (string) $profileContext;
226 226
 
227 227
         $expected = <<<EOT
228 228
 {
Please login to merge, or discard this patch.
tests/LightSaml/Tests/Functional/Bridge/Pimple/ProfileTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -198,14 +198,14 @@  discard block
 block discarded – undo
198 198
         // SYSTEM
199 199
         $buildContainer->getPimple()->register(new \LightSaml\Bridge\Pimple\Container\Factory\SystemContainerProvider(true));
200 200
         if ($timeProvider) {
201
-            $pimple[SystemContainer::TIME_PROVIDER] = function () use ($timeProvider) {
201
+            $pimple[SystemContainer::TIME_PROVIDER] = function() use ($timeProvider) {
202 202
                 return $timeProvider;
203 203
             };
204 204
         }
205 205
 
206 206
         // PARTY
207 207
         $buildContainer->getPimple()->register(new \LightSaml\Bridge\Pimple\Container\Factory\PartyContainerProvider());
208
-        $pimple[PartyContainer::IDP_ENTITY_DESCRIPTOR] = function () {
208
+        $pimple[PartyContainer::IDP_ENTITY_DESCRIPTOR] = function() {
209 209
             $idpProvider = new \LightSaml\Store\EntityDescriptor\FixedEntityDescriptorStore();
210 210
             $idpProvider->add(
211 211
                 \LightSaml\Model\Metadata\EntitiesDescriptor::load(__DIR__.'/../../../../../../web/sp/testshib-providers.xml')
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             )
228 228
         );
229 229
         if ($inResponseTo) {
230
-            $pimple[StoreContainer::REQUEST_STATE_STORE] = function () use ($inResponseTo) {
230
+            $pimple[StoreContainer::REQUEST_STATE_STORE] = function() use ($inResponseTo) {
231 231
                 $store = new RequestStateArrayStore();
232 232
                 $store->set(new RequestState($inResponseTo));
233 233
 
Please login to merge, or discard this patch.
tests/LightSaml/Tests/Store/Request/RequestStateSessionStoreTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
         $sessionMock->method('set')
21 21
             ->with('main_saml_request_state_', $this->isType('array'))
22
-            ->willReturnCallback(function ($name, $value) use ($requestState) {
22
+            ->willReturnCallback(function($name, $value) use ($requestState) {
23 23
                 $this->assertArrayHasKey('aaa', $value);
24 24
                 $this->assertSame($requestState, $value['aaa']);
25 25
             });
Please login to merge, or discard this patch.
tests/LightSaml/Tests/HelperTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
         $this->assertEquals(43, strlen($id));
114 114
 
115 115
         $arr = array();
116
-        for ($i = 0; $i<strlen($id); $i++) {
116
+        for ($i = 0; $i < strlen($id); $i++) {
117 117
             $ch = $id[$i];
118 118
             $arr[$ch] = true;
119 119
         }
Please login to merge, or discard this patch.
src/LightSaml/Bridge/Pimple/Container/Factory/ProviderContainerProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/LightSaml/Validator/Model/Xsd/XsdValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
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
         });
Please login to merge, or discard this patch.
tests/LightSaml/Tests/State/Sso/SsoStateTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/LightSaml/Tests/Model/XmlDSig/SignatureStringReaderTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Action/Profile/Inbound/Message/DestinationValidatorResponseActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
         $endpointResolverMock->expects($this->once())
27 27
             ->method('resolve')
28
-            ->willReturnCallback(function (CriteriaSet $criteriaSet, array $endpoints) {
28
+            ->willReturnCallback(function(CriteriaSet $criteriaSet, array $endpoints) {
29 29
                 $this->assertTrue($criteriaSet->has(ServiceTypeCriteria::class));
30 30
                 $arr = $criteriaSet->get(ServiceTypeCriteria::class);
31 31
                 $this->assertCount(1, $arr);
Please login to merge, or discard this patch.