final protected function assertClassesAreAbstractOrFinal(string $directory, array $excludeClassNames = []): void
    {
        $this->assertClassyConstructsSatisfySpecification(
            static function (string $className): bool {
                $reflection = new \ReflectionClass($className);

                return $reflection->isAbstract()
                    || $reflection->isFinal()
                    || $reflection->isInterface()
                    || $reflection->isTrait();
            },
            $directory,
            $excludeClassNames,
            "Failed asserting that the classes\n\n%s\n\nare abstract or final."
        );
    }