These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Class A |
||
5 | * |
||
6 | * @api |
||
7 | */ |
||
8 | class A |
||
0 ignored issues
–
show
|
|||
9 | { |
||
10 | /** |
||
11 | * @api |
||
12 | */ |
||
13 | public function someMethod() |
||
14 | { |
||
15 | } |
||
16 | |||
17 | public function someOtherMethod() |
||
18 | { |
||
19 | } |
||
20 | } |
||
21 | |||
22 | class B extends A |
||
0 ignored issues
–
show
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.
You can fix this by adding a namespace to your class: namespace YourVendor;
class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
Loading history...
|
|||
23 | { |
||
24 | } |
||
25 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.