@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | private const XSI_TYPE_PREFIX = '<xsi:type>'; |
| 22 | 22 | |
| 23 | 23 | /** @var array */ |
| 24 | - protected array $registry = []; |
|
| 24 | + protected array $registry = [ ]; |
|
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -34,12 +34,12 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | Assert::subclassOf($class, AbstractElement::class); |
| 36 | 36 | if (is_subclass_of($class, ExtensionPointInterface::class, true)) { |
| 37 | - $key = implode(':', [self::XSI_TYPE_PREFIX, $class::getXsiTypeNamespaceURI(), $class::getXsiTypeName()]); |
|
| 37 | + $key = implode(':', [ self::XSI_TYPE_PREFIX, $class::getXsiTypeNamespaceURI(), $class::getXsiTypeName() ]); |
|
| 38 | 38 | } else { |
| 39 | 39 | $className = AbstractElement::getClassName($class); |
| 40 | - $key = ($class::NS === null) ? $className : implode(':', [$class::NS, $className]); |
|
| 40 | + $key = ($class::NS === null) ? $className : implode(':', [ $class::NS, $className ]); |
|
| 41 | 41 | } |
| 42 | - $this->registry[$key] = $class; |
|
| 42 | + $this->registry[ $key ] = $class; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
@@ -61,9 +61,9 @@ discard block |
||
| 61 | 61 | Assert::nullOrValidURI($namespace, SchemaViolationException::class); |
| 62 | 62 | Assert::validNCName($element, SchemaViolationException::class); |
| 63 | 63 | |
| 64 | - $key = ($namespace === null) ? $element : implode(':', [$namespace, $element]); |
|
| 64 | + $key = ($namespace === null) ? $element : implode(':', [ $namespace, $element ]); |
|
| 65 | 65 | if (array_key_exists($key, $this->registry) === true) { |
| 66 | - return $this->registry[$key]; |
|
| 66 | + return $this->registry[ $key ]; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return null; |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | public function getExtensionHandler(string $type): ?string |
| 86 | 86 | { |
| 87 | 87 | Assert::notEmpty($type, 'Cannot search for identifier handlers with an empty type.'); |
| 88 | - $type = implode(':', [self::XSI_TYPE_PREFIX, $type]); |
|
| 88 | + $type = implode(':', [ self::XSI_TYPE_PREFIX, $type ]); |
|
| 89 | 89 | if (!array_key_exists($type, $this->registry)) { |
| 90 | 90 | return null; |
| 91 | 91 | } |
| 92 | - Assert::implementsInterface($this->registry[$type], ExtensionPointInterface::class); |
|
| 93 | - return $this->registry[$type]; |
|
| 92 | + Assert::implementsInterface($this->registry[ $type ], ExtensionPointInterface::class); |
|
| 93 | + return $this->registry[ $type ]; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
@@ -24,8 +24,8 @@ |
||
| 24 | 24 | * @param array<\SimpleSAML\SAML11\XML\saml\Assertion> $assertion |
| 25 | 25 | */ |
| 26 | 26 | final public function __construct( |
| 27 | - protected array $assertionIDReference = [], |
|
| 28 | - protected array $assertion = [], |
|
| 27 | + protected array $assertionIDReference = [ ], |
|
| 28 | + protected array $assertion = [ ], |
|
| 29 | 29 | ) { |
| 30 | 30 | Assert::maxCount($assertionIDReference, C::UNBOUNDED_LIMIT); |
| 31 | 31 | Assert::maxCount($assertion, C::UNBOUNDED_LIMIT); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | protected string $authenticationMethod, |
| 36 | 36 | protected DateTimeImmutable $authenticationInstant, |
| 37 | 37 | protected ?SubjectLocality $subjectLocality = null, |
| 38 | - protected array $authorityBinding = [], |
|
| 38 | + protected array $authorityBinding = [ ], |
|
| 39 | 39 | ) { |
| 40 | 40 | Assert::validURI($authenticationMethod); |
| 41 | 41 | Assert::allIsInstanceOf($authorityBinding, AuthorityBinding::class, SchemaViolationException::class); |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | list($element) = $qname; |
| 83 | 83 | } |
| 84 | 84 | $ns = $xml->lookupNamespaceUri($prefix); |
| 85 | - $type = ($ns === null) ? $element : implode(':', [$ns, $element]); |
|
| 85 | + $type = ($ns === null) ? $element : implode(':', [ $ns, $element ]); |
|
| 86 | 86 | |
| 87 | 87 | // now check if we have a handler registered for it |
| 88 | 88 | $handler = Utils::getContainer()->getExtensionHandler($type); |
@@ -28,9 +28,9 @@ |
||
| 28 | 28 | * @param \DateTimeImmutable|null $notOnOrAfter |
| 29 | 29 | */ |
| 30 | 30 | final public function __construct( |
| 31 | - protected array $audienceRestrictionCondition = [], |
|
| 32 | - protected array $doNotCacheCondition = [], |
|
| 33 | - protected array $condition = [], |
|
| 31 | + protected array $audienceRestrictionCondition = [ ], |
|
| 32 | + protected array $doNotCacheCondition = [ ], |
|
| 33 | + protected array $condition = [ ], |
|
| 34 | 34 | protected ?DateTimeImmutable $notBefore = null, |
| 35 | 35 | protected ?DateTimeImmutable $notOnOrAfter = null, |
| 36 | 36 | ) { |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | Subject $subject, |
| 32 | 32 | protected string $resource, |
| 33 | 33 | protected DecisionTypeEnum $decision, |
| 34 | - protected array $action = [], |
|
| 34 | + protected array $action = [ ], |
|
| 35 | 35 | protected ?Evidence $evidence = null, |
| 36 | 36 | ) { |
| 37 | 37 | Assert::validURI($resource); |
@@ -34,9 +34,9 @@ discard block |
||
| 34 | 34 | * @param \SimpleSAML\XML\SerializableElementInterface[] $elements |
| 35 | 35 | */ |
| 36 | 36 | final public function __construct( |
| 37 | - protected array $assertionIDReference = [], |
|
| 38 | - protected array $assertion = [], |
|
| 39 | - array $elements = [], |
|
| 37 | + protected array $assertionIDReference = [ ], |
|
| 38 | + protected array $assertion = [ ], |
|
| 39 | + array $elements = [ ], |
|
| 40 | 40 | ) { |
| 41 | 41 | Assert::maxCount($assertionIDReference, C::UNBOUNDED_LIMIT); |
| 42 | 42 | Assert::maxCount($assertion, C::UNBOUNDED_LIMIT); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
| 97 | 97 | Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class); |
| 98 | 98 | |
| 99 | - $elements = []; |
|
| 99 | + $elements = [ ]; |
|
| 100 | 100 | foreach ($xml->childNodes as $element) { |
| 101 | 101 | if ($element->namespaceURI === C::NS_SAML) { |
| 102 | 102 | continue; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | continue; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - $elements[] = new Chunk($element); |
|
| 107 | + $elements[ ] = new Chunk($element); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | return new static( |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | final public function __construct( |
| 28 | 28 | Subject $subject, |
| 29 | - protected array $attribute = [], |
|
| 29 | + protected array $attribute = [ ], |
|
| 30 | 30 | ) { |
| 31 | 31 | Assert::allIsInstanceOf($attribute, Attribute::class, SchemaViolationException::class); |
| 32 | 32 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | protected DateTimeImmutable $issueInstant, |
| 65 | 65 | protected ?Conditions $conditions = null, |
| 66 | 66 | protected ?Advice $advice = null, |
| 67 | - protected array $statements = [], |
|
| 67 | + protected array $statements = [ ], |
|
| 68 | 68 | ) { |
| 69 | 69 | Assert::same($issueInstant->getTimeZone()->getName(), 'Z', ProtocolViolationException::class); |
| 70 | 70 | Assert::validNCName($assertionID, SchemaViolationException::class); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | public function getStatements(): array |
| 149 | 149 | { |
| 150 | - return array_values(array_filter($this->statements, function ($statement) { |
|
| 150 | + return array_values(array_filter($this->statements, function($statement) { |
|
| 151 | 151 | return $statement instanceof AbstractStatement; |
| 152 | 152 | })); |
| 153 | 153 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | public function getSubjectStatements(): array |
| 160 | 160 | { |
| 161 | - return array_values(array_filter($this->statements, function ($statement) { |
|
| 161 | + return array_values(array_filter($this->statements, function($statement) { |
|
| 162 | 162 | return $statement instanceof AbstractSubjectStatement; |
| 163 | 163 | })); |
| 164 | 164 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | public function getAuthenticationStatements(): array |
| 171 | 171 | { |
| 172 | - return array_values(array_filter($this->statements, function ($statement) { |
|
| 172 | + return array_values(array_filter($this->statements, function($statement) { |
|
| 173 | 173 | return $statement instanceof AuthenticationStatement; |
| 174 | 174 | })); |
| 175 | 175 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | public function getAuthorizationStatements(): array |
| 182 | 182 | { |
| 183 | - return array_values(array_filter($this->statements, function ($statement) { |
|
| 183 | + return array_values(array_filter($this->statements, function($statement) { |
|
| 184 | 184 | return $statement instanceof AuthorizationDecisionStatement; |
| 185 | 185 | })); |
| 186 | 186 | } |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | public function getAttributeStatements(): array |
| 193 | 193 | { |
| 194 | - return array_values(array_filter($this->statements, function ($statement) { |
|
| 194 | + return array_values(array_filter($this->statements, function($statement) { |
|
| 195 | 195 | return $statement instanceof AttributeStatement; |
| 196 | 196 | })); |
| 197 | 197 | } |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | ); |
| 276 | 276 | |
| 277 | 277 | if (!empty($signature)) { |
| 278 | - $assertion->setSignature($signature[0]); |
|
| 278 | + $assertion->setSignature($signature[ 0 ]); |
|
| 279 | 279 | $assertion->setXML($xml); |
| 280 | 280 | } |
| 281 | 281 | |