Conditions | 6 |
Paths | 32 |
Total Lines | 26 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
73 | public function toArray() |
||
74 | { |
||
75 | $data = []; |
||
76 | |||
77 | if (!empty($this->sub)) { |
||
78 | $data['sub'] = $this->sub; |
||
79 | } |
||
80 | |||
81 | if (!empty($this->iss)) { |
||
82 | $data['iss'] = $this->iss; |
||
83 | } |
||
84 | |||
85 | if (!empty($this->iat)) { |
||
86 | $data['iat'] = $this->iat; |
||
87 | } |
||
88 | |||
89 | if (!empty($this->exp)) { |
||
90 | $data['exp'] = $this->exp; |
||
91 | } |
||
92 | |||
93 | if (!empty($this->jti)) { |
||
94 | $data['jti'] = $this->jti; |
||
95 | } |
||
96 | |||
97 | return $data; |
||
98 | } |
||
99 | |||
100 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.