Skip to content

Commit 3374502

Browse files
authored
Use @deprecated above class to allow static analyzer like PHPStan detect deprecation (#1103)
1 parent f103601 commit 3374502

File tree

10 files changed

+50
-10
lines changed

10 files changed

+50
-10
lines changed

lib/PhpParser/Node/Expr/ArrayItem.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
require __DIR__ . '/../ArrayItem.php';
66

77
if (false) {
8-
// For classmap-authoritative support.
8+
/**
9+
* For classmap-authoritative support.
10+
*
11+
* @deprecated use \PhpParser\Node\ArrayItem instead.
12+
*/
913
class ArrayItem extends \PhpParser\Node\ArrayItem {
1014
}
1115
}

lib/PhpParser/Node/Expr/ClosureUse.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
require __DIR__ . '/../ClosureUse.php';
66

77
if (false) {
8-
// For classmap-authoritative support.
8+
/**
9+
* For classmap-authoritative support.
10+
*
11+
* @deprecated use \PhpParser\Node\ClosureUse instead.
12+
*/
913
class ClosureUse extends \PhpParser\Node\ClosureUse {
1014
}
1115
}

lib/PhpParser/Node/Scalar/DNumber.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
require __DIR__ . '/Float_.php';
66

77
if (false) {
8-
// For classmap-authoritative support.
8+
/**
9+
* For classmap-authoritative support.
10+
*
11+
* @deprecated use \PhpParser\Node\Scalar\Float_ instead.
12+
*/
913
class DNumber extends Float_ {
1014
}
1115
}

lib/PhpParser/Node/Scalar/Encapsed.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
require __DIR__ . '/InterpolatedString.php';
66

77
if (false) {
8-
// For classmap-authoritative support.
8+
/**
9+
* For classmap-authoritative support.
10+
*
11+
* @deprecated use \PhpParser\Node\Scalar\InterpolatedString instead.
12+
*/
913
class Encapsed extends InterpolatedString {
1014
}
1115
}

lib/PhpParser/Node/Scalar/EncapsedStringPart.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
require __DIR__ . '/../InterpolatedStringPart.php';
88

99
if (false) {
10-
// For classmap-authoritative support.
10+
/**
11+
* For classmap-authoritative support.
12+
*
13+
* @deprecated use \PhpParser\Node\InterpolatedStringPart instead.
14+
*/
1115
class EncapsedStringPart extends InterpolatedStringPart {
1216
}
1317
}

lib/PhpParser/Node/Scalar/LNumber.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
require __DIR__ . '/Int_.php';
66

77
if (false) {
8-
// For classmap-authoritative support.
8+
/**
9+
* For classmap-authoritative support.
10+
*
11+
* @deprecated use \PhpParser\Node\Scalar\Int_ instead.
12+
*/
913
class LNumber extends Int_ {
1014
}
1115
}

lib/PhpParser/Node/Stmt/DeclareDeclare.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
require __DIR__ . '/../DeclareItem.php';
88

99
if (false) {
10-
// For classmap-authoritative support.
10+
/**
11+
* For classmap-authoritative support.
12+
*
13+
* @deprecated use \PhpParser\Node\DeclareItem instead.
14+
*/
1115
class DeclareDeclare extends DeclareItem {
1216
}
1317
}

lib/PhpParser/Node/Stmt/PropertyProperty.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
require __DIR__ . '/../PropertyItem.php';
88

99
if (false) {
10-
// For classmap-authoritative support.
10+
/**
11+
* For classmap-authoritative support.
12+
*
13+
* @deprecated use \PhpParser\Node\PropertyItem instead.
14+
*/
1115
class PropertyProperty extends PropertyItem {
1216
}
1317
}

lib/PhpParser/Node/Stmt/StaticVar.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
require __DIR__ . '/../StaticVar.php';
66

77
if (false) {
8-
// For classmap-authoritative support.
8+
/**
9+
* For classmap-authoritative support.
10+
*
11+
* @deprecated use \PhpParser\Node\StaticVar instead.
12+
*/
913
class StaticVar extends \PhpParser\Node\StaticVar {
1014
}
1115
}

lib/PhpParser/Node/Stmt/UseUse.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
require __DIR__ . '/../UseItem.php';
88

99
if (false) {
10-
// For classmap-authoritative support.
10+
/**
11+
* For classmap-authoritative support.
12+
*
13+
* @deprecated use \PhpParser\Node\UseItem instead.
14+
*/
1115
class UseUse extends UseItem {
1216
}
1317
}

0 commit comments

Comments
 (0)