-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from Harfusha/cake4
Backported support for more complex array annotations (#344) and for multiline annotation (#345) to Cake4.
- Loading branch information
Showing
9 changed files
with
292 additions
and
33 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* @var \TestApp\View\AppView $this | ||
* @var array $x | ||
* @var array<int> $ints | ||
* @var array{a: int, b: string|null}|null $shaped | ||
*/ | ||
foreach ($x as $y) { | ||
echo $y; | ||
} | ||
foreach ($foo as $int) { | ||
echo $int; | ||
} | ||
?> | ||
<div> | ||
<?php foreach ($ints as $int) { | ||
echo $int; | ||
} ?> | ||
<?php foreach ($shaped as $x) { | ||
echo h($x); | ||
} ?> | ||
</div> |
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,34 @@ | ||
<?php | ||
/** | ||
* @var \TestApp\View\AppView $this | ||
* @var array $x | ||
* @var array<int> $ints | ||
* @var array{ | ||
* a: int, | ||
* b: string|null | ||
* }|null $shaped | ||
* @var array{ | ||
* c: array{ | ||
* d: int|string, | ||
* e: string|null | ||
* } | ||
* } $nested | ||
*/ | ||
foreach ($x as $y) { | ||
echo $y; | ||
} | ||
foreach ($foo as $int) { | ||
echo $int; | ||
} | ||
?> | ||
<div> | ||
<?php foreach ($ints as $int) { | ||
echo $int; | ||
} ?> | ||
<?php foreach ($shaped as $x) { | ||
echo h($x); | ||
} ?> | ||
<?php foreach ($nested['c'] as $subArray) { | ||
echo h($x); | ||
} ?> | ||
</div> |
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,23 @@ | ||
<?php | ||
/** | ||
* @var \TestApp\View\AppView $this | ||
* @var array $x | ||
* @var array<int> $ints | ||
* @var array{a: int, b: string|null}|null $shaped | ||
* @var mixed $foo | ||
*/ | ||
foreach ($x as $y) { | ||
echo $y; | ||
} | ||
foreach ($foo as $int) { | ||
echo $int; | ||
} | ||
?> | ||
<div> | ||
<?php foreach ($ints as $int) { | ||
echo $int; | ||
} ?> | ||
<?php foreach ($shaped as $x) { | ||
echo h($x); | ||
} ?> | ||
</div> |
Oops, something went wrong.