forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
73 additions
and
4 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
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
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
25 changes: 25 additions & 0 deletions
25
src/Core/DevOps/StaticAnalyze/PHPStan/Rules/MessageHandlerFinalRule.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,25 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules; | ||
|
||
use PHPat\Selector\Selector; | ||
use PHPat\Test\Attributes\TestRule; | ||
use PHPat\Test\Builder\Rule; | ||
use PHPat\Test\PHPat; | ||
use Shopware\Core\Framework\Log\Package; | ||
use Symfony\Component\Messenger\Attribute\AsMessageHandler; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
#[Package('core')] | ||
class MessageHandlerFinalRule | ||
{ | ||
#[TestRule] | ||
public function isMessageHandlerFinal(): Rule | ||
{ | ||
return PHPat::rule() | ||
->classes(Selector::appliesAttribute(AsMessageHandler::class)) | ||
->shouldBeFinal(); | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
src/Core/DevOps/StaticAnalyze/PHPStan/Rules/NotExtendFlowEventAwareRule.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,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules; | ||
|
||
use PHPat\Selector\Selector; | ||
use PHPat\Test\Attributes\TestRule; | ||
use PHPat\Test\Builder\Rule; | ||
use PHPat\Test\PHPat; | ||
use Shopware\Core\Framework\Event\FlowEventAware; | ||
use Shopware\Core\Framework\Log\Package; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
#[Package('core')] | ||
class NotExtendFlowEventAwareRule | ||
{ | ||
#[TestRule] | ||
public function doNotExtendFlowEventAware(): Rule | ||
{ | ||
return PHPat::rule() | ||
->classes(Selector::isInterface()) | ||
->shouldNotDependOn() | ||
->classes(Selector::classname(FlowEventAware::class)); | ||
} | ||
} |
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