From cc721383aefda13f4ae6190f4fc2f911354a7840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 23 Jun 2022 11:18:10 +0200 Subject: [PATCH] Suppress is_file warnings from entry file --- bin/phpstan | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/phpstan b/bin/phpstan index 31cbecd2bc..9ff67fb51f 100755 --- a/bin/phpstan +++ b/bin/phpstan @@ -84,7 +84,7 @@ use Symfony\Component\Console\Helper\ProgressBar; /** @var array|false $autoloadFunctionsBefore */ $autoloadFunctionsBefore = spl_autoload_functions(); - if (is_file($autoloaderInWorkingDirectory)) { + if (@is_file($autoloaderInWorkingDirectory)) { $composerAutoloaderProjectPaths[] = dirname($autoloaderInWorkingDirectory, 2); require_once $autoloaderInWorkingDirectory; @@ -93,7 +93,7 @@ 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; @@ -101,14 +101,14 @@ use Symfony\Component\Console\Helper\ProgressBar; } 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;