for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Helldar\Support\Helpers\Filesystem;
use Helldar\Support\Exceptions\DirectoryNotFoundException;
class File
{
public function all(string $path): array
if (Directory::doesntExist($path)) {
Helldar\Support\Helpers\...irectory::doesntExist()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
if (Directory::/** @scrutinizer ignore-call */ doesntExist($path)) {
throw new DirectoryNotFoundException($path);
}
$files = [];
foreach (Directory::all($path) as $iterator) {
Helldar\Support\Helpers\...system\Directory::all()
foreach (Directory::/** @scrutinizer ignore-call */ all($path) as $iterator) {
if ($iterator->isFile()) {
$files[] = $files;
return $files;
public function store(string $path, string $content)
Directory::make(pathinfo($path, PATHINFO_DIRNAME));
Helldar\Support\Helpers\...ystem\Directory::make()
Directory::/** @scrutinizer ignore-call */
make(pathinfo($path, PATHINFO_DIRNAME));
file_put_contents($path, $content);
public function exists(string $path): bool
return file_exists($path);