Completed
Push — master ( 1dfedc...6e62ff )
by Jakub
03:32
created
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 2 patches
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.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
   public function damageStat(): string {
521 521
     $stat = static::STAT_STRENGTH;
522 522
     foreach($this->equipment as $item) {
523
-      if(!$item->worn OR $item->slot != Equipment::SLOT_WEAPON) {
523
+      if(!$item->worn or $item->slot != Equipment::SLOT_WEAPON) {
524 524
         continue;
525 525
       }
526 526
       switch($item->type) {
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
       $stat = $effect->stat;
580 580
       $type = $effect->type;
581 581
       $duration = $effect->duration;
582
-      if(is_int($duration) AND $duration < 1) {
582
+      if(is_int($duration) and $duration < 1) {
583 583
         $this->removeEffect($effect->id);
584 584
         continue;
585 585
       }
Please login to merge, or discard this patch.