Skip to content

Commit 31a2455

Browse files
committed
Fix codesniffer issue
1 parent 633c68d commit 31a2455

14 files changed

Lines changed: 27 additions & 41 deletions

src/SAML2/Binding.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,8 @@ public static function getCurrentBinding(ServerRequestInterface $request): Bindi
111111
if (
112112
($contentType === 'text/xml' || $contentType === 'application/xml')
113113
// See paragraph 3.2.3 of Binding for SAML2 (OASIS)
114-
|| (
115-
$request->hasHeader('SOAPAction')
116-
&& $request->getHeader('SOAPAction')[0] === 'http://www.oasis-open.org/committees/security'
117-
)
114+
|| ($request->hasHeader('SOAPAction')
115+
&& $request->getHeader('SOAPAction')[0] === 'http://www.oasis-open.org/committees/security')
118116
) {
119117
return new SOAP();
120118
}

src/SAML2/Utils/XPath.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace SimpleSAML\SAML2\Utils;
46

57
use DOMNode;

src/SAML2/XML/md/AbstractMetadataDocument.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace SimpleSAML\SAML2\XML\md;
46

57
use DOMElement;

src/SAML2/XML/mdui/DiscoHints.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,10 @@ public function addChild(Chunk $child): void
9999
*/
100100
public function isEmptyElement(): bool
101101
{
102-
return (
103-
empty($this->elements)
102+
return empty($this->elements)
104103
&& empty($this->ipHint)
105104
&& empty($this->domainHint)
106-
&& empty($this->geolocationHint)
107-
);
105+
&& empty($this->geolocationHint);
108106
}
109107

110108

src/SAML2/XML/mdui/UIInfo.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,13 @@ public function addChild(Chunk $child): void
202202
*/
203203
public function isEmptyElement(): bool
204204
{
205-
return (
206-
empty($this->displayName)
205+
return empty($this->displayName)
207206
&& empty($this->description)
208207
&& empty($this->informationURL)
209208
&& empty($this->privacyStatementURL)
210209
&& empty($this->keywords)
211210
&& empty($this->logo)
212-
&& empty($this->elements)
213-
);
211+
&& empty($this->elements);
214212
}
215213

216214

src/SAML2/XML/saml/AbstractBaseID.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function fromXML(DOMElement $xml): static
9595
list($element) = $qname;
9696
}
9797
$ns = $xml->lookupNamespaceUri($prefix);
98-
$type = ($ns === null ) ? $element : implode(':', [$ns, $element]);
98+
$type = ($ns === null) ? $element : implode(':', [$ns, $element]);
9999

100100
// now check if we have a handler registered for it
101101
$handler = Utils::getContainer()->getExtensionHandler($type);

src/SAML2/XML/saml/Advice.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ public function __construct(
5555
*/
5656
public function isEmptyElement(): bool
5757
{
58-
return (
59-
empty($this->assertionIDRef)
58+
return empty($this->assertionIDRef)
6059
&& empty($this->assertionURIRef)
6160
&& empty($this->assertion)
6261
&& empty($this->encryptedAssertion)
63-
&& empty($this->getElements())
64-
);
62+
&& empty($this->getElements());
6563
}
6664

6765

src/SAML2/XML/saml/Conditions.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,12 @@ public function getProxyRestriction(): ?ProxyRestriction
117117
*/
118118
public function isEmptyElement(): bool
119119
{
120-
return (
121-
empty($this->notBefore)
120+
return empty($this->notBefore)
122121
&& empty($this->notOnOrAfter)
123122
&& empty($this->condition)
124123
&& empty($this->audienceRestriction)
125124
&& $this->oneTimeUse === false
126-
&& empty($this->proxyRestriction)
127-
);
125+
&& empty($this->proxyRestriction);
128126
}
129127

130128

src/SAML2/XML/saml/Evidence.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ public function __construct(
4242
*/
4343
public function isEmptyElement(): bool
4444
{
45-
return (
46-
empty($this->assertionIDRef)
45+
return empty($this->assertionIDRef)
4746
&& empty($this->assertionURIRef)
4847
&& empty($this->assertion)
49-
&& empty($this->encryptedAssertion)
50-
);
48+
&& empty($this->encryptedAssertion);
5149
}
5250

5351

src/SAML2/XML/saml/ProxyRestriction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace SimpleSAML\SAML2\XML\saml;
46

57
use DOMElement;

0 commit comments

Comments
 (0)