preset()->php(); arch()->preset()->security(); arch('it has no shell execution functions are used') ->expect(['exec', 'shell_exec', 'system', 'passthru', 'proc_open']) ->not->toBeUsed(); arch('it has no eval usage') ->expect(['eval']) ->not->toBeUsed(); arch('it has no dangerous file functions') ->expect(['file_get_contents', 'file_put_contents', 'fopen']) ->not->toBeUsed(); arch('it has no globals are used') ->expect(['$GLOBALS', 'global']) ->not->toBeUsed(); arch('it has no singletons') ->expect(['getInstance', 'instance']) ->not->toBeUsed(); arch('it has no insecure hashing') ->expect(['md5', 'sha1']) ->not->toBeUsed(); arch('it has no sleep function are used') ->expect(['sleep', 'usleep']) ->not->toBeUsed(); arch('it has no debug globals are used') ->expect(['var_dump', 'die', 'print_r']) ->not->toBeUsed(); arch('all app source files use strict types') ->expect('App') ->toUseStrictTypes(); arch('all domain source files use strict types') ->expect('Domain') ->toUseStrictTypes(); arch('all shared source files use strict types') ->expect('Shared') ->toUseStrictTypes(); });