for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Soluble\MediaTools\Common\Assert;
use Soluble\MediaTools\Common\Exception\FileNotFoundException;
trait PathAssertionsTrait
{
/**
* @throws FileNotFoundException
*/
protected function ensureFileExists(string $file): void
if (!file_exists($file)) {
throw new FileNotFoundException(sprintf('File "%s" does not exists or is not readable', $file));
}