Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Symfony 5.1] Add LogoutHandlerToLogoutEventSubscriberRector
- Loading branch information
1 parent
c32d4d8
commit b6e145b
Showing
11 changed files
with
444 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
rules/symfony-code-quality/src/Contract/EventReferenceToMethodNameInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\SymfonyCodeQuality\Contract; | ||
|
||
use PhpParser\Node\Expr\ClassConstFetch; | ||
|
||
interface EventReferenceToMethodNameInterface | ||
{ | ||
public function getClassConstFetch(): ClassConstFetch; | ||
|
||
public function getMethodName(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
rules/symfony-code-quality/src/ValueObject/EventReferenceToMethodNameWithPriority.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\SymfonyCodeQuality\ValueObject; | ||
|
||
use PhpParser\Node\Expr\ClassConstFetch; | ||
use Rector\SymfonyCodeQuality\Contract\EventReferenceToMethodNameInterface; | ||
|
||
final class EventReferenceToMethodNameWithPriority implements EventReferenceToMethodNameInterface | ||
{ | ||
/** | ||
* @var ClassConstFetch | ||
*/ | ||
private $classConstFetch; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $methodName; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
private $priority; | ||
|
||
public function __construct(ClassConstFetch $classConstFetch, string $methodName, int $priority) | ||
{ | ||
$this->classConstFetch = $classConstFetch; | ||
$this->methodName = $methodName; | ||
$this->priority = $priority; | ||
} | ||
|
||
public function getClassConstFetch(): ClassConstFetch | ||
{ | ||
return $this->classConstFetch; | ||
} | ||
|
||
public function getMethodName(): string | ||
{ | ||
return $this->methodName; | ||
} | ||
|
||
public function getPriority(): int | ||
{ | ||
return $this->priority; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.