| 1 | <?php  | 
            ||
| 4 | class Token  | 
            ||
| 5 | { | 
            ||
| 6 | /**  | 
            ||
| 7 | * @var string  | 
            ||
| 8 | */  | 
            ||
| 9 | private $token;  | 
            ||
| 10 | |||
| 11 | /**  | 
            ||
| 12 | * @var array  | 
            ||
| 13 | */  | 
            ||
| 14 | private $metadata;  | 
            ||
| 15 | |||
| 16 | /**  | 
            ||
| 17 | * @param string $token  | 
            ||
| 18 | * @param array $metadata  | 
            ||
| 19 | */  | 
            ||
| 20 | 4 | public function __construct($token, array $metadata)  | 
            |
| 25 | |||
| 26 | /**  | 
            ||
| 27 | * @return string  | 
            ||
| 28 | */  | 
            ||
| 29 | 4 | public function getToken()  | 
            |
| 33 | |||
| 34 | /**  | 
            ||
| 35 | * @param string|null $key  | 
            ||
| 36 | * @return mixed  | 
            ||
| 37 | */  | 
            ||
| 38 | 4 | public function getMetadata($key = null)  | 
            |
| 45 | }  | 
            ||
| 46 | 
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.