Passed
Branch v1.x-dev (59e086)
by Benjamin
04:11
created
src/DependencyInjection/ObblmCoreExtension.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,14 +52,12 @@
 block discarded – undo
52 52
     {
53 53
         // Upload
54 54
         $uploadDirectory = (!isset($config['obblm.upload_directory'])) ?
55
-            $uploadDirectory = $container->getParameter('kernel.project_dir') . '/public/obblm/uploads' :
56
-            $config['obblm.upload_directory'];
55
+            $uploadDirectory = $container->getParameter('kernel.project_dir') . '/public/obblm/uploads' : $config['obblm.upload_directory'];
57 56
         $container->setParameter('obblm.config.directory.upload', $uploadDirectory);
58 57
 
59 58
         // Image resize cache
60 59
         $uploadDirectory = (!isset($config['obblm.public_cache_directory'])) ?
61
-            $uploadDirectory = $container->getParameter('kernel.project_dir') . '/public/obblm/cache' :
62
-            $config['obblm.public_cache_directory'];
60
+            $uploadDirectory = $container->getParameter('kernel.project_dir') . '/public/obblm/cache' : $config['obblm.public_cache_directory'];
63 61
         $container->setParameter('obblm.config.directory.public.cache', $uploadDirectory);
64 62
     }
65 63
 
Please login to merge, or discard this patch.
src/Helper/Rule/Traits/AbstractPlayerRuleTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @return object|null
88 88
      * @throws \Exception
89 89
      */
90
-    public function getInjury($key):?object
90
+    public function getInjury($key): ?object
91 91
     {
92 92
         if (!$this->getInjuries()->containsKey($key)) {
93 93
             throw new NotFoundKeyException($key, 'getInjuries', self::class);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param PlayerVersion $version
104 104
      * @return string|null
105 105
      */
106
-    public function getSppLevel(PlayerVersion $version):?string
106
+    public function getSppLevel(PlayerVersion $version): ?string
107 107
     {
108 108
         if ($version->getSpp() && $version->getSpp() > 0) {
109 109
             if ($this->getSppLevels()->containsKey($version->getSpp())) {
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         return $this->getSppLevels()->first();
116 116
     }
117 117
 
118
-    public function getContextForRoll(array $roll):?array
118
+    public function getContextForRoll(array $roll): ?array
119 119
     {
120 120
         $context = null;
121 121
         if (isset($roll['d6_1']) && isset($roll['d6_2'])) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         return $context;
140 140
     }
141 141
 
142
-    public function getAvailableSkills(?PlayerVersion $version, $context = ['single', 'double']):?ArrayCollection
142
+    public function getAvailableSkills(?PlayerVersion $version, $context = ['single', 'double']): ?ArrayCollection
143 143
     {
144 144
         $criteria = Criteria::create();
145 145
         if ($version) {
Please login to merge, or discard this patch.
src/Helper/Rule/CanHaveRuleInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 interface CanHaveRuleInterface
8 8
 {
9
-    public function getRule():?Rule;
9
+    public function getRule(): ?Rule;
10 10
 }
Please login to merge, or discard this patch.
src/Contracts/Rule/RuleTeamInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 {
14 14
     public function getInjuriesTable():array;
15 15
     public function calculateTeamValue(TeamVersion $version, bool $excludeDisposable = false):int;
16
-    public function calculateTeamRate(TeamVersion $version):?int;
16
+    public function calculateTeamRate(TeamVersion $version): ?int;
17 17
     public function getMaxTeamCost():int;
18 18
     public function getRerollCost(Team $team):int;
19 19
     public function getApothecaryCost(Team $team):int;
Please login to merge, or discard this patch.
src/Entity/Traits/NameTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         return $this;
24 24
     }
25 25
 
26
-    public function __toString():?string
26
+    public function __toString(): ?string
27 27
     {
28 28
         return $this->getName();
29 29
     }
Please login to merge, or discard this patch.
src/Twig/RulesExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             }
126 126
         }
127 127
         $translator = $this->translator;
128
-        $closure = function (Player $starPlayer) use ($translator, $rule) {
128
+        $closure = function(Player $starPlayer) use ($translator, $rule) {
129 129
             $starPlayer->setName($translator->trans($starPlayer->getName(), [], $rule->getRuleKey()));
130 130
             return $starPlayer;
131 131
         };
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $order = Criteria::create()->orderBy(['name' => 'ASC']);
175 175
 
176 176
         $translator = $this->translator;
177
-        $closure = function (Skill $skill) use ($translator, $rule) {
177
+        $closure = function(Skill $skill) use ($translator, $rule) {
178 178
             $skill->setName($translator->trans($skill->getName(), [], $rule->getRuleKey()));
179 179
             return $skill;
180 180
         };
Please login to merge, or discard this patch.
src/Helper/AssetPackager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
 
23 23
     private function load($directory)
24 24
     {
25
-        $manifestPath = $directory.'/manifest.json';
26
-        $entrypointsPath = $directory.'/entrypoints.json';
25
+        $manifestPath = $directory . '/manifest.json';
26
+        $entrypointsPath = $directory . '/entrypoints.json';
27 27
 
28 28
         $this->package = new Package(new JsonManifestVersionStrategy($manifestPath));
29 29
 
Please login to merge, or discard this patch.
src/Validator/Constraints/EntityExists.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 
14 14
     public function validatedBy()
15 15
     {
16
-        return get_class($this).'Validator';
16
+        return get_class($this) . 'Validator';
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Command/AbstractAdminCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     protected function askUsername():string
56 56
     {
57 57
         $coachRepository = $this->em->getRepository(Coach::class);
58
-        return $this->io->ask('User login', null, function ($username) use ($coachRepository) {
58
+        return $this->io->ask('User login', null, function($username) use ($coachRepository) {
59 59
             if (empty($username)) {
60 60
                 throw new \RuntimeException('The login cannot be empty.');
61 61
             }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     protected function askEmail():string
70 70
     {
71 71
         $coachRepository = $this->em->getRepository(Coach::class);
72
-        return $this->io->ask('User email', null, function ($email) use ($coachRepository) {
72
+        return $this->io->ask('User email', null, function($email) use ($coachRepository) {
73 73
             if (empty($email)) {
74 74
                 throw new \RuntimeException('The email cannot be empty.');
75 75
             }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     protected function askPassword():string
84 84
     {
85
-        $password = $this->io->askHidden('User password', function ($password) {
85
+        $password = $this->io->askHidden('User password', function($password) {
86 86
             if (empty($password)) {
87 87
                 throw new \RuntimeException('Password cannot be empty.');
88 88
             }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
         $coachRepository = $this->em->getRepository(Coach::class);
118 118
         if ($choice === 'login') {
119
-            return $this->io->ask('User login', null, function ($username) use ($coachRepository) {
119
+            return $this->io->ask('User login', null, function($username) use ($coachRepository) {
120 120
                 if (empty($username)) {
121 121
                     throw new \RuntimeException('The login cannot be empty.');
122 122
                 }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 return $coach;
128 128
             });
129 129
         }
130
-        return $this->io->ask('User email', null, function ($email) use ($coachRepository) {
130
+        return $this->io->ask('User email', null, function($email) use ($coachRepository) {
131 131
             if (empty($email)) {
132 132
                 throw new \RuntimeException('The email cannot be empty.');
133 133
             }
Please login to merge, or discard this patch.