@@ -561,17 +561,17 @@ public function getValidWritePropertyPaths()
561
561
];
562
562
}
563
563
564
- public function getValidReadPropertyPaths ()
564
+ public function getValidReadPropertyPaths (): iterable
565
565
{
566
- $ testCases = $ this ->getValidWritePropertyPaths ();
566
+ yield from $ this ->getValidWritePropertyPaths ();
567
567
568
568
// Optional paths can only be read and can't be written to.
569
- $ testCases [] = [(object ) [' foo ' => ( object ) [ ' firstName ' => ' Bernhard ' ]] , 'foo.bar ? ' , null ];
570
- $ testCases [] = [(object ) ['foo ' => (object ) ['firstName ' => 'Bernhard ' ]], 'foo.bar?.baz ? ' , null ];
571
- $ testCases [] = [[ 'foo ' => ['firstName ' => 'Bernhard ' ]], '[ foo][ bar?] ' , null ];
572
- $ testCases [] = [[ ' foo ' => [ ' firstName ' => ' Bernhard ' ]] , '[foo][bar?][baz ?] ' , null ];
573
-
574
- return $ testCases ;
569
+ yield [(object ) [] , 'foo? ' , null ];
570
+ yield [(object ) ['foo ' => (object ) ['firstName ' => 'Bernhard ' ]], 'foo.bar? ' , null ];
571
+ yield [( object ) [ 'foo ' => ( object ) ['firstName ' => 'Bernhard ' ]], 'foo. bar?.baz? ' , null ];
572
+ yield [[] , '[foo?] ' , null ];
573
+ yield [[ ' foo ' => [ ' firstName ' => ' Bernhard ' ]], ' [foo][bar?] ' , null ];
574
+ yield [[ ' foo ' => [ ' firstName ' => ' Bernhard ' ]], ' [foo][bar?][baz?] ' , null ] ;
575
575
}
576
576
577
577
public function testTicket5755 ()
0 commit comments