Skip to content

Commit c259c6a

Browse files
committed
remove unused
1 parent b6d0601 commit c259c6a

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

phpstan-baseline.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ parameters:
2525
count: 1
2626
path: src/Parser/StringUnescaper.php
2727

28+
-
29+
message: "#^Call to an undefined method PHPStan\\\\PhpDocParser\\\\Ast\\\\Node\\:\\:getComments\\(\\)\\.$#"
30+
count: 1
31+
path: src/Printer/Printer.php
32+
2833
-
2934
message: "#^Variable property access on PHPStan\\\\PhpDocParser\\\\Ast\\\\Node\\.$#"
3035
count: 2

src/Ast/NodeAttributes.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ public function hasAttribute(string $key): bool
2323
return array_key_exists($key, $this->attributes);
2424
}
2525

26-
/**
27-
* @return list<Comment>
28-
*/
29-
public function getComments(): array {
30-
return $this->getAttribute(Attribute::COMMENTS) ?? [];
31-
}
32-
3326
/**
3427
* @return mixed
3528
*/

src/Printer/Printer.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
use function strlen;
7171
use function strpos;
7272
use function trim;
73+
use function xdebug_break;
7374
use const PREG_SET_ORDER;
7475

7576
/**
@@ -536,11 +537,6 @@ private function printArrayFormatPreserving(array $nodes, array $originalNodes,
536537

537538
$result .= $originalTokens->getContentBetween($tokenIndex, $itemStartPos);
538539

539-
$comments = $newNode->getComments();
540-
if($comments) {
541-
xdebug_break();
542-
}
543-
544540
if (count($delayedAdd) > 0) {
545541
foreach ($delayedAdd as $delayedAddNode) {
546542
$parenthesesNeeded = isset($this->parenthesesListMap[$mapKey])

0 commit comments

Comments
 (0)