File tree Expand file tree Collapse file tree 4 files changed +35
-2
lines changed
Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 106106 <property name =" fixable" value =" true" />
107107 </properties >
108108 </rule >
109+ <!-- Forbid LSB for constants (static::FOO) -->
110+ <rule ref =" SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants" />
109111 <!-- Forbid empty lines around type declarations -->
110112 <rule ref =" SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces" >
111113 <properties >
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ tests/input/array_indentation.php 10 0
77tests/input/assignment-operators.php 4 0
88tests/input/class-references.php 10 0
99tests/input/concatenation_spacing.php 24 0
10+ tests/input/constants-no-lsb.php 2 0
1011tests/input/constants-var.php 3 0
1112tests/input/doc-comment-spacing.php 10 0
1213tests/input/duplicate-assignment-variable.php 1 0
@@ -32,9 +33,9 @@ tests/input/UnusedVariables.php 1 0
3233tests/input/useless-semicolon.php 2 0
3334tests/input/UselessConditions.php 20 0
3435----------------------------------------------------------------------
35- A TOTAL OF 244 ERRORS AND 0 WARNINGS WERE FOUND IN 28 FILES
36+ A TOTAL OF 246 ERRORS AND 0 WARNINGS WERE FOUND IN 29 FILES
3637----------------------------------------------------------------------
37- PHPCBF CAN FIX 208 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
38+ PHPCBF CAN FIX 209 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
3839----------------------------------------------------------------------
3940
4041
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Test ;
6+
7+ class ConstantLsb
8+ {
9+ public const A = 123 ;
10+
11+ public function __construct ()
12+ {
13+ echo self ::A;
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Test ;
6+
7+ class ConstantLsb
8+ {
9+ public const A = 123 ;
10+
11+ public function __construct ()
12+ {
13+ echo static ::A;
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments