Skip to content

Commit

Permalink
Suppress is_file warnings from entry file
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored and ondrejmirtes committed Jun 23, 2022
1 parent 9496feb commit cc72138
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/phpstan
Expand Up @@ -84,7 +84,7 @@ use Symfony\Component\Console\Helper\ProgressBar;
/** @var array<callable>|false $autoloadFunctionsBefore */
$autoloadFunctionsBefore = spl_autoload_functions();

if (is_file($autoloaderInWorkingDirectory)) {
if (@is_file($autoloaderInWorkingDirectory)) {
$composerAutoloaderProjectPaths[] = dirname($autoloaderInWorkingDirectory, 2);

require_once $autoloaderInWorkingDirectory;
Expand All @@ -93,22 +93,22 @@ use Symfony\Component\Console\Helper\ProgressBar;
$autoloadProjectAutoloaderFile = function (string $file) use (&$composerAutoloaderProjectPaths): void {
$path = dirname(__DIR__) . $file;
if (!extension_loaded('phar')) {
if (is_file($path)) {
if (@is_file($path)) {
$composerAutoloaderProjectPaths[] = dirname($path, 2);

require_once $path;
}
} else {
$pharPath = \Phar::running(false);
if ($pharPath === '') {
if (is_file($path)) {
if (@is_file($path)) {
$composerAutoloaderProjectPaths[] = dirname($path, 2);

require_once $path;
}
} else {
$path = dirname($pharPath) . $file;
if (is_file($path)) {
if (@is_file($path)) {
$composerAutoloaderProjectPaths[] = dirname($path, 2);

require_once $path;
Expand Down

0 comments on commit cc72138

Please sign in to comment.