Skip to content

Commit

Permalink
white space and minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoCB committed Sep 27, 2024
1 parent 6140283 commit ccbf449
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ artisan.php
package-lock.json
package.json
vite.config.js
tags
4 changes: 4 additions & 0 deletions .phpactor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "/phpactor.schema.json",
"language_server_phpstan.enabled": false
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ parameters:
- The PHPDoc standard (PSR-19) is a work in progress, but can be found at:
https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md

### todo
- no switch statements, but always match
- not more than one elseif -> refactor to match
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public function getNodeType(): string

public function processNode(Node $node, Scope $scope): array
{


return $node->getDocComment() !== null
&& (str_contains($node->getDocComment()->getText(), '@SuppressWarnings("PHPMD")')
|| str_contains($node->getDocComment()->getText(), "@SuppressWarnings('PHPMD')"))
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/ForbidElvisOperatorRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
'vendor/bin/phpstan analyse tests/ExampleScripts/ScriptWithElvisOperator.php --error-format raw 2>&1
');

expect($output)->toContain( 'Use of the Elvis operator is forbidden.');
expect($output)->toContain('Use of the Elvis operator is forbidden.');
});
3 changes: 1 addition & 2 deletions tests/Rules/ForbidFunctionsWithoutReturnTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
'vendor/bin/phpstan analyse tests/ExampleScripts/FunctionWithoutReturnType.php --level 0 --error-format raw 2>&1'
);

expect($output)
->toContain('A return type is missing.');
expect($output)->toContain('A return type is missing.');
});
3 changes: 1 addition & 2 deletions tests/Rules/ForbidResponseInOrdinaryClassesRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
'vendor/bin/phpstan analyse tests/ExampleScripts/OrdinaryClassWithHttpResponse.php --level 0 --error-format raw 2>&1'
);

expect($output)
->toContain('must not return a response type Illuminate\Http\Response. Wrong class type.');
expect($output)->toContain('must not return a response type Illuminate\Http\Response. Wrong class type.');
});

0 comments on commit ccbf449

Please sign in to comment.