@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface IFakeFactory |
|
| 12 | -{ |
|
| 11 | +interface IFakeFactory { |
|
| 13 | 12 | public function create(): \stdClass; |
| 14 | 13 | } |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface IExampleChatControlFactory |
|
| 12 | -{ |
|
| 11 | +interface IExampleChatControlFactory { |
|
| 13 | 12 | public function create(): ExampleChatControl; |
| 14 | 13 | } |
@@ -3,8 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Chat; |
| 5 | 5 | |
| 6 | -final class TestCommand extends BaseChatCommand |
|
| 7 | -{ |
|
| 6 | +final class TestCommand extends BaseChatCommand { |
|
| 8 | 7 | /** @var string */ |
| 9 | 8 | protected string $name = "test1"; |
| 10 | 9 | |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -final class FakeDatabaseAdapter implements DatabaseAdapter |
|
| 12 | -{ |
|
| 11 | +final class FakeDatabaseAdapter implements DatabaseAdapter { |
|
| 13 | 12 | protected function getFakeCharacter(): ChatCharacter |
| 14 | 13 | { |
| 15 | 14 | return new ChatCharacter(1, "fake"); |
@@ -8,10 +8,8 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -final class ExampleChatControl extends ChatControl |
|
| 12 | -{ |
|
| 13 | - public function __construct(DatabaseAdapter $databaseAdapter) |
|
| 14 | - { |
|
| 11 | +final class ExampleChatControl extends ChatControl { |
|
| 12 | + public function __construct(DatabaseAdapter $databaseAdapter) { |
|
| 15 | 13 | parent::__construct($databaseAdapter, "example", 1); |
| 16 | 14 | } |
| 17 | 15 | } |
@@ -3,8 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Chat; |
| 5 | 5 | |
| 6 | -final class Test2Command extends BaseChatCommand |
|
| 7 | -{ |
|
| 6 | +final class Test2Command extends BaseChatCommand { |
|
| 8 | 7 | public const NAME = "test2"; |
| 9 | 8 | |
| 10 | 9 | public function execute(): string |
@@ -20,8 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | protected ChatCommandsProcessor $model; |
| 22 | 22 | |
| 23 | - public function __construct() |
|
| 24 | - { |
|
| 23 | + public function __construct() { |
|
| 25 | 24 | $this->model = $this->getService(ChatCommandsProcessor::class); // @phpstan-ignore assign.propertyType |
| 26 | 25 | $this->model->addCommand(new TestCommand()); |
| 27 | 26 | } |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author Jakub Konečný |
| 10 | 10 | */ |
| 11 | -interface ChatMessageProcessor |
|
| 12 | -{ |
|
| 11 | +interface ChatMessageProcessor { |
|
| 13 | 12 | /** |
| 14 | 13 | * @return null|string The result/null if the processor is not applicable |
| 15 | 14 | */ |
@@ -6,8 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | if (false) { |
| 8 | 8 | /** @deprecated use DatabaseAdapter */ |
| 9 | - interface IDatabaseAdapter extends DatabaseAdapter |
|
| 10 | - { |
|
| 9 | + interface IDatabaseAdapter extends DatabaseAdapter { |
|
| 11 | 10 | } |
| 12 | 11 | |
| 13 | 12 | } else { |