for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Uxmp\Core\Component\Setup\Validator;
use Uxmp\Core\Component\Setup\Validator\Exception\EnvironmentValidationException;
final class LogPathValidator implements ValidatorInterface
{
public function validate(): void
$logPath = $_ENV['LOG_PATH'] ?? '';
if ($logPath === '') {
throw new EnvironmentValidationException(
'LOG_PATH is not set in config'
);
}
if (!is_writeable($logPath)) {
sprintf(
'LOG_PATH `%s` is not a valid writeable directory',
$logPath
)