Skip to content

Commit

Permalink
Fix PhpStan warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
joserick committed Nov 2, 2020
1 parent 1f27701 commit c46f0c6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/PNGMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class PNGMetadata extends ArrayObject
*/
private array $prefSuffXMP = ['stRef', 'rdf', 'li', 'Alt', 'stEvt', 'Bag', 'Seq', 'crs'];


/**
* Initializes the functions required for metadata extraction.
*
Expand Down Expand Up @@ -206,7 +207,7 @@ public static function getType(string $path)
{
if (!$path) {
throw new \InvalidArgumentException('The argument path is empty', 101);
}else if (!file_exists($path)){
} elseif (!file_exists($path)) {
throw new \InvalidArgumentException('The file path does not exist or it\'s inaccessible', 102);
}

Expand Down Expand Up @@ -241,9 +242,9 @@ public function getThumbnail()
*/
private function checkPath(string $path): void
{
if($this->isPNG($path)){
if ($this->isPNG($path)) {
$this->path = $path;
}else{
} else {
throw new \InvalidArgumentException('The file path isn\'t PNG', 103);
}
}
Expand Down Expand Up @@ -333,6 +334,7 @@ private function printVertical(string $lastKey = '', ?array $array = null): arra
return array_merge(...$columns);
}


/**
* Extract the data chunks more important.
*
Expand Down Expand Up @@ -462,7 +464,6 @@ private function extractRBG(): void
}



/**
* Extract Exif data from eXIf chunk as a array.
*
Expand Down

0 comments on commit c46f0c6

Please sign in to comment.