Skip to content

Commit

Permalink
fix file formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Jan 10, 2025
1 parent 991ae9c commit 9b7d05f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/phpstan/Rules/DiscourageWPOptionUsage.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;

class DiscourageWPOptionUsage implements Rule
{
public function getNodeType(): string
{
class DiscourageWPOptionUsage implements Rule {
public function getNodeType(): string {
return FuncCall::class;
}

public function processNode( Node $node, Scope $scope ): array
{
if (!$node instanceof FuncCall) {
public function processNode( Node $node, Scope $scope ): array {
if ( !$node instanceof FuncCall ) {
return [];
}

Expand All @@ -29,7 +26,7 @@ public function processNode( Node $node, Scope $scope ): array
'delete_option' => true,
];

if (isset($discouragedFunctions[$functionName])) {
if ( isset( $discouragedFunctions[ $functionName ] ) ) {
return [
RuleErrorBuilder::message( sprintf( 'Usage of %1$s() is discouraged. Use the Option object instead.', $functionName ) )
->identifier('custom.rules.discourageOptionUsage')
Expand Down

0 comments on commit 9b7d05f

Please sign in to comment.