Skip to content

Commit b91aad4

Browse files
committed
Revert "Fix coding standards"
This reverts commit 47eda59.
1 parent 47eda59 commit b91aad4

File tree

14 files changed

+38
-38
lines changed

14 files changed

+38
-38
lines changed

src/Analyzer/ClassDescription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(
5757
bool $enum,
5858
array $docBlock,
5959
array $attributes,
60-
string $filePath,
60+
string $filePath
6161
) {
6262
$this->FQCN = $FQCN;
6363
$this->filePath = $filePath;

src/Analyzer/DocblockTypesResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function enterNode(Node $node): void
6969

7070
private function resolvePropertyTypes(Node $node): void
7171
{
72-
if (!$node instanceof Stmt\Property) {
72+
if (!($node instanceof Stmt\Property)) {
7373
return;
7474
}
7575

src/Analyzer/FileParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929
FileVisitor $fileVisitor,
3030
NameResolver $nameResolver,
3131
DocblockTypesResolver $docblockTypesResolver,
32-
TargetPhpVersion $targetPhpVersion,
32+
TargetPhpVersion $targetPhpVersion
3333
) {
3434
$this->fileVisitor = $fileVisitor;
3535
$this->parsingErrors = [];

src/Analyzer/FileVisitor.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function leaveNode(Node $node): void
109109

110110
private function handleClassNode(Node $node): void
111111
{
112-
if (!$node instanceof Node\Stmt\Class_) {
112+
if (!($node instanceof Node\Stmt\Class_)) {
113113
return;
114114
}
115115

@@ -140,7 +140,7 @@ private function handleClassNode(Node $node): void
140140

141141
private function handleAnonClassNode(Node $node): void
142142
{
143-
if (!$node instanceof Node\Stmt\Class_) {
143+
if (!($node instanceof Node\Stmt\Class_)) {
144144
return;
145145
}
146146

@@ -161,7 +161,7 @@ private function handleAnonClassNode(Node $node): void
161161

162162
private function handleEnumNode(Node $node): void
163163
{
164-
if (!$node instanceof Node\Stmt\Enum_) {
164+
if (!($node instanceof Node\Stmt\Enum_)) {
165165
return;
166166
}
167167

@@ -180,11 +180,11 @@ private function handleEnumNode(Node $node): void
180180

181181
private function handleStaticClassConstantNode(Node $node): void
182182
{
183-
if (!$node instanceof Node\Expr\ClassConstFetch) {
183+
if (!($node instanceof Node\Expr\ClassConstFetch)) {
184184
return;
185185
}
186186

187-
if (!$node->class instanceof Node\Name\FullyQualified) {
187+
if (!($node->class instanceof Node\Name\FullyQualified)) {
188188
return;
189189
}
190190

@@ -194,11 +194,11 @@ private function handleStaticClassConstantNode(Node $node): void
194194

195195
private function handleStaticClassCallsNode(Node $node): void
196196
{
197-
if (!$node instanceof Node\Expr\StaticCall) {
197+
if (!($node instanceof Node\Expr\StaticCall)) {
198198
return;
199199
}
200200

201-
if (!$node->class instanceof Node\Name\FullyQualified) {
201+
if (!($node->class instanceof Node\Name\FullyQualified)) {
202202
return;
203203
}
204204

@@ -208,11 +208,11 @@ private function handleStaticClassCallsNode(Node $node): void
208208

209209
private function handleInstanceOf(Node $node): void
210210
{
211-
if (!$node instanceof Node\Expr\Instanceof_) {
211+
if (!($node instanceof Node\Expr\Instanceof_)) {
212212
return;
213213
}
214214

215-
if (!$node->class instanceof Node\Name\FullyQualified) {
215+
if (!($node->class instanceof Node\Name\FullyQualified)) {
216216
return;
217217
}
218218

@@ -222,11 +222,11 @@ private function handleInstanceOf(Node $node): void
222222

223223
private function handleNewExpression(Node $node): void
224224
{
225-
if (!$node instanceof Node\Expr\New_) {
225+
if (!($node instanceof Node\Expr\New_)) {
226226
return;
227227
}
228228

229-
if (!$node->class instanceof Node\Name\FullyQualified) {
229+
if (!($node->class instanceof Node\Name\FullyQualified)) {
230230
return;
231231
}
232232

@@ -236,7 +236,7 @@ private function handleNewExpression(Node $node): void
236236

237237
private function handleTypedProperty(Node $node): void
238238
{
239-
if (!$node instanceof Node\Stmt\Property) {
239+
if (!($node instanceof Node\Stmt\Property)) {
240240
return;
241241
}
242242

@@ -246,7 +246,7 @@ private function handleTypedProperty(Node $node): void
246246

247247
$type = $node->type instanceof NullableType ? $node->type->type : $node->type;
248248

249-
if (!$type instanceof Node\Name\FullyQualified) {
249+
if (!($type instanceof Node\Name\FullyQualified)) {
250250
return;
251251
}
252252

@@ -274,7 +274,7 @@ private function handleParamDependency(Node $node): void
274274

275275
private function handleInterfaceNode(Node $node): void
276276
{
277-
if (!$node instanceof Node\Stmt\Interface_) {
277+
if (!($node instanceof Node\Stmt\Interface_)) {
278278
return;
279279
}
280280

@@ -293,7 +293,7 @@ private function handleInterfaceNode(Node $node): void
293293

294294
private function handleTraitNode(Node $node): void
295295
{
296-
if (!$node instanceof Node\Stmt\Trait_) {
296+
if (!($node instanceof Node\Stmt\Trait_)) {
297297
return;
298298
}
299299

@@ -307,13 +307,13 @@ private function handleTraitNode(Node $node): void
307307

308308
private function handleReturnTypeDependency(Node $node): void
309309
{
310-
if (!$node instanceof Node\Stmt\ClassMethod) {
310+
if (!($node instanceof Node\Stmt\ClassMethod)) {
311311
return;
312312
}
313313

314314
$returnType = $node->returnType;
315315

316-
if (!$returnType instanceof Node\Name\FullyQualified) {
316+
if (!($returnType instanceof Node\Name\FullyQualified)) {
317317
return;
318318
}
319319

@@ -323,13 +323,13 @@ private function handleReturnTypeDependency(Node $node): void
323323

324324
private function handleAttributeNode(Node $node): void
325325
{
326-
if (!$node instanceof Node\Attribute) {
326+
if (!($node instanceof Node\Attribute)) {
327327
return;
328328
}
329329

330330
$nodeName = $node->name;
331331

332-
if (!$nodeName instanceof Node\Name\FullyQualified) {
332+
if (!($nodeName instanceof Node\Name\FullyQualified)) {
333333
return;
334334
}
335335

@@ -345,7 +345,7 @@ private function addParamDependency(Node\Param $node): void
345345

346346
$type = $node->type instanceof NullableType ? $node->type->type : $node->type;
347347

348-
if (!$type instanceof Node\Name\FullyQualified) {
348+
if (!($type instanceof Node\Name\FullyQualified)) {
349349
return;
350350
}
351351

@@ -355,7 +355,7 @@ private function addParamDependency(Node\Param $node): void
355355

356356
private function handlePropertyHookNode(Node $node): void
357357
{
358-
if (!$node instanceof Node\PropertyHook) {
358+
if (!($node instanceof Node\PropertyHook)) {
359359
return;
360360
}
361361

src/CLI/Runner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function check(
4444
Parser $fileParser,
4545
Violations $violations,
4646
ParsingErrors $parsingErrors,
47-
bool $stopOnFailure,
47+
bool $stopOnFailure
4848
): void {
4949
/** @var SplFileInfo $file */
5050
foreach ($classSetRule->getClassSet() as $file) {

src/Expression/ForClasses/Implement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function evaluate(ClassDescription $theClass, Violations $violations, str
4040

4141
$interface = $this->interface;
4242
$interfaces = $theClass->getInterfaces();
43-
$implements = static function (FullyQualifiedClassName $FQCN) use ($interface): bool {
43+
$implements = function (FullyQualifiedClassName $FQCN) use ($interface): bool {
4444
return $FQCN->matches($interface);
4545
};
4646

src/Expression/ForClasses/NotHaveDependencyOutsideNamespace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function describe(ClassDescription $theClass, string $because): Descripti
3636
public function evaluate(ClassDescription $theClass, Violations $violations, string $because): void
3737
{
3838
$namespace = $this->namespace;
39-
$depends = static function (ClassDependency $dependency) use ($namespace): bool {
39+
$depends = function (ClassDependency $dependency) use ($namespace): bool {
4040
return !$dependency->getFQCN()->matches($namespace);
4141
};
4242

src/Expression/ForClasses/NotImplement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function evaluate(ClassDescription $theClass, Violations $violations, str
4040

4141
$interface = $this->interface;
4242
$interfaces = $theClass->getInterfaces();
43-
$implements = static function (FullyQualifiedClassName $FQCN) use ($interface): bool {
43+
$implements = function (FullyQualifiedClassName $FQCN) use ($interface): bool {
4444
return $FQCN->matches($interface);
4545
};
4646

src/PHPUnit/ArchRuleCheckerConstraintAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function toString(): string
6161

6262
protected function matches(
6363
/** @var ArchRule $rule */
64-
$other,
64+
$other
6565
): bool {
6666
$this->runner->check(
6767
ClassSetRules::create($this->classSet, $other),

src/Rules/ArchRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
Constraints $constraints,
2929
string $because,
3030
array $classesToBeExcluded,
31-
bool $runOnlyThis,
31+
bool $runOnlyThis
3232
) {
3333
$this->thats = $specs;
3434
$this->shoulds = $constraints;

0 commit comments

Comments
 (0)