| Conditions | 2 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 39 | 1 | public function handle(EmojisCommand $command): PromiseInterface |
|
|
|
|||
| 40 | { |
||
| 41 | 1 | return resolve( |
|
| 42 | 1 | $this->service->iterate('emojis') |
|
| 43 | 1 | ->flatMap(function ($emojis) { |
|
| 44 | 1 | $structuredEmojis = []; |
|
| 45 | |||
| 46 | 1 | foreach ($emojis as $name => $image) { |
|
| 47 | 1 | $structuredEmojis[] = [ |
|
| 48 | 1 | 'name' => $name, |
|
| 49 | 1 | 'image' => $image, |
|
| 50 | ]; |
||
| 51 | } |
||
| 52 | |||
| 53 | 1 | return observableFromArray($structuredEmojis); |
|
| 54 | })->map(function ($emoji) { |
||
| 55 | 1 | return $this->hydrator->hydrate(EmojiInterface::HYDRATE_CLASS, $emoji); |
|
| 56 | 1 | }) |
|
| 57 | ); |
||
| 58 | } |
||
| 59 | } |
||
| 60 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.