yokai-php /
security-token-bundle
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Yokai\SecurityTokenBundle\Event; |
||
| 4 | |||
| 5 | use DateTime; |
||
| 6 | use Symfony\Component\EventDispatcher\Event; |
||
| 7 | use Yokai\SecurityTokenBundle\Entity\Token; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @author Yann Eugoné <[email protected]> |
||
| 11 | */ |
||
| 12 | class ConsumeTokenEvent extends Event |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var Token |
||
| 16 | */ |
||
| 17 | private $token; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var DateTime|null |
||
| 21 | */ |
||
| 22 | private $at; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | private $information; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param Token $token |
||
| 31 | * @param DateTime|null $at |
||
| 32 | * @param array $information |
||
| 33 | */ |
||
| 34 | 1 | public function __construct(Token $token, DateTime $at = null, array $information) |
|
|
0 ignored issues
–
show
Parameters which have default values should be placed at the end.
If you place a parameter with a default value before a parameter with a default value, the default value of the first parameter will never be used as it will always need to be passed anyway: // $a must always be passed; it's default value is never used.
function someFunction($a = 5, $b) { }
Loading history...
|
|||
| 35 | { |
||
| 36 | 1 | $this->token = $token; |
|
| 37 | 1 | $this->at = $at; |
|
| 38 | 1 | $this->information = $information; |
|
| 39 | 1 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return Token |
||
| 43 | */ |
||
| 44 | 1 | public function getToken() |
|
| 45 | { |
||
| 46 | 1 | return $this->token; |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return DateTime|null |
||
| 51 | */ |
||
| 52 | public function getAt() |
||
| 53 | { |
||
| 54 | return $this->at; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | 1 | public function getInformation() |
|
| 61 | { |
||
| 62 | 1 | return $this->information; |
|
| 63 | } |
||
| 64 | } |
||
| 65 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.