-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert 'fix' for template order. Update test cases to reflect expecte…
…d inference Signed-off-by: George Steel <[email protected]>
- Loading branch information
Showing
6 changed files
with
64 additions
and
88 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
31 changes: 31 additions & 0 deletions
31
test/StaticAnalysis/PriorityQueueGenericsCanBeUnderstood.php
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,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaminasTest\Stdlib\StaticAnalysis; | ||
|
||
use Laminas\Stdlib\PriorityQueue; | ||
|
||
use function array_values; | ||
use function iterator_to_array; | ||
|
||
final class PriorityQueueGenericsCanBeUnderstood | ||
{ | ||
/** @var PriorityQueue<string, int> */ | ||
private PriorityQueue $laminas; | ||
|
||
/** | ||
* @param PriorityQueue<string, int> $laminas | ||
*/ | ||
public function __construct( | ||
PriorityQueue $laminas | ||
) { | ||
$this->laminas = $laminas; | ||
} | ||
|
||
/** @return list<string> */ | ||
public function laminasList(): array | ||
{ | ||
return array_values(iterator_to_array($this->laminas)); | ||
} | ||
} |
43 changes: 0 additions & 43 deletions
43
test/StaticAnalysis/PriorityQueueGenericsShouldMatchSplPriorityQueue.php
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
test/StaticAnalysis/SplPriorityQueueGenericsCanBeUnderstood.php
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,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace LaminasTest\Stdlib\StaticAnalysis; | ||
|
||
use Laminas\Stdlib\SplPriorityQueue; | ||
|
||
use function array_values; | ||
use function iterator_to_array; | ||
|
||
final class SplPriorityQueueGenericsCanBeUnderstood | ||
{ | ||
/** @var SplPriorityQueue<string, int> */ | ||
private SplPriorityQueue $laminas; | ||
|
||
/** | ||
* @param SplPriorityQueue<string, int> $laminas | ||
*/ | ||
public function __construct( | ||
SplPriorityQueue $laminas | ||
) { | ||
$this->laminas = $laminas; | ||
} | ||
|
||
/** @return list<string> */ | ||
public function laminasList(): array | ||
{ | ||
return array_values(iterator_to_array($this->laminas)); | ||
} | ||
} |
43 changes: 0 additions & 43 deletions
43
test/StaticAnalysis/SplPriorityQueueGenericsShouldMatchNativeSplPriorityQueue.php
This file was deleted.
Oops, something went wrong.