Completed
Push — master ( d235f7...843ccd )
by Jakub
02:33
created
tests/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 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) {
6
-  $configurator->addParameters(["appDir" => __DIR__,]);
5
+Testbench\Bootstrap::setup(__DIR__ . '/_temp', function(\Nette\Configurator $configurator) {
6
+  $configurator->addParameters(["appDir" => __DIR__, ]);
7 7
   $configurator->addConfig(__DIR__ . "/tests.neon");
8 8
 });
9 9
 ?>
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
src/CombatAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
   protected $message;
47 47
   
48 48
   public function __construct(ITranslator $translator, array $action) {
49
-    $requiredStats = ["action", "result", "character1", "character2",];
49
+    $requiredStats = ["action", "result", "character1", "character2", ];
50 50
     $resolver = new OptionsResolver();
51
-    $resolver->setDefined(["amount", "name",]);
51
+    $resolver->setDefined(["amount", "name", ]);
52 52
     $resolver->setRequired($requiredStats);
53 53
     $resolver->setAllowedTypes("action", "string");
54 54
     $resolver->setAllowedValues("action", function(string $value) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $text = $this->translator->translate("combat.log.poison", $this->amount, ["character1" => $character1]);
151 151
         break;
152 152
     }
153
-    $this->message =  $text;
153
+    $this->message = $text;
154 154
   }
155 155
   
156 156
   public function __toString(): string {
Please login to merge, or discard this patch.
src/SkillAttack.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
   
49 49
   protected function configureOptions(OptionsResolver $resolver): void {
50 50
     parent::configureOptions($resolver);
51
-    $allStats = ["baseDamage", "damageGrowth", "strikes", "hitRate",];
51
+    $allStats = ["baseDamage", "damageGrowth", "strikes", "hitRate", ];
52 52
     $resolver->setRequired($allStats);
53 53
     $resolver->setAllowedTypes("baseDamage", "string");
54 54
     $resolver->setAllowedTypes("damageGrowth", "string");
Please login to merge, or discard this patch.
src/BaseSkill.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
   protected $levels;
42 42
   
43 43
   protected function configureOptions(OptionsResolver $resolver): void {
44
-    $resolver->setRequired(["id", "name", "target", "levels",]);
45
-    $resolver->setDefined(["description", "neededClass", "neededSpecialization", "neededLevel",]);
44
+    $resolver->setRequired(["id", "name", "target", "levels", ]);
45
+    $resolver->setDefined(["description", "neededClass", "neededSpecialization", "neededLevel", ]);
46 46
     $resolver->setAllowedTypes("id", "int");
47 47
     $resolver->setAllowedTypes("name", "string");
48 48
     $resolver->setAllowedTypes("description", "string");
Please login to merge, or discard this patch.
src/Pet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
   protected $bonusValue;
35 35
   
36 36
   public function __construct(array $data) {
37
-    $allStats = ["id", "deployed", "bonusStat", "bonusValue",];
37
+    $allStats = ["id", "deployed", "bonusStat", "bonusValue", ];
38 38
     $resolver = new OptionsResolver();
39 39
     $resolver->setRequired($allStats);
40 40
     $resolver->setAllowedTypes("id", "integer");
Please login to merge, or discard this patch.
src/Equipment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
   protected $worn;
50 50
   
51 51
   public function __construct(array $data) {
52
-    $allStats = ["id", "name", "slot", "type", "strength", "worn",];
52
+    $allStats = ["id", "name", "slot", "type", "strength", "worn", ];
53 53
     $resolver = new OptionsResolver();
54 54
     $resolver->setRequired($allStats);
55 55
     $resolver->setAllowedTypes("id", "integer");
Please login to merge, or discard this patch.
src/SkillSpecial.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
   public const TARGET_PARTY = "party";
27 27
   public const TARGET_ENEMY_PARTY = "enemy_party";
28 28
   /** @var string[] */
29
-  public const NO_STAT_TYPES = [self::TYPE_STUN, self::TYPE_POISON,];
29
+  public const NO_STAT_TYPES = [self::TYPE_STUN, self::TYPE_POISON, ];
30 30
   
31 31
   /** @var string */
32 32
   protected $type;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
   
61 61
   protected function configureOptions(OptionsResolver $resolver): void {
62 62
     parent::configureOptions($resolver);
63
-    $allStats = ["type", "stat", "value", "valueGrowth", "duration",];
63
+    $allStats = ["type", "stat", "value", "valueGrowth", "duration", ];
64 64
     $resolver->setRequired($allStats);
65 65
     $resolver->setAllowedTypes("type", "string");
66 66
     $resolver->setAllowedValues("type", function(string $value) {
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
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
   public $onRemove = [];
47 47
   
48 48
   public function __construct(array $effect) {
49
-    $allStats = ["id", "type", "source", "value", "duration", "stat",];
49
+    $allStats = ["id", "type", "source", "value", "duration", "stat", ];
50 50
     $resolver = new OptionsResolver();
51 51
     $resolver->setRequired($allStats);
52 52
     $resolver->setAllowedTypes("id", "string");
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
   
96 96
   protected function getAllowedStats(): array {
97 97
     $stats = Constants::getConstantsValues(Character::class, "STAT_");
98
-    $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma",]);
98
+    $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma", ]);
99 99
     return $stats;
100 100
   }
101 101
   
Please login to merge, or discard this patch.
src/Character.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,10 +190,10 @@
 block discarded – undo
190 190
   }
191 191
   
192 192
   protected function setStats(array $stats): void {
193
-    $requiredStats = array_merge(["id", "name", "level", "initiativeFormula",], static::BASE_STATS);
194
-    $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience",]);
193
+    $requiredStats = array_merge(["id", "name", "level", "initiativeFormula", ], static::BASE_STATS);
194
+    $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience", ]);
195 195
     $numberStats = static::BASE_STATS;
196
-    $textStats = ["name", "race", "occupation", "initiativeFormula",];
196
+    $textStats = ["name", "race", "occupation", "initiativeFormula", ];
197 197
     $resolver = new OptionsResolver();
198 198
     $resolver->setDefined($allStats);
199 199
     $resolver->setAllowedTypes("id", ["integer", "string"]);
Please login to merge, or discard this patch.