Conditions | 3 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public function handle() |
||
40 | { |
||
41 | Karma::created(function (Karma $karma) { |
||
42 | $userThanks = $karma->user->thanks->count(); |
||
|
|||
43 | $userKarma = $karma->user->karma->count(); |
||
44 | |||
45 | if ($userThanks === 10 && $userKarma === 0) { |
||
46 | $this->create($karma->user, $karma->created_at); |
||
47 | } |
||
48 | }); |
||
49 | } |
||
50 | } |
||
51 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.