Completed
Push — master ( 3ba758...b5e37b )
by Liaw
02:27
created
Tests/Action/Profile/Outbound/Message/ResolveEndpointIdpSsoActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $message = new AuthnRequest();
19 19
         $context = $this->createContext(ProfileContext::ROLE_IDP, $message);
20 20
 
21
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet) {
21
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet) {
22 22
             $this->criteriaSetShouldHaveServiceTypeCriteria($criteriaSet, SingleSignOnService::class);
23 23
 
24 24
             return [$this->getEndpointReferenceMock($endpoint = new SingleSignOnService())];
Please login to merge, or discard this patch.
Tests/Action/Profile/Outbound/Message/ResolveEndpointSpAcsActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $message = new AuthnRequest();
19 19
         $context = $this->createContext(ProfileContext::ROLE_IDP, $message);
20 20
 
21
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet) {
21
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet) {
22 22
             $this->criteriaSetShouldHaveServiceTypeCriteria($criteriaSet, AssertionConsumerService::class);
23 23
 
24 24
             return [$this->getEndpointReferenceMock($endpoint = new AssertionConsumerService())];
Please login to merge, or discard this patch.
Tests/Action/Profile/Outbound/Message/ResolveEndpointSloActionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $context->getOwnEntityContext()->setEntityDescriptor(new EntityDescriptor($ownEntityId = 'http://own.id'));
37 37
         $context->getLogoutContext()->setSsoSessionState((new SsoSessionState())->setIdpEntityId($ownEntityId));
38 38
 
39
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet) {
39
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet) {
40 40
             $this->criteriaSetShouldHaveServiceTypeCriteria($criteriaSet, SingleLogoutService::class);
41 41
 
42 42
             return [$this->getEndpointReferenceMock($endpoint = new SingleLogoutService())];
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $context->getOwnEntityContext()->setEntityDescriptor(new EntityDescriptor($ownEntityId = 'http://own.id'));
54 54
         $context->getLogoutContext()->setSsoSessionState((new SsoSessionState())->setIdpEntityId($ownEntityId));
55 55
 
56
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet) {
56
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet) {
57 57
             $this->criteriaSetShouldHaveDescriptorTypeCriteria($criteriaSet, SpSsoDescriptor::class);
58 58
 
59 59
             return [$this->getEndpointReferenceMock($endpoint = new SingleLogoutService())];
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $context->getOwnEntityContext()->setEntityDescriptor(new EntityDescriptor($ownEntityId = 'http://own.id'));
71 71
         $context->getLogoutContext()->setSsoSessionState((new SsoSessionState())->setSpEntityId($ownEntityId));
72 72
 
73
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet) {
73
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet) {
74 74
             $this->criteriaSetShouldHaveDescriptorTypeCriteria($criteriaSet, IdpSsoDescriptor::class);
75 75
 
76 76
             return [$this->getEndpointReferenceMock($endpoint = new SingleLogoutService())];
Please login to merge, or discard this patch.
Tests/Action/Profile/Outbound/Message/ResolveEndpointBaseActionTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $context = $this->createContext(ProfileContext::ROLE_IDP, $message);
42 42
 
43 43
         $endpoint = null;
44
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet, array $endpointCandidates) use (&$endpoint) {
44
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet, array $endpointCandidates) use (&$endpoint) {
45 45
             $this->criteriaSetShouldHaveBindingCriteria(
46 46
                 $criteriaSet,
47 47
                 [SamlConstants::BINDING_SAML2_HTTP_POST, SamlConstants::BINDING_SAML2_HTTP_REDIRECT]
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $context = $this->createContext(ProfileContext::ROLE_IDP, $message);
68 68
 
69 69
         $endpoint = null;
70
-        $this->setEndpointResolver(true, function () {
70
+        $this->setEndpointResolver(true, function() {
71 71
             return [];
72 72
         });
73 73
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $message->setAssertionConsumerServiceIndex($index = 2);
81 81
         $context = $this->createContext(ProfileContext::ROLE_IDP, $message);
82 82
 
83
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet) use ($index) {
83
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet) use ($index) {
84 84
             $this->criteriaSetShouldHaveIndexCriteria($criteriaSet, $index);
85 85
 
86 86
             return [$this->getEndpointReferenceMock($endpoint = new SingleSignOnService())];
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $message->setAssertionConsumerServiceURL($url = 'http://domain.com/acs');
96 96
         $context = $this->createContext(ProfileContext::ROLE_IDP, $message);
97 97
 
98
-        $this->setEndpointResolver(true, function (CriteriaSet $criteriaSet) use ($url) {
98
+        $this->setEndpointResolver(true, function(CriteriaSet $criteriaSet) use ($url) {
99 99
             $this->criteriaSetShouldHaveLocationCriteria($criteriaSet, $url);
100 100
 
101 101
             return [$this->getEndpointReferenceMock($endpoint = new SingleSignOnService())];
Please login to merge, or discard this patch.
LightSaml/Tests/Action/Assertion/Inbound/RecipientValidatorActionTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $endpointResolver->expects($this->once())
97 97
             ->method('resolve')
98 98
             ->with($this->isInstanceOf(CriteriaSet::class), $this->isType('array'))
99
-            ->willReturnCallback(function (CriteriaSet $criteriaSet) use ($recipient) {
99
+            ->willReturnCallback(function(CriteriaSet $criteriaSet) use ($recipient) {
100 100
                 $this->assertCriteria($criteriaSet, DescriptorTypeCriteria::class, 'getDescriptorType', SpSsoDescriptor::class);
101 101
                 $this->assertCriteria($criteriaSet, ServiceTypeCriteria::class, 'getServiceType', AssertionConsumerService::class);
102 102
                 $this->assertCriteria($criteriaSet, LocationCriteria::class, 'getLocation', $recipient);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         $endpointResolver->expects($this->once())
132 132
             ->method('resolve')
133
-            ->willReturnCallback(function () use ($recipient) {
133
+            ->willReturnCallback(function() use ($recipient) {
134 134
                 return [$this->getEndpointReferenceMock(new AssertionConsumerService())];
135 135
             });
136 136
 
Please login to merge, or discard this patch.
tests/LightSaml/Tests/Resolver/Signature/OwnSignatureResolverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 
93 93
         $credentialResolverMock->method('query')->willReturn($query = new CredentialResolverQuery($credentialResolverMock));
94 94
         $credentialResolverMock->method('resolve')
95
-            ->willReturnCallback(function (CriteriaSet $criteriaSet) use ($ownEntityId, $expectedMetadataType) {
95
+            ->willReturnCallback(function(CriteriaSet $criteriaSet) use ($ownEntityId, $expectedMetadataType) {
96 96
                 $this->assertCriteria($criteriaSet, EntityIdCriteria::class, 'getEntityId', $ownEntityId);
97 97
                 $this->assertCriteria($criteriaSet, UsageCriteria::class, 'getUsage', UsageType::SIGNING);
98 98
                 $this->assertCriteria($criteriaSet, X509CredentialCriteria::class, null, null);
Please login to merge, or discard this patch.
tests/LightSaml/Tests/Builder/Action/CompositeActionBuilderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         $action = $this->getMockBuilder(ActionInterface::class)->getMock();
79 79
         $action->expects($this->once())
80 80
             ->method('execute')
81
-            ->willReturnCallback(function () use ($expectedOrder, &$order) {
81
+            ->willReturnCallback(function() use ($expectedOrder, &$order) {
82 82
                 $this->assertEquals($expectedOrder, $order);
83 83
                 $order++;
84 84
             })
Please login to merge, or discard this patch.
src/LightSaml/Bridge/Pimple/Container/Factory/ServiceContainerProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function register(Container $pimple)
63 63
     {
64
-        $pimple[ServiceContainer::NAME_ID_VALIDATOR] = function () {
64
+        $pimple[ServiceContainer::NAME_ID_VALIDATOR] = function() {
65 65
             return new NameIdValidator();
66 66
         };
67 67
 
68
-        $pimple[ServiceContainer::ASSERTION_TIME_VALIDATOR] = function () {
68
+        $pimple[ServiceContainer::ASSERTION_TIME_VALIDATOR] = function() {
69 69
             return new AssertionTimeValidator();
70 70
         };
71 71
 
72
-        $pimple[ServiceContainer::ASSERTION_VALIDATOR] = function (Container $c) {
72
+        $pimple[ServiceContainer::ASSERTION_VALIDATOR] = function(Container $c) {
73 73
             $nameIdValidator = $c[ServiceContainer::NAME_ID_VALIDATOR];
74 74
 
75 75
             return new AssertionValidator(
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             );
80 80
         };
81 81
 
82
-        $pimple[ServiceContainer::ENDPOINT_RESOLVER] = function () {
82
+        $pimple[ServiceContainer::ENDPOINT_RESOLVER] = function() {
83 83
             return new CompositeEndpointResolver([
84 84
                 new BindingEndpointResolver(),
85 85
                 new DescriptorTypeEndpointResolver(),
@@ -89,33 +89,33 @@  discard block
 block discarded – undo
89 89
             ]);
90 90
         };
91 91
 
92
-        $pimple[ServiceContainer::BINDING_FACTORY] = function () {
92
+        $pimple[ServiceContainer::BINDING_FACTORY] = function() {
93 93
             return new BindingFactory($this->systemContainer->getEventDispatcher());
94 94
         };
95 95
 
96
-        $pimple[ServiceContainer::CREDENTIAL_RESOLVER] = function () {
96
+        $pimple[ServiceContainer::CREDENTIAL_RESOLVER] = function() {
97 97
             $factory = new CredentialResolverFactory($this->credentialContainer->getCredentialStore());
98 98
 
99 99
             return $factory->build();
100 100
         };
101 101
 
102
-        $pimple[ServiceContainer::SIGNATURE_RESOLVER] = function (Container $c) {
102
+        $pimple[ServiceContainer::SIGNATURE_RESOLVER] = function(Container $c) {
103 103
             $credentialResolver = $c[ServiceContainer::CREDENTIAL_RESOLVER];
104 104
 
105 105
             return new OwnSignatureResolver($credentialResolver);
106 106
         };
107 107
 
108
-        $pimple[ServiceContainer::SIGNATURE_VALIDATOR] = function (Container $c) {
108
+        $pimple[ServiceContainer::SIGNATURE_VALIDATOR] = function(Container $c) {
109 109
             $credentialResolver = $c[ServiceContainer::CREDENTIAL_RESOLVER];
110 110
 
111 111
             return new SignatureValidator($credentialResolver);
112 112
         };
113 113
 
114
-        $pimple[ServiceContainer::LOGOUT_SESSION_RESOLVER] = function () {
114
+        $pimple[ServiceContainer::LOGOUT_SESSION_RESOLVER] = function() {
115 115
             return new LogoutSessionResolver($this->storeContainer->getSsoStateStore());
116 116
         };
117 117
 
118
-        $pimple[ServiceContainer::SESSION_PROCESSOR] = function () {
118
+        $pimple[ServiceContainer::SESSION_PROCESSOR] = function() {
119 119
             return new SessionProcessor($this->storeContainer->getSsoStateStore(), $this->systemContainer->getTimeProvider());
120 120
         };
121 121
     }
Please login to merge, or discard this patch.
src/LightSaml/Action/Profile/Inbound/Response/DecryptAssertionsAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             throw new LightSamlContextException($context, $message);
71 71
         }
72 72
         $this->logger->info('Trusted decryption candidates', LogHelper::getActionContext($context, $this, [
73
-            'credentials' => array_map(function (CredentialInterface $credential) {
73
+            'credentials' => array_map(function(CredentialInterface $credential) {
74 74
                 return sprintf(
75 75
                     "Entity: '%s'; PK X509 Thumb: '%s'",
76 76
                     $credential->getEntityId(),
Please login to merge, or discard this patch.