preset()->php(); // Le helper assert natif est interdit en faveur de Webmozart\Assert arch()->preset()->security(); arch('assert is not used in src (use Webmozart\Assert instead)') ->expect('assert') ->not->toBeUsed(); arch('config() helper is not used in src (use Config facade instead)') ->expect('config') ->not->toBeUsed(); arch('env() helper is not used in src (use Config facade instead)') ->expect('env') ->not->toBeUsed(); arch('debug functions are not used in src') ->expect(['dd', 'dump', 'var_dump', 'die', 'print_r', 'ray']) ->not->toBeUsed(); arch('shell execution functions are not used in src') ->expect(['exec', 'shell_exec', 'system', 'passthru', 'proc_open']) ->not->toBeUsed(); arch('eval function is not used in src') ->expect('eval') ->not->toBeUsed(); arch('insecure hashing functions are not used in src') ->expect(['md5', 'sha1']) ->not->toBeUsed(); arch('sleep functions are not used in src') ->expect(['sleep', 'usleep']) ->not->toBeUsed(); arch('all Domain source files use strict types') ->expect('Domain') ->toUseStrictTypes(); arch('all Application source files use strict types') ->expect('Application') ->toUseStrictTypes(); arch('all Presentation source files use strict types') ->expect('Presentation') ->toUseStrictTypes(); arch('all Infra source files use strict types') ->expect('Infra') ->toUseStrictTypes(); arch('all Shared source files use strict types') ->expect('Shared') ->toUseStrictTypes(); });