-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for
@param-immediately-invoked-callable
and `@param-later-i…
…nvoked-callable`
- Loading branch information
1 parent
231e318
commit 8ce0d65
Showing
7 changed files
with
230 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/Ast/PhpDoc/ParamImmediatelyInvokedCallableTagValueNode.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,30 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\PhpDocParser\Ast\PhpDoc; | ||
|
||
use PHPStan\PhpDocParser\Ast\NodeAttributes; | ||
use function trim; | ||
|
||
class ParamImmediatelyInvokedCallableTagValueNode implements PhpDocTagValueNode | ||
{ | ||
|
||
use NodeAttributes; | ||
|
||
/** @var string */ | ||
public $parameterName; | ||
|
||
/** @var string (may be empty) */ | ||
public $description; | ||
|
||
public function __construct(string $parameterName, string $description) | ||
{ | ||
$this->parameterName = $parameterName; | ||
$this->description = $description; | ||
} | ||
|
||
public function __toString(): string | ||
{ | ||
return trim("{$this->parameterName} {$this->description}"); | ||
} | ||
|
||
} |
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,30 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\PhpDocParser\Ast\PhpDoc; | ||
|
||
use PHPStan\PhpDocParser\Ast\NodeAttributes; | ||
use function trim; | ||
|
||
class ParamLaterInvokedCallableTagValueNode implements PhpDocTagValueNode | ||
{ | ||
|
||
use NodeAttributes; | ||
|
||
/** @var string */ | ||
public $parameterName; | ||
|
||
/** @var string (may be empty) */ | ||
public $description; | ||
|
||
public function __construct(string $parameterName, string $description) | ||
{ | ||
$this->parameterName = $parameterName; | ||
$this->description = $description; | ||
} | ||
|
||
public function __toString(): string | ||
{ | ||
return trim("{$this->parameterName} {$this->description}"); | ||
} | ||
|
||
} |
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