Skip to content

Commit

Permalink
fix: exclude some folders for verification
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Oct 28, 2024
1 parent b1f054b commit bb60458
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions phpmyfaq/src/phpMyFAQ/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ public function createHashes(): string
try {
foreach ($files as $file) {
if (
'php' === pathinfo((string) $file->getFilename(), PATHINFO_EXTENSION) && !str_contains(
(string)$file->getPath(),
'/tests/'
)
'php' === pathinfo((string) $file->getFilename(), PATHINFO_EXTENSION) &&
!str_contains((string)$file->getPath(), '/tests/') &&
!str_contains((string)$file->getPath(), '/multisites/') &&
!str_contains((string)$file->getPath(), '/upgrades/')
) {
$current = str_replace(PMF_ROOT_DIR, '', (string) $file->getPathname());

Expand All @@ -393,8 +393,8 @@ public function createHashes(): string
$hashes[$current] = sha1(file_get_contents($file->getPathname()));
}
}
} catch (UnexpectedValueException $unexpectedValueException) {
$hashes[$current . ' failed'] = $unexpectedValueException->getMessage();
} catch (UnexpectedValueException $exception) {
$hashes[$current . ' failed'] = $exception->getMessage();
}

return json_encode($hashes, JSON_THROW_ON_ERROR);
Expand Down

0 comments on commit bb60458

Please sign in to comment.