| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class CoreCommandWrapper extends AbstractCommandWrapper |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Command list |
||
| 16 | */ |
||
| 17 | const HELP_COMMAND = 'help'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var MinecraftClient |
||
| 21 | */ |
||
| 22 | protected $client; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var CommandFormatter |
||
| 26 | */ |
||
| 27 | protected $commandFormatter; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param MinecraftClient $client |
||
| 31 | * @param CommandFormatter $commandFormatter |
||
| 32 | */ |
||
| 33 | public function __construct(MinecraftClient $client, CommandFormatter $commandFormatter) |
||
| 34 | { |
||
| 35 | $this->client = $client; |
||
| 36 | $this->commandFormatter = $commandFormatter; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Shows a list of server or plugin commands in the console or in-game. |
||
| 41 | * |
||
| 42 | * @param string|null $topic |
||
| 43 | * @param int|null $pageNumber |
||
| 44 | * |
||
| 45 | * @return bool|mixed |
||
| 46 | */ |
||
| 47 | public function help(string $topic = null, int $pageNumber = null) |
||
| 60 | } |
||
| 61 | } |
||
| 62 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: