Skip to content
Open
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
2 changes: 0 additions & 2 deletions bin/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
use Rector\Bootstrap\AutoloadFileParameterResolver;
use Rector\Bootstrap\RectorConfigsResolver;
use Rector\ChangesReporting\Output\JsonOutputFormatter;
use Rector\Config\RectorConfig;
use Rector\Configuration\Option;
use Rector\Console\Style\SymfonyStyleFactory;
use Rector\DependencyInjection\LazyContainerFactory;
use Rector\DependencyInjection\RectorContainerFactory;
use Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory;
use Rector\Util\Reflection\PrivatesAccessor;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"webmozart/assert": "^2.4"
},
"require-dev": {
"boundwize/structarmed": "^0.14",
"boundwize/structarmed": "^0.15",
"nette/robot-loader": "^4.1",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpstan/extension-installer": "^1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\FixtureAutoImportNames;

class SomeShort
final class SomeShort
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @see RFC https://wiki.php.net/rfc/first_class_callable_syntax
* @see \Rector\Tests\Php81\Rector\Array_\ArrayToFirstClassCallableRector\ArrayToFirstClassCallableRectorTest
*/
class ArrayToFirstClassCallableRector extends AbstractRector implements MinPhpVersionInterface
final class ArrayToFirstClassCallableRector extends AbstractRector implements MinPhpVersionInterface
{
public function __construct(
private readonly ArrayCallableMethodMatcher $arrayCallableMethodMatcher,
Expand Down
2 changes: 1 addition & 1 deletion src/PhpParser/Node/FileNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Inspired by https://github.com/phpstan/phpstan-src/commit/ed81c3ad0b9877e6122c79b4afda9d10f3994092
*/
class FileNode extends Stmt
final class FileNode extends Stmt
{
/**
* Imports queued to be added on the next UseAddingPostRector run; scoped to this file
Expand Down
8 changes: 8 additions & 0 deletions structarmed.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
use Boundwize\StructArmed\Architecture;
use Boundwize\StructArmed\Preset\Preset;
use Boundwize\StructArmed\Preset\Presets\Psr4Preset;
use Boundwize\StructArmed\Rule\Rules\Class_\MustBeFinalRule;

return Architecture::define()
->rule(
'source.must_be_final',
new MustBeFinalRule(layer: 'Source'),
)
->skip([
Psr4Preset::CLASSES_MUST_MATCH_COMPOSER => [
// the namespace different is on purpose
Expand All @@ -19,5 +24,8 @@
// simulate under phpstan.phar
__DIR__ . '/rules-tests/Php71/Rector/FuncCall/RemoveExtraParametersRector/Source/phpstan.phar',
],
'source.must_be_final' => [
'*/Source/*',
],
])
->withPreset(Preset::PSR4());
Loading