@@ -2,8 +2,8 @@ |
||
| 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 |
@@ -48,7 +48,7 @@ |
||
| 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"); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @return Character[] |
| 51 | 51 | */ |
| 52 | 52 | public function getAliveMembers(): array { |
| 53 | - return $this->getItems(["hitpoints>" => 0,]); |
|
| 53 | + return $this->getItems(["hitpoints>" => 0, ]); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | return null; |
| 129 | 129 | } |
| 130 | 130 | for($i = 1; $i <= PHP_INT_MAX; $i++) { |
| 131 | - if($this->hasItems(["positionRow" => $i, "hitpoints>" => 0,])) { |
|
| 131 | + if($this->hasItems(["positionRow" => $i, "hitpoints>" => 0, ])) { |
|
| 132 | 132 | return $i; |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | protected function configureOptions(OptionsResolver $resolver): void { |
| 55 | - $allStats = ["id", "name", "slot", "type", "strength", "worn",]; |
|
| 55 | + $allStats = ["id", "name", "slot", "type", "strength", "worn", ]; |
|
| 56 | 56 | $resolver->setRequired($allStats); |
| 57 | 57 | $resolver->setAllowedTypes("id", "integer"); |
| 58 | 58 | $resolver->setAllowedTypes("name", "string"); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | protected function configureOptions(OptionsResolver $resolver): void { |
| 40 | - $allStats = ["id", "deployed", "bonusStat", "bonusValue",]; |
|
| 40 | + $allStats = ["id", "deployed", "bonusStat", "bonusValue", ]; |
|
| 41 | 41 | $resolver->setRequired($allStats); |
| 42 | 42 | $resolver->setAllowedTypes("id", "integer"); |
| 43 | 43 | $resolver->setAllowedTypes("deployed", "boolean"); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | protected $levels; |
| 42 | 42 | |
| 43 | 43 | protected function configureOptions(OptionsResolver $resolver): void { |
| 44 | - $resolver->setRequired(["id", "name", "target", "levels",]); |
|
| 44 | + $resolver->setRequired(["id", "name", "target", "levels", ]); |
|
| 45 | 45 | $resolver->setAllowedTypes("id", "int"); |
| 46 | 46 | $resolver->setAllowedTypes("name", "string"); |
| 47 | 47 | $resolver->setAllowedTypes("target", "string"); |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | protected function configureOptions(OptionsResolver $resolver): void { |
| 73 | - $allStats = ["id", "type", "value", "valueAbsolute", "duration", "stat",]; |
|
| 73 | + $allStats = ["id", "type", "value", "valueAbsolute", "duration", "stat", ]; |
|
| 74 | 74 | $resolver->setRequired($allStats); |
| 75 | 75 | $resolver->setAllowedTypes("id", "string"); |
| 76 | 76 | $resolver->setAllowedTypes("type", "string"); |
@@ -51,8 +51,8 @@ |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | protected function configureOptions(OptionsResolver $resolver): void { |
| 54 | - $requiredStats = ["action", "result", "character1", "character2",]; |
|
| 55 | - $resolver->setDefined(["amount", "name",]); |
|
| 54 | + $requiredStats = ["action", "result", "character1", "character2", ]; |
|
| 55 | + $resolver->setDefined(["amount", "name", ]); |
|
| 56 | 56 | $resolver->setRequired($requiredStats); |
| 57 | 57 | $resolver->setAllowedTypes("action", "string"); |
| 58 | 58 | $resolver->setAllowedTypes("result", "bool"); |
@@ -201,10 +201,10 @@ |
||
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | protected function setStats(array $stats): void { |
| 204 | - $requiredStats = array_merge(["id", "name", "level", "initiativeFormula",], static::BASE_STATS); |
|
| 205 | - $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender",]); |
|
| 204 | + $requiredStats = array_merge(["id", "name", "level", "initiativeFormula", ], static::BASE_STATS); |
|
| 205 | + $allStats = array_merge($requiredStats, ["occupation", "race", "specialization", "gender", ]); |
|
| 206 | 206 | $numberStats = static::BASE_STATS; |
| 207 | - $textStats = ["name", "race", "occupation", "specialization", "initiativeFormula",]; |
|
| 207 | + $textStats = ["name", "race", "occupation", "specialization", "initiativeFormula", ]; |
|
| 208 | 208 | $resolver = new OptionsResolver(); |
| 209 | 209 | $resolver->setDefined($allStats); |
| 210 | 210 | $resolver->setAllowedTypes("id", ["integer", "string"]); |