mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
fix linter (#4537)
This commit is contained in:
parent
c03b66f7cd
commit
e7c1ded364
2
.github/workflows/code_analysis.yaml
vendored
2
.github/workflows/code_analysis.yaml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
|
||||
-
|
||||
name: 'PHP Linter'
|
||||
run: vendor/bin/parallel-lint src bin/rector config compiler tests packages rules --exclude packages/rector-generator/templates --colors
|
||||
run: vendor/bin/parallel-lint src bin/rector config compiler tests packages rules --exclude packages/rector-generator/templates --colors --exclude rules/psr4/tests/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector/Source --exclude rules/autodiscovery/tests/Rector/FileNode/MoveInterfacesToContractNamespaceDirectoryRector/Expected
|
||||
|
||||
name: ${{ matrix.actions.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -100,7 +100,7 @@ final class RectorsDocumentationPrinter
|
||||
|
||||
/**
|
||||
* @param RectorInterface[] $rectors
|
||||
* @return array<string, RectorInterface[]&mixed[]>
|
||||
* @return array<string, RectorInterface[]>
|
||||
*/
|
||||
private function groupRectorsByPackage(array $rectors): array
|
||||
{
|
||||
|
@ -129,6 +129,7 @@ parameters:
|
||||
- packages/better-php-doc-parser/src/ValueObject/PhpDocNode/AbstractTagValueNode.php
|
||||
- packages/file-system-rector/src/Rector/AbstractFileSystemRector.php
|
||||
- packages/testing/src/PHPUnit/*.php
|
||||
- packages/node-type-resolver/tests/NodeVisitor/FunctionMethodAndClassNodeVisitor/FunctionMethodAndClassNodeVisitorTest.php
|
||||
|
||||
# phsptan bug
|
||||
- utils/phpstan-extensions/src/Rule/PreventParentMethodVisibilityOverrideRule.php
|
||||
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Rector\NetteKdyby\Tests\Rector\MethodCall\ReplaceEventManagerWithEventSubscriberRector;
|
||||
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\NetteKdyby\Rector\MethodCall\ReplaceEventManagerWithEventSubscriberRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
@ -25,4 +26,9 @@ final class ReplaceEventManagerWithEventSubscriberRectorTest extends AbstractRec
|
||||
{
|
||||
return ReplaceEventManagerWithEventSubscriberRector::class;
|
||||
}
|
||||
|
||||
protected function getPhpVersion(): string
|
||||
{
|
||||
return PhpVersionFeature::BEFORE_TYPED_PROPERTIES;
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,14 @@ namespace Rector\NetteKdyby\Tests\Rector\MethodCall\ReplaceEventManagerWithEvent
|
||||
|
||||
final class SomeClassCopyEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
{
|
||||
private \Rector\NetteKdyby\Tests\Rector\MethodCall\ReplaceEventManagerWithEventSubscriberRector\Fixture\SomeClass $someClass;
|
||||
private string $key;
|
||||
/**
|
||||
* @var \Rector\NetteKdyby\Tests\Rector\MethodCall\ReplaceEventManagerWithEventSubscriberRector\Fixture\SomeClass
|
||||
*/
|
||||
private $someClass;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $key;
|
||||
public function __construct(\Rector\NetteKdyby\Tests\Rector\MethodCall\ReplaceEventManagerWithEventSubscriberRector\Fixture\SomeClass $someClass, string $key)
|
||||
{
|
||||
$this->someClass = $someClass;
|
||||
|
@ -9,6 +9,10 @@ use Throwable;
|
||||
|
||||
final class ShouldNotHappenException extends Exception
|
||||
{
|
||||
/**
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
*/
|
||||
public function __construct($message = '', $code = 0, ?Throwable $throwable = null)
|
||||
{
|
||||
if ($message === '') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user