,error_levels?:string[]}> */ public function providerValidCodeParse() { return [ 'assertArrayReturnTypeNarrowed' => [ ' [ ' [ ' [ 'format("Y-m-d"); } }', ], 'assertCheckOnNonZeroArrayOffset' => [ ' [ ' $arr */ function uriToPath(array $arr) : string { if (!isset($arr["a"]) || $arr["b"] !== "foo") { throw new \InvalidArgumentException("bad"); } return (string) $arr["c"]; }', ], 'combineAfterLoopAssert' => [ ' [ ' [ ' [ ' [ ' [ ' [ ' 0; }', ], 'assertHasArrayAccess' => [ ' [ '> $array * @return array */ function getBar(array $array) : array { if (isset($array[\'foo\'][\'bar\'])) { return $array[\'foo\']; } return []; }', ], 'assertHasArrayAccessOnSimpleXMLElement' => [ 'bar)) {} }', ], 'assertArrayOffsetToTraversable' => [ ' [ ' [ ' [ ' $arr * @return non-empty-array */ function foo(array $arr) : array { if (isset($arr["a"])) { return $arr; } return ["b" => 1]; }' ], 'setArrayConstantOffset' => [ ' [ ' $arr */ function foo(A $a, array $arr): void { if (!isset($arr[$a->id])) { $arr[$a->id] = new B(); } $arr[$a->id]->foo(); }' ], 'assertAfterNotEmptyArrayCheck' => [ ' [ 'c[$s]) && empty($this->c[$t])) {} } }' ], 'assertNotEmptyTwiceOnStaticPropertyArray' => [ ' [ ' [ ' [ ' [ 'arr[0])) { return $this->arr[0]; } $this->arr[0] = new stdClass; return $this->arr[0]; } }' ], ]; } }