Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for psalm-var and genercis in docblock: - @psalm-var IteratorAggregate - @var IteratorAggregate<string,string> - @param IteratorAggregate<string,string> $config Fixes #23 Signed-off-by: Geert Eltink <geert.eltink@gmail.com>
- Loading branch information
1 parent
680171d
commit 339894e
Showing
18 changed files
with
138 additions
and
48 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
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,36 @@ | ||
<?php | ||
|
||
/** | ||
* @see https://github.com/laminas/laminas-coding-standard for the canonical source repository | ||
* @copyright https://github.com/laminas/laminas-coding-standard/blob/master/COPYRIGHT.md | ||
* @license https://github.com/laminas/laminas-coding-standard/blob/master/LICENSE.md New BSD License | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
use IteratorAggregate; | ||
|
||
class GenericTypeHintSyntax | ||
{ | ||
/** @psalm-var IteratorAggregate */ | ||
private $config; | ||
|
||
/** @var IteratorAggregate<string,string> */ | ||
private $bar; | ||
|
||
/** | ||
* @param IteratorAggregate<string,string> $bar | ||
*/ | ||
public function __construct(ArrayObject $bar) | ||
{ | ||
$this->bar = $bar; | ||
} | ||
|
||
/** | ||
* @param array<string, mixed> $config | ||
*/ | ||
public function doSomethingWithArray(array $config): void | ||
{ | ||
$this->config = $config; | ||
} | ||
} |
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
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,36 @@ | ||
<?php | ||
|
||
/** | ||
* @see https://github.com/laminas/laminas-coding-standard for the canonical source repository | ||
* @copyright https://github.com/laminas/laminas-coding-standard/blob/master/COPYRIGHT.md | ||
* @license https://github.com/laminas/laminas-coding-standard/blob/master/LICENSE.md New BSD License | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
use IteratorAggregate; | ||
|
||
class GenericTypeHintSyntax | ||
{ | ||
/** @psalm-var IteratorAggregate */ | ||
private $config; | ||
|
||
/** @var IteratorAggregate<string,string> */ | ||
private $bar; | ||
|
||
/** | ||
* @param IteratorAggregate<string,string> $bar | ||
*/ | ||
public function __construct(ArrayObject $bar) | ||
{ | ||
$this->bar = $bar; | ||
} | ||
|
||
/** | ||
* @param array<string, mixed> $config | ||
*/ | ||
public function doSomethingWithArray(array $config): void | ||
{ | ||
$this->config = $config; | ||
} | ||
} |