-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f46fccd
commit 9eea26d
Showing
7 changed files
with
227 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace Foo; | ||
|
||
class Bar { | ||
public $foo; | ||
|
||
/** @return Bar[] */ | ||
public function test() { } | ||
} | ||
|
||
$bar = new Bar(); | ||
$bars = $bar->test(); | ||
$array1 = [new Bar(), new \stdClass()]; | ||
$array2 = ['foo' => $bar, $bar]; | ||
$array3 = ['foo' => $bar, 'baz' => $bar]; | ||
|
||
foreach ($bars as $value) { | ||
$v | ||
$value-> | ||
} | ||
|
||
foreach ($array1 as $key => $value) { | ||
$ | ||
} | ||
|
||
foreach ($array2 as $key => $value) { | ||
$ | ||
} | ||
|
||
foreach ($array3 as $key => $value) { | ||
$ | ||
} | ||
|
||
foreach ($bar->test() as $value) { | ||
$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters