| 1 | <?php |
||
| 7 | class PrivateStaticTransformer implements TransformerInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | protected $classes = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var int |
||
| 16 | */ |
||
| 17 | protected $sort = 0; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param array $classes |
||
| 21 | */ |
||
| 22 | public function __construct(array $classes, $sort = 0) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * This loops through each class and fetches the private static config for each class. |
||
| 30 | */ |
||
| 31 | public function transform() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * This is responsible for introspecting a given class and returning an |
||
| 43 | * array continaing all of its private statics |
||
| 44 | * |
||
| 45 | * @param string $class |
||
| 46 | * |
||
| 47 | * @return string[] |
||
| 48 | */ |
||
| 49 | protected function getClassConfig($class) |
||
| 76 | |||
| 77 | } |
||
| 78 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.