Skip to content

Commit

Permalink
Run pint on ValidatorTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
JanOppolzer committed Jan 9, 2025
1 parent f9b15a6 commit b7bc647
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/Traits/ValidatorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,35 +766,36 @@ public function checkServiceProviderRequestedAttributeNameValueDuplicity(object
}
}


public function checkAttributeForContentExistence(mixed $attributes):void{
public function checkAttributeForContentExistence(mixed $attributes): void
{

foreach ($attributes as $attribute) {
if(empty($attribute->nodeValue)){
if (empty($attribute->nodeValue)) {
$this->error .= " $attribute->localName attribute is empty please fill the attribute. ";
break;
}
}

}
public function checkAttributeForEmptyContent(mixed $attributes):void

public function checkAttributeForEmptyContent(mixed $attributes): void
{
foreach ($attributes as $attribute) {
if(!empty($attribute->nodeValue)){
if (! empty($attribute->nodeValue)) {
$this->error .= " $attribute->localName attribute is not empty please clear the attribute content. ";
break;
}
}
}

public function checkAttributeConsumingService(object $xpath):void
public function checkAttributeConsumingService(object $xpath): void
{
$contentExistence = [
"ServiceName",
"ServiceDescription",
'ServiceName',
'ServiceDescription',
];

$contentEmptiness = [
"RequestedAttribute",
'RequestedAttribute',
];

foreach ($contentExistence as $content) {
Expand All @@ -803,7 +804,6 @@ public function checkAttributeConsumingService(object $xpath):void
foreach ($contentEmptiness as $content) {
$this->checkAttributeForEmptyContent($xpath->query("/md:EntityDescriptor/md:SPSSODescriptor/md:AttributeConsumingService/md:$content"));
}

}

public function generateResult(): void
Expand Down

0 comments on commit b7bc647

Please sign in to comment.