Skip to content

Commit

Permalink
Fix codesniffer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Mar 16, 2023
1 parent 633c68d commit 31a2455
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 41 deletions.
6 changes: 2 additions & 4 deletions src/SAML2/Binding.php
Expand Up @@ -111,10 +111,8 @@ public static function getCurrentBinding(ServerRequestInterface $request): Bindi
if (
($contentType === 'text/xml' || $contentType === 'application/xml')
// See paragraph 3.2.3 of Binding for SAML2 (OASIS)
|| (
$request->hasHeader('SOAPAction')
&& $request->getHeader('SOAPAction')[0] === 'http://www.oasis-open.org/committees/security'
)
|| ($request->hasHeader('SOAPAction')
&& $request->getHeader('SOAPAction')[0] === 'http://www.oasis-open.org/committees/security')
) {
return new SOAP();
}
Expand Down
2 changes: 2 additions & 0 deletions src/SAML2/Utils/XPath.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SimpleSAML\SAML2\Utils;

use DOMNode;
Expand Down
2 changes: 2 additions & 0 deletions src/SAML2/XML/md/AbstractMetadataDocument.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SimpleSAML\SAML2\XML\md;

use DOMElement;
Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/mdui/DiscoHints.php
Expand Up @@ -99,12 +99,10 @@ public function addChild(Chunk $child): void
*/
public function isEmptyElement(): bool
{
return (
empty($this->elements)
return empty($this->elements)
&& empty($this->ipHint)
&& empty($this->domainHint)
&& empty($this->geolocationHint)
);
&& empty($this->geolocationHint);
}


Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/mdui/UIInfo.php
Expand Up @@ -202,15 +202,13 @@ public function addChild(Chunk $child): void
*/
public function isEmptyElement(): bool
{
return (
empty($this->displayName)
return empty($this->displayName)
&& empty($this->description)
&& empty($this->informationURL)
&& empty($this->privacyStatementURL)
&& empty($this->keywords)
&& empty($this->logo)
&& empty($this->elements)
);
&& empty($this->elements);
}


Expand Down
2 changes: 1 addition & 1 deletion src/SAML2/XML/saml/AbstractBaseID.php
Expand Up @@ -95,7 +95,7 @@ public static function fromXML(DOMElement $xml): static
list($element) = $qname;
}
$ns = $xml->lookupNamespaceUri($prefix);
$type = ($ns === null ) ? $element : implode(':', [$ns, $element]);
$type = ($ns === null) ? $element : implode(':', [$ns, $element]);

// now check if we have a handler registered for it
$handler = Utils::getContainer()->getExtensionHandler($type);
Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/saml/Advice.php
Expand Up @@ -55,13 +55,11 @@ public function __construct(
*/
public function isEmptyElement(): bool
{
return (
empty($this->assertionIDRef)
return empty($this->assertionIDRef)
&& empty($this->assertionURIRef)
&& empty($this->assertion)
&& empty($this->encryptedAssertion)
&& empty($this->getElements())
);
&& empty($this->getElements());
}


Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/saml/Conditions.php
Expand Up @@ -117,14 +117,12 @@ public function getProxyRestriction(): ?ProxyRestriction
*/
public function isEmptyElement(): bool
{
return (
empty($this->notBefore)
return empty($this->notBefore)
&& empty($this->notOnOrAfter)
&& empty($this->condition)
&& empty($this->audienceRestriction)
&& $this->oneTimeUse === false
&& empty($this->proxyRestriction)
);
&& empty($this->proxyRestriction);
}


Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/saml/Evidence.php
Expand Up @@ -42,12 +42,10 @@ public function __construct(
*/
public function isEmptyElement(): bool
{
return (
empty($this->assertionIDRef)
return empty($this->assertionIDRef)
&& empty($this->assertionURIRef)
&& empty($this->assertion)
&& empty($this->encryptedAssertion)
);
&& empty($this->encryptedAssertion);
}


Expand Down
2 changes: 2 additions & 0 deletions src/SAML2/XML/saml/ProxyRestriction.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SimpleSAML\SAML2\XML\saml;

use DOMElement;
Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/saml/SubjectConfirmationData.php
Expand Up @@ -137,15 +137,13 @@ public function getInfo(): array
*/
public function isEmptyElement(): bool
{
return (
empty($this->notBefore)
return empty($this->notBefore)
&& empty($this->notOnOrAfter)
&& empty($this->recipient)
&& empty($this->inResponseTo)
&& empty($this->address)
&& empty($this->info)
&& empty($this->namespacedAttributes)
);
&& empty($this->namespacedAttributes);
}


Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/saml/SubjectLocality.php
Expand Up @@ -60,10 +60,8 @@ public function getDnsName(): ?string
*/
public function isEmptyElement(): bool
{
return (
empty($this->address)
&& empty($this->dnsName)
);
return empty($this->address)
&& empty($this->dnsName);
}


Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/samlp/NameIDPolicy.php
Expand Up @@ -68,11 +68,9 @@ public function getAllowCreate(): ?bool
*/
public function isEmptyElement(): bool
{
return (
empty($this->Format)
return empty($this->Format)
&& empty($this->SPNameQualifier)
&& empty($this->AllowCreate)
);
&& empty($this->AllowCreate);
}


Expand Down
6 changes: 2 additions & 4 deletions src/SAML2/XML/samlp/Scoping.php
Expand Up @@ -71,11 +71,9 @@ public function getProxyCount(): ?int
*/
public function isEmptyElement(): bool
{
return (
empty($this->proxyCount)
return empty($this->proxyCount)
&& empty($this->IDPList)
&& empty($this->requesterId)
);
&& empty($this->requesterId);
}


Expand Down

0 comments on commit 31a2455

Please sign in to comment.