Skip to content

Commit 2344caa

Browse files
ArshidArshid
authored andcommitted
SleepToSerializeRector_Class
1 parent f9e732a commit 2344caa

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

rules/Php85/Rector/Class_/SleepToSerializeRector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,18 @@ public function refactor(Node $node): ?Node
9595
return null;
9696
}
9797

98-
if ($classMethod->returnType instanceof Identifier && $this->isName($classMethod->returnType, 'array')) {
98+
if ($classMethod->returnType instanceof Identifier && $this->isName($classMethod->returnType, 'array')) {
9999
return null;
100100
}
101101

102102
$returns = $this->betterNodeFinder->findReturnsScoped($classMethod);
103103
if (! $this->returnAnalyzer->hasOnlyReturnWithExpr($classMethod, $returns)) {
104104
return null;
105105
}
106-
106+
107107
$hasChanged = false;
108108
foreach ($returns as $return) {
109-
if (! $return->expr instanceof Array_ ) {
109+
if (! $return->expr instanceof Array_) {
110110
return null;
111111
}
112112

@@ -128,7 +128,7 @@ public function refactor(Node $node): ?Node
128128
}
129129
}
130130

131-
if($hasChanged){
131+
if ($hasChanged) {
132132
$classMethod->name = new Identifier('__serialize');
133133
$classMethod->returnType = new Identifier('array');
134134
return $node;

0 commit comments

Comments
 (0)