Passed
Push — master ( 6959b9...e4cb94 )
by Jakub
13:06
created
src/BaseChatCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function getName(): string
23 23
     {
24
-        if ($this->name !== "") {
24
+        if($this->name !== "") {
25 25
             return $this->name;
26 26
         }
27 27
         $className = join('', array_slice(explode('\\', static::class), -1));
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
  * @author Jakub Konečný
10 10
  * @property string $name
11 11
  */
12
-abstract class BaseChatCommand implements IChatCommand
13
-{
12
+abstract class BaseChatCommand implements IChatCommand {
14 13
     use \Nette\SmartObject;
15 14
 
16 15
     protected string $name = "";
Please login to merge, or discard this patch.
src/IChatCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  *
9 9
  * @author Jakub Konečný
10 10
  */
11
-interface IChatCommand
12
-{
11
+interface IChatCommand {
13 12
     public function getName(): string;
14 13
     public function setName(string $name): void;
15 14
     public function execute(): string;
Please login to merge, or discard this patch.
src/ChatCharacter.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
  *
9 9
  * @author Jakub Konečný
10 10
  */
11
-class ChatCharacter
12
-{
11
+class ChatCharacter {
13 12
     use \Nette\SmartObject;
14 13
 
15 14
     /** @var int|string */
@@ -18,8 +17,7 @@  discard block
 block discarded – undo
18 17
     /**
19 18
      * @param int|string $id
20 19
      */
21
-    public function __construct($id, public string $name)
22
-    {
20
+    public function __construct($id, public string $name) {
23 21
         $this->id = $id;
24 22
     }
25 23
 
@@ -27,8 +25,7 @@  discard block
 block discarded – undo
27 25
      * @return int|string
28 26
      * @deprecated Access the property directly
29 27
      */
30
-    public function getId()
31
-    {
28
+    public function getId() {
32 29
         return $this->id;
33 30
     }
34 31
 
Please login to merge, or discard this patch.
src/NewChatMessageFormFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $form->addSubmit("send", "chat.newMessageForm.submitButton.label");
27 27
         $form->addComponent($chatControl, "chat");
28 28
         // @phpstan-ignore assign.propertyType
29
-        $form->onSuccess[] = function (Form $form, array $values): void {
29
+        $form->onSuccess[] = function(Form $form, array $values): void {
30 30
             /** @var ChatControl $chat */
31 31
             $chat = $form->getComponent("chat");
32 32
             $chat->newMessage($values["message"]);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,10 +11,8 @@
 block discarded – undo
11 11
  *
12 12
  * @author Jakub Konečný
13 13
  */
14
-final class NewChatMessageFormFactory
15
-{
16
-    public function __construct(private readonly Translator $translator)
17
-    {
14
+final class NewChatMessageFormFactory {
15
+    public function __construct(private readonly Translator $translator) {
18 16
     }
19 17
 
20 18
     public function create(ChatControl $chatControl): Form
Please login to merge, or discard this patch.