Skip to content

Commit c91de93

Browse files
committed
fix cs
1 parent 53cd8d4 commit c91de93

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
"thecodingmachine/safe": "<1.1.3"
5151
},
5252
"scripts": {
53+
"cs": "tools/vendor/bin/phpcs",
54+
"csfix": "tools/vendor/bin/phpcbf",
5355
"psalm": "tools/vendor/bin/psalm",
5456
"psalm-baseline": "tools/vendor/bin/psalm --set-baseline=psalm-baseline.xml"
5557
},

src/Reflection/ReflectionConstant.php

+5-11
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,12 @@ class ReflectionConstant implements Reflection
6161
/** @psalm-allow-private-mutation */
6262
private CompiledValue|null $compiledValue = null;
6363

64-
/**
65-
* @param non-empty-string|null $namespace
66-
*/
64+
/** @param non-empty-string|null $namespace */
6765
private function __construct(
6866
private Reflector $reflector,
6967
Node\Stmt\Const_|Node\Expr\FuncCall $node,
7068
private LocatedSource $locatedSource,
71-
/**
72-
* @psalm-allow-private-mutation
73-
*/
69+
/** @psalm-allow-private-mutation */
7470
private string|null $namespace = null,
7571
int|null $positionInNode = null,
7672
) {
@@ -113,8 +109,8 @@ public static function createFromName(string $constantName): self
113109
*
114110
* @internal
115111
*
116-
* @param Node\Stmt\Const_|Node\Expr\FuncCall $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
117-
* @param non-empty-string|null $namespace
112+
* @param Node\Stmt\Const_|Node\Expr\FuncCall $node Node has to be processed by the PhpParser\NodeVisitor\NameResolver
113+
* @param non-empty-string|null $namespace
118114
*/
119115
public static function createFromNode(
120116
Reflector $reflector,
@@ -132,9 +128,7 @@ public static function createFromNode(
132128
return self::createFromDefineFunctionCall($reflector, $node, $locatedSource);
133129
}
134130

135-
/**
136-
* @param non-empty-string|null $namespace
137-
*/
131+
/** @param non-empty-string|null $namespace */
138132
private static function createFromConstKeyword(
139133
Reflector $reflector,
140134
Node\Stmt\Const_ $node,

src/Reflection/ReflectionEnum.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private function __construct(
4747
/**
4848
* @internal
4949
*
50-
* @param EnumNode $node
50+
* @param EnumNode $node
5151
* @param non-empty-string|null $namespace
5252
*
5353
* @psalm-suppress MoreSpecificImplementedParamType

src/Reflection/ReflectionFunction.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ class ReflectionFunction implements Reflection
2929

3030
private bool $isStatic;
3131

32-
/**
33-
* @param non-empty-string|null $namespace
34-
*/
32+
/** @param non-empty-string|null $namespace */
3533
private function __construct(
3634
private Reflector $reflector,
3735
Node\Stmt\ClassMethod|Node\Stmt\Function_|Node\Expr\Closure|Node\Expr\ArrowFunction $node,

src/SourceLocator/Ast/Strategy/NodeToReflection.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Roave\BetterReflection\SourceLocator\Ast\Strategy;
66

7+
use LogicException;
78
use PhpParser\Node;
89
use Roave\BetterReflection\Reflection\ReflectionClass;
910
use Roave\BetterReflection\Reflection\ReflectionConstant;
@@ -29,7 +30,7 @@ public function __invoke(
2930
$namespaceName = $namespace?->name?->name;
3031

3132
if ($namespaceName === '') {
32-
throw new \LogicException('Namespace name should never be empty');
33+
throw new LogicException('Namespace name should never be empty');
3334
}
3435

3536
if ($node instanceof Node\Stmt\Enum_) {

0 commit comments

Comments
 (0)