-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TypeParser - support comments at EOL with
//
- Loading branch information
1 parent
12c4e9f
commit 9b30d6f
Showing
13 changed files
with
1,110 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,6 @@ final class Attribute | |
|
||
public const ORIGINAL_NODE = 'originalNode'; | ||
|
||
public const COMMENTS = 'comments'; | ||
|
||
} |
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,28 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace PHPStan\PhpDocParser\Ast; | ||
|
||
use function trim; | ||
|
||
class Comment | ||
{ | ||
|
||
public string $text; | ||
|
||
public int $startLine; | ||
|
||
public int $startIndex; | ||
|
||
public function __construct(string $text, int $startLine = -1, int $startIndex = -1) | ||
{ | ||
$this->text = $text; | ||
$this->startLine = $startLine; | ||
$this->startIndex = $startIndex; | ||
} | ||
|
||
public function getReformattedText(): string | ||
{ | ||
return trim($this->text); | ||
} | ||
|
||
} |
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
Oops, something went wrong.