Skip to content

Commit

Permalink
fix(#10): check if config file is actually a file (#11)
Browse files Browse the repository at this point in the history
* Updated phar

* fix: check if phiremock config file is actually a file

* chore(#10): added php8.2 to scrutinizer

* fix: modified another file_exists check to be is_file

* chore: updated phiremock.phar
  • Loading branch information
mcustiel authored Mar 24, 2023
1 parent a5abd1a commit d8b0e3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ build:
environment:
php:
version: 8.1
php82:
environment:
php:
version: 8.2
Binary file modified phiremock.phar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/Utils/Config/ConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function getConfigurationFromConfigFile(): array
$configFiles = ['.phiremock', '.phiremock.dist'];
foreach ($configFiles as $configFileName) {
$configFilePath = $this->configPath->getFullSubpathAsString($configFileName);
if (file_exists($configFilePath)) {
if (is_file($configFilePath)) {
return require $configFilePath;
}
}
Expand All @@ -108,7 +108,7 @@ protected function searchFileAndGetConfig(): array
'.phiremock.dist',
];
foreach ($configFiles as $configFilePath) {
if (file_exists($configFilePath)) {
if (is_file($configFilePath)) {
return require $configFilePath;
}
}
Expand Down

0 comments on commit d8b0e3d

Please sign in to comment.