@@ -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 | |
@@ -49,7 +49,7 @@ discard block |
||
| 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->setDefined($allStats); |
| 55 | 55 | $resolver->setRequired($allStats); |
@@ -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 @@ |
||
| 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 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $this->onCombatEnd[] = [$this, "removeCombatEffects"]; |
| 79 | 79 | $this->onCombatEnd[] = [$this, "logCombatResult"]; |
| 80 | 80 | $this->onCombatEnd[] = [$this, "resetInitiative"]; |
| 81 | - $this->onRoundStart[] = [$this ,"recalculateStats"]; |
|
| 81 | + $this->onRoundStart[] = [$this, "recalculateStats"]; |
|
| 82 | 82 | $this->onRoundStart[] = [$this, "logRoundNumber"]; |
| 83 | 83 | $this->onRoundStart[] = [$this, "applyPoison"]; |
| 84 | 84 | $this->onRound[] = [$this, "mainStage"]; |
@@ -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 | |
@@ -156,10 +156,10 @@ discard block |
||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | protected function setStats(array $stats): void { |
| 159 | - $requiredStats = ["id", "name", "level", "strength", "dexterity", "constitution", "intelligence", "charisma", "initiativeFormula",]; |
|
| 160 | - $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience",]); |
|
| 161 | - $numberStats = ["strength", "dexterity", "constitution", "intelligence", "charisma",]; |
|
| 162 | - $textStats = ["name", "race", "occupation", "initiativeFormula",]; |
|
| 159 | + $requiredStats = ["id", "name", "level", "strength", "dexterity", "constitution", "intelligence", "charisma", "initiativeFormula", ]; |
|
| 160 | + $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", "experience", ]); |
|
| 161 | + $numberStats = ["strength", "dexterity", "constitution", "intelligence", "charisma", ]; |
|
| 162 | + $textStats = ["name", "race", "occupation", "initiativeFormula", ]; |
|
| 163 | 163 | $resolver = new OptionsResolver(); |
| 164 | 164 | $resolver->setDefined($allStats); |
| 165 | 165 | $resolver->setAllowedTypes("id", ["integer", "string"]); |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | public function equipItem(int $itemId): void { |
| 402 | 402 | try { |
| 403 | 403 | $item = $this->getItem($itemId); |
| 404 | - } catch (\OutOfBoundsException $e) { |
|
| 404 | + } catch(\OutOfBoundsException $e) { |
|
| 405 | 405 | throw $e; |
| 406 | 406 | } |
| 407 | 407 | $itemBonus = new CharacterEffect($item->deployParams); |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | public function unequipItem(int $itemId): void { |
| 417 | 417 | try { |
| 418 | 418 | $item = $this->getItem($itemId); |
| 419 | - } catch (\OutOfBoundsException $e) { |
|
| 419 | + } catch(\OutOfBoundsException $e) { |
|
| 420 | 420 | throw $e; |
| 421 | 421 | } |
| 422 | 422 | $itemBonus = $item->deployParams; |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 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 |