@@ -561,17 +561,17 @@ public function getValidWritePropertyPaths()
561561 ];
562562 }
563563
564- public function getValidReadPropertyPaths ()
564+ public function getValidReadPropertyPaths (): iterable
565565 {
566- $ testCases = $ this ->getValidWritePropertyPaths ();
566+ yield from $ this ->getValidWritePropertyPaths ();
567567
568568 // 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 ] ;
575575 }
576576
577577 public function testTicket5755 ()
0 commit comments