@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | protected $bonusValue; |
| 36 | 36 | |
| 37 | 37 | public function __construct(array $data) { |
| 38 | - $allStats = ["id", "deployed", "bonusStat", "bonusValue",]; |
|
| 38 | + $allStats = ["id", "deployed", "bonusStat", "bonusValue", ]; |
|
| 39 | 39 | $resolver = new OptionsResolver(); |
| 40 | 40 | $resolver->setRequired($allStats); |
| 41 | 41 | $resolver->setAllowedTypes("id", "integer"); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -46,9 +46,9 @@ discard block |
||
| 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 |
||
| 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 { |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | protected $worn; |
| 51 | 51 | |
| 52 | 52 | public function __construct(array $data) { |
| 53 | - $allStats = ["id", "name", "slot", "type", "strength", "worn",]; |
|
| 53 | + $allStats = ["id", "name", "slot", "type", "strength", "worn", ]; |
|
| 54 | 54 | $resolver = new OptionsResolver(); |
| 55 | 55 | $resolver->setRequired($allStats); |
| 56 | 56 | $resolver->setAllowedTypes("id", "integer"); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -46,7 +46,7 @@ discard block |
||
| 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"); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | protected function getAllowedStats(): array { |
| 87 | 87 | $stats = Constants::getConstantsValues(SkillSpecial::class, "STAT_"); |
| 88 | - $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma",]); |
|
| 88 | + $stats = array_merge($stats, ["strength", "dexterity", "constitution", "intelligence", "charisma", ]); |
|
| 89 | 89 | return $stats; |
| 90 | 90 | } |
| 91 | 91 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |
@@ -161,10 +161,10 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | protected function setStats(array $stats): void { |
| 164 | - $requiredStats = ["id", "name", "level", "strength", "dexterity", "constitution", "intelligence", "charisma", "initiativeFormula",]; |
|
| 165 | - $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience",]); |
|
| 166 | - $numberStats = ["strength", "dexterity", "constitution", "intelligence", "charisma",]; |
|
| 167 | - $textStats = ["name", "race", "occupation", "initiativeFormula",]; |
|
| 164 | + $requiredStats = ["id", "name", "level", "strength", "dexterity", "constitution", "intelligence", "charisma", "initiativeFormula", ]; |
|
| 165 | + $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience", ]); |
|
| 166 | + $numberStats = ["strength", "dexterity", "constitution", "intelligence", "charisma", ]; |
|
| 167 | + $textStats = ["name", "race", "occupation", "initiativeFormula", ]; |
|
| 168 | 168 | $resolver = new OptionsResolver(); |
| 169 | 169 | $resolver->setDefined($allStats); |
| 170 | 170 | $resolver->setAllowedTypes("id", ["integer", "string"]); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace HeroesofAbenez\Combat; |
| 5 | 5 | |