| 1 | <?php |
||
| 13 | class ArrayDuplicateKeys implements Pass\AnalyzerPassInterface |
||
| 14 | { |
||
| 15 | use DefaultMetadataPassTrait; |
||
| 16 | |||
| 17 | const DESCRIPTION = <<<DESC |
||
| 18 | This inspection reports any duplicated keys on array creation expression. |
||
| 19 | If multiple elements in the array declaration use the same key, only the last |
||
| 20 | one will be used as all others are overwritten. |
||
| 21 | DESC; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param Expr\Array_ $expr |
||
| 25 | * @param Context $context |
||
| 26 | * @return bool |
||
| 27 | */ |
||
| 28 | public function pass(Expr\Array_ $expr, Context $context) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return array |
||
| 64 | */ |
||
| 65 | public function getRegister() |
||
| 71 | } |
||
| 72 |