| Conditions | 4 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function participantsString($excludingUser = null, $array = false) |
||
| 28 | { |
||
| 29 | $participants = $this->users->map(function ($participant) use ($excludingUser) { |
||
| 30 | if (! $excludingUser || $excludingUser->name != $participant->name) { |
||
| 31 | return $participant->name; |
||
| 32 | } |
||
| 33 | })->reject(function ($name) { |
||
| 34 | return empty($name); |
||
| 35 | })->toArray(); |
||
| 36 | |||
| 37 | return $array ? $participants : implode(', ', $participants); |
||
| 38 | } |
||
| 39 | |||
| 56 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.