[Maintenance] Ignore abstract classes in spec arkitect rule

This commit is contained in:
Jan Goralski 2024-01-26 14:52:45 +01:00
parent f357304fd1
commit 1502b3cabe
No known key found for this signature in database
GPG key ID: 95D91BA380F31EDD
3 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,7 @@ use Arkitect\ClassSet;
use Arkitect\CLI\Config; use Arkitect\CLI\Config;
use Arkitect\Expression\ForClasses\Extend; use Arkitect\Expression\ForClasses\Extend;
use Arkitect\Expression\ForClasses\HaveNameMatching; use Arkitect\Expression\ForClasses\HaveNameMatching;
use Arkitect\Expression\ForClasses\IsNotAbstract;
use Arkitect\Expression\ForClasses\IsFinal; use Arkitect\Expression\ForClasses\IsFinal;
use Arkitect\Expression\ForClasses\NotDependsOnTheseNamespaces; use Arkitect\Expression\ForClasses\NotDependsOnTheseNamespaces;
use Arkitect\Expression\ForClasses\ResideInOneOfTheseNamespaces; use Arkitect\Expression\ForClasses\ResideInOneOfTheseNamespaces;
@ -25,6 +26,7 @@ return static function (Config $config): void
, ,
Rule::allClasses() Rule::allClasses()
->that(new Extend(ObjectBehavior::class)) ->that(new Extend(ObjectBehavior::class))
->andThat(new IsNotAbstract())
->should(new IsFinal()) ->should(new IsFinal())
->because('Specifications should not be extendable') ->because('Specifications should not be extendable')
, ,

View file

@ -25,6 +25,7 @@ final class StatisticsDocumentationModifier implements DocumentationModifierInte
{ {
private const PATH = '/admin/statistics'; private const PATH = '/admin/statistics';
/** @param array<string, array<string, string>> $intervalsMap */
public function __construct( public function __construct(
private string $apiRoute, private string $apiRoute,
private DateTimeProviderInterface $dateTimeProvider, private DateTimeProviderInterface $dateTimeProvider,

View file

@ -111,7 +111,6 @@ final class StatisticsTest extends JsonApiTestCase
$this->assertResponseCode($this->client->getResponse(), Response::HTTP_NOT_FOUND); $this->assertResponseCode($this->client->getResponse(), Response::HTTP_NOT_FOUND);
} }
// * @dataProvider invalidPeriods TODO: split date range strictly by period, last period cut to fit
/** /**
* @test * @test
* *