1 | <?php |
||
11 | class BodyExtractor implements ExtractorInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $identifier; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $password; |
||
22 | |||
23 | /** |
||
24 | * @param string $identifier |
||
25 | * Name of the property that identifies the user |
||
26 | * @param string $password |
||
27 | * Name of the property that contains the user password |
||
28 | */ |
||
29 | 5 | public function __construct($identifier = 'username', $password = 'password') |
|
34 | |||
35 | /** |
||
36 | * @inheritDoc |
||
37 | */ |
||
38 | 5 | public function getCredentials(ServerRequestInterface $request) |
|
48 | } |
||
49 |
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.