Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@
"rector:fix": "bash vendor/zairakai/laravel-dev-tools/scripts/rector-fix.sh",
"test:coverage": "COVERAGE=true bash vendor/zairakai/laravel-dev-tools/scripts/test.sh",
"test:unit": "TESTSUITE=Unit bash vendor/zairakai/laravel-dev-tools/scripts/test.sh",
"test": "bash vendor/zairakai/laravel-dev-tools/scripts/test.sh"
"test": "bash vendor/zairakai/laravel-dev-tools/scripts/test.sh",
"cs:fix": "bash vendor/zairakai/laravel-dev-tools/scripts/cs-fix.sh",
"quality": "make quality",
"quality:fast": "make quality-fast",
"quality:fix": "make quality-fix"
},
"extra": {
"laravel": {
Expand Down
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions config/dev-tools/insights.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
* as it replaces by index instead of merging.
*/

use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenDefineFunctions;
use SlevomatCodingStandard\Sniffs\Classes\ForbiddenPublicPropertySniff;
use SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff;

/* Load base configuration from package */
$baseConfig = [];

Expand Down Expand Up @@ -61,29 +57,6 @@
* ];
*/

// Eloquent and the queue read these properties publicly ($timestamps, $timeout, $tries, promoted job arguments).
$baseConfig['config'][ForbiddenPublicPropertySniff::class] = [
'exclude' => [
'app/Models',
'app/Jobs',
],
];

// Eloquent relations are typed with generics (BelongsTo<Commune, $this>) that the sniff cannot read.
$baseConfig['config'][ReturnTypeHintSniff::class] = [
...($baseConfig['config'][ReturnTypeHintSniff::class] ?? []),
'exclude' => [
'app/Models',
],
];

// PHPInsights does not read the methods of an enum and takes them for global functions.
$baseConfig['config'][ForbiddenDefineFunctions::class] = [
'exclude' => [
'app/Enums',
],
];

// The PHPStan result cache (build/) is made of PHP files that must not be analysed.
$baseConfig['exclude'] = [
...($baseConfig['exclude'] ?? []),
Expand Down
4 changes: 1 addition & 3 deletions config/dev-tools/rector.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

declare(strict_types=1);
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Zairakai\LaravelDevTools\Rector\RectorBaseConfig;

/**
Expand Down Expand Up @@ -61,9 +60,8 @@
);
}

// The package skips this rule but registers it in no set: registering it here removes the Rector warning.
return $fqcn::configure(
projectRoot: $projectRoot,
extraPaths: [],
extraSkips: [],
)->withRules([AddOverrideAttributeToOverriddenMethodsRector::class]);
);
Loading