LivePersonInc /
LiveEngageLaravel
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace LivePersonInc\LiveEngageLaravel\Collections; |
||||
| 4 | |||||
| 5 | use Illuminate\Support\Collection; |
||||
| 6 | use LivePersonInc\LiveEngageLaravel\LiveEngageLaravel; |
||||
| 7 | |||||
| 8 | class Humans extends Collection |
||||
| 9 | { |
||||
| 10 | public function getMetaDataAttribute() |
||||
| 11 | { |
||||
| 12 | return $this->attributes['_metaData']; |
||||
| 13 | } |
||||
| 14 | |||||
| 15 | public function setMetaDataAttribute($value) |
||||
| 16 | { |
||||
| 17 | $this->attributes['_metaData'] = $value; |
||||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||||
| 18 | } |
||||
| 19 | |||||
| 20 | public function state($state = 'ONLINE') |
||||
| 21 | { |
||||
| 22 | $result = $this->filter(function($value, $key) use ($state) { |
||||
|
0 ignored issues
–
show
The parameter
$key is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 23 | return strtolower($value->currentStatus) == strtolower($state); |
||||
| 24 | }); |
||||
| 25 | |||||
| 26 | return $result; |
||||
| 27 | } |
||||
| 28 | } |