|
|
|
|
@ -9,8 +9,8 @@ class FileScanner |
|
|
|
|
private string $directory; |
|
|
|
|
private array $excludePatterns; |
|
|
|
|
|
|
|
|
|
const array PHP_EXT = ['php']; |
|
|
|
|
const array CPP_EXT = ['cpp', 'cxx', 'cc']; |
|
|
|
|
public const array PHP_EXT = ['php']; |
|
|
|
|
public const array CPP_EXT = ['cpp', 'cxx', 'cc']; |
|
|
|
|
|
|
|
|
|
public function __construct(string $directory) |
|
|
|
|
{ |
|
|
|
|
@ -32,12 +32,12 @@ class FileScanner |
|
|
|
|
return pathinfo($path, PATHINFO_EXTENSION); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static function isPhpFile(string $file): bool |
|
|
|
|
public static function isPhpFile(string $file): bool |
|
|
|
|
{ |
|
|
|
|
return in_array(self::getFileExt($file), self::PHP_EXT); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static function isCppFile(string $file): bool |
|
|
|
|
public static function isCppFile(string $file): bool |
|
|
|
|
{ |
|
|
|
|
return in_array(self::getFileExt($file), self::CPP_EXT); |
|
|
|
|
} |
|
|
|
|
|