Passed
Push — master ( bc69e6...465240 )
by Jakub
12:35
created
src/ICombatAction.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,6 +10,8 @@
 block discarded – undo
10 10
   public function getName(): string;
11 11
   public function getPriority(): int;
12 12
   public function shouldUse(CombatBase $combat, Character $character): bool;
13
-  public function do(CombatBase $combat, Character $character): void;
14
-}
13
+  public function do {
14
+    (CombatBase $combat, Character $character): void;
15
+  }
16
+  }
15 17
 ?>
16 18
\ No newline at end of file
Please login to merge, or discard this patch.
src/CombatActions/Heal.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,8 +26,10 @@
 block discarded – undo
26 26
     return (in_array($character, $this->findHealers($combat)->toArray(), true) && $this->selectHealingTarget($character, $combat) !== null);
27 27
   }
28 28
 
29
-  public function do(CombatBase $combat, Character $character): void {
29
+  public function do {
30
+    (CombatBase $combat, Character $character): void {
30 31
     $result = [];
32
+  }
31 33
     /** @var Character $patient */
32 34
     $patient = $this->selectHealingTarget($character, $combat);
33 35
     $result["result"] = $combat->successCalculator->hasHealed($character);
Please login to merge, or discard this patch.
src/CombatActions/Attack.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,8 +30,10 @@
 block discarded – undo
30 30
    * Hit chance = Attacker's hit - Defender's dodge, but at least 15%
31 31
    * Damage = Attacker's damage - defender's defense
32 32
    */
33
-  public function do(CombatBase $combat, Character $character): void {
33
+  public function do {
34
+    (CombatBase $combat, Character $character): void {
34 35
     $result = [];
36
+  }
35 37
     $defender = $combat->selectAttackTarget($character);
36 38
     if($defender === null) {
37 39
       return;
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 declare(strict_types=1);
3 3
 
4 4
 require __DIR__ . "/../vendor/autoload.php";
5
-Testbench\Bootstrap::setup(__DIR__ . '/_temp', function (\Nette\Configurator $configurator): void {
5
+Testbench\Bootstrap::setup(__DIR__ . '/_temp', function(\Nette\Configurator $configurator): void {
6 6
   $configurator->addParameters(["appDir" => __DIR__, ]);
7 7
   $configurator->addConfig(__DIR__ . "/tests.neon");
8 8
 });
Please login to merge, or discard this patch.
src/CombatActions/SkillAttack.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,9 +58,11 @@
 block discarded – undo
58 58
   /**
59 59
    * @throws NotImplementedException
60 60
    */
61
-  public function do(CombatBase $combat, Character $character): void {
61
+  public function do {
62
+    (CombatBase $combat, Character $character): void {
62 63
     /** @var CharacterAttackSkill $skill */
63 64
     $skill = $character->usableSkills[0];
65
+  }
64 66
     /** @var Character $primaryTarget */
65 67
     $primaryTarget = $combat->selectAttackTarget($character);
66 68
     $targets = match($skill->skill->target) {
Please login to merge, or discard this patch.
src/CombatActions/SkillSpecial.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,9 +56,11 @@
 block discarded – undo
56 56
   /**
57 57
    * @throws NotImplementedException
58 58
    */
59
-  public function do(CombatBase $combat, Character $character): void {
59
+  public function do {
60
+    (CombatBase $combat, Character $character): void {
60 61
     /** @var CharacterSpecialSkill $skill */
61 62
     $skill = $character->usableSkills[0];
63
+  }
62 64
     $targets = match($skill->skill->target) {
63 65
       Skill::TARGET_ENEMY => [$combat->selectAttackTarget($character)],
64 66
       Skill::TARGET_SELF => [$character],
Please login to merge, or discard this patch.
src/CharacterEffect.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
   protected string $stat = "";
31 31
   protected int $value = 0;
32 32
   protected bool $valueAbsolute;
33
-  protected int|string $duration;
33
+  protected int | string $duration;
34 34
   /** @var callable[] */
35 35
   public array $onApply = [];
36 36
   /** @var callable[] */
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     return $this->valueAbsolute;
128 128
   }
129 129
 
130
-  protected function getDuration(): int|string {
130
+  protected function getDuration(): int | string {
131 131
     return $this->duration;
132 132
   }
133 133
   
Please login to merge, or discard this patch.
src/Character.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
   public const STATUS_POISONED = "poisoned";
76 76
   public const STATUS_HIDDEN = "hidden";
77 77
 
78
-  protected int|string $id;
78
+  protected int | string $id;
79 79
   protected string $name;
80 80
   protected string $gender = "male";
81 81
   protected string $race;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     $this->dodgeBase = $this->dodge;
201 201
   }
202 202
 
203
-  protected function getId(): int|string {
203
+  protected function getId(): int | string {
204 204
     return $this->id;
205 205
   }
206 206
 
Please login to merge, or discard this patch.