Skip to content

Commit

Permalink
Fix code-style
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam committed Jan 16, 2019
1 parent eeebf6d commit fc22c53
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/DisallowFloatEverywhereRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Type\VerbosityLevel;
use function assert;
use function sprintf;

class DisallowFloatEverywhereRule implements Rule
Expand Down
3 changes: 2 additions & 1 deletion src/DisallowFloatInFunctionSignatureRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use function array_map;
use function array_merge;
use function array_values;
use function assert;
use function sprintf;

final class DisallowFloatInFunctionSignatureRule implements Rule
Expand All @@ -42,7 +43,7 @@ public function getNodeType() : string
public function processNode(Node $node, Scope $scope) : array
{
assert($node instanceof Function_);

$functionName = new Name($node->name->toString());
if (! $this->broker->hasCustomFunction($functionName, $scope)) {
return [];
Expand Down
1 change: 1 addition & 0 deletions src/DisallowFloatInMethodSignatureRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use function array_map;
use function array_merge;
use function array_values;
use function assert;
use function sprintf;

final class DisallowFloatInMethodSignatureRule implements Rule
Expand Down
3 changes: 2 additions & 1 deletion src/DisallowFloatPropertyTypeRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use PHPStan\Rules\Rule;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\VerbosityLevel;
use function assert;
use function sprintf;

final class DisallowFloatPropertyTypeRule implements Rule
Expand All @@ -25,7 +26,7 @@ public function getNodeType() : string
public function processNode(Node $node, Scope $scope) : array
{
assert($node instanceof PropertyProperty);

if (! $scope->isInClass()) {
throw new ShouldNotHappenException();
}
Expand Down

0 comments on commit fc22c53

Please sign in to comment.