expect('Shared') ->not->toUse([ 'Domain', 'Application', 'Presentation', 'Infra', 'Infrastructure', 'App', ]); arch('Shared layer does not depend on Illuminate or Symfony frameworks') ->expect('Shared') ->not->toUse([ 'Illuminate', 'Symfony', ]); arch('Shared layer does not use Laravel helper functions') ->expect('Shared') ->not->toUse([ 'abort', 'app', 'auth', 'asset', 'back', 'bcrypt', 'broadcast', 'cache', 'config', 'cookie', 'csrf_token', 'dd', 'dump', 'decrypt', 'dispatch', 'event', 'factory', 'logger', 'redirect', 'request', 'response', 'route', 'session', 'storage', 'url', 'throw_if', 'throw_unless', '__', 'trans', 'trans_choice', 'view', ]); arch('Shared Value Objects are final and readonly') ->expect([ 'Shared\ValueObjects', 'Shared\Pagination', ]) ->classes() ->toBeReadonly() ->toBeFinal(); arch('Shared DDD Ports contain only interfaces') ->expect('Shared\DDD\Port') ->classes() ->toBeInterface(); arch('Shared DDD Models contain interfaces') ->expect('Shared\DDD\Model') ->classes() ->toBeInterface() ->ignoring([ EntityId::class, ]); arch('Shared DDD Events contain only interfaces') ->expect('Shared\DDD\Event') ->classes() ->toBeInterface(); arch('Shared DDD Security contracts contain only interfaces') ->expect('Shared\DDD\Security') ->classes() ->toBeInterface(); arch('Shared layer uses strict types') ->expect('Shared') ->toUseStrictTypes(); });