File tree Expand file tree Collapse file tree
rules/Php73/Rector/FuncCall Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ private function processJsonEncode(FuncCall $funcCall): FuncCall
140140 $ arg = $ funcCall ->args [1 ];
141141 $ flags = $ this ->getFlags ($ arg );
142142 }
143- if (!is_null ($ newArg = $ this ->getArgWithFlags ($ flags ))) {
143+ $ newArg = $ this ->getArgWithFlags ($ flags );
144+ if ($ newArg instanceof Arg) {
144145 $ this ->hasChanged = true ;
145146 $ funcCall ->args [1 ] = $ newArg ;
146147 }
@@ -165,7 +166,8 @@ private function processJsonDecode(FuncCall $funcCall): FuncCall
165166 $ funcCall ->args [2 ] = new Arg (new Int_ (512 ));
166167 }
167168
168- if (!is_null ($ newArg = $ this ->getArgWithFlags ($ flags ))) {
169+ $ newArg = $ this ->getArgWithFlags ($ flags );
170+ if ($ newArg instanceof Arg) {
169171 $ this ->hasChanged = true ;
170172 $ funcCall ->args [3 ] = $ newArg ;
171173 }
You can’t perform that action at this time.
0 commit comments