Completed
Branch v1.x-dev (c233f8)
by Benjamin
04:08
created
Category
src/Service/FileTeamUploader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         return null;
30 30
     }
31 31
 
32
-    public function uploadLogoIfExists(Team $object, $logoFile):?File
32
+    public function uploadLogoIfExists(Team $object, $logoFile): ?File
33 33
     {
34 34
         if ($logoFile) {
35 35
             $this->setObjectSubDirectory($object->getId());
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         }
45 45
         return null;
46 46
     }
47
-    public function uploadCoverIfExists(Team $object, $coverFile):?File
47
+    public function uploadCoverIfExists(Team $object, $coverFile): ?File
48 48
     {
49 49
         if ($coverFile) {
50 50
             $this->setObjectSubDirectory($object->getId());
Please login to merge, or discard this patch.
src/Helper/ImageHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
         $this->ruleHelper = $ruleHelper;
33 33
         $this->publicDirectory = $kernetProjectDir;
34 34
         $this->cacheDirectory = $cacheDirectory;
35
-        $this->ruleCacheDirectory = $this->cacheDirectory . self::RULE_PATH ;
36
-        $this->teamCacheDirectory = $this->cacheDirectory . self::TEAM_PATH ;
35
+        $this->ruleCacheDirectory = $this->cacheDirectory . self::RULE_PATH;
36
+        $this->teamCacheDirectory = $this->cacheDirectory . self::TEAM_PATH;
37 37
         $this->filesystem = new Filesystem();
38 38
         $this->fileTeamUploader = $fileTeamUploader;
39 39
     }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         if (!$this->filesystem->exists($path)) {
108 108
             $img = $this->imageManager->make($file);
109 109
             $this->filesystem->mkdir($newCacheDirectory);
110
-            $img->resize($width, $height, function ($constraint) {
110
+            $img->resize($width, $height, function($constraint) {
111 111
                 $constraint->aspectRatio();
112 112
             });
113 113
             $img->save($path);
Please login to merge, or discard this patch.
src/Controller/TeamController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
         $pdf->setOption('disable-javascript', true);
88 88
         $pdf->setOption('title', $team->getName());
89 89
 
90
-        $fileName =  urlencode($team->getName()) . '.pdf';
90
+        $fileName = urlencode($team->getName()) . '.pdf';
91 91
 
92 92
         return new PdfResponse($pdf->getOutputFromHtml($html), $fileName, null, ResponseHeaderBag::DISPOSITION_INLINE);
93 93
     }
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
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function getAvailableRosters():ArrayCollection;
15 15
     public function getInjuriesTable():array;
16 16
     public function calculateTeamValue(TeamVersion $version, bool $excludeDisposable = false):int;
17
-    public function calculateTeamRate(TeamVersion $version):?int;
17
+    public function calculateTeamRate(TeamVersion $version): ?int;
18 18
     public function getMaxTeamCost():int;
19 19
     public function getRerollCost(Team $team):int;
20 20
     public function getApothecaryCost(Team $team):int;
Please login to merge, or discard this patch.
src/Contracts/Rule/RulePlayerInterface.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,16 +10,16 @@
 block discarded – undo
10 10
  ****************/
11 11
 interface RulePlayerInterface
12 12
 {
13
-    public function setPlayerDefaultValues(PlayerVersion $version):?PlayerVersion;
13
+    public function setPlayerDefaultValues(PlayerVersion $version): ?PlayerVersion;
14 14
     public function playerIsDisposable(PlayerVersion $playerVersion):bool;
15
-    public function getInjury(string $key):?object;
15
+    public function getInjury(string $key): ?object;
16 16
     public function getAvailablePlayerKeyTypes(string $roster):array;
17 17
     public function getAvailablePlayerTypes(string $roster):array;
18 18
 
19 19
     /**************************
20 20
      * PLAYER EVOLUTION METHOD
21 21
      *************************/
22
-    public function getSppLevel(PlayerVersion $version):?string;
23
-    public function getContextForRoll(array $roll):?array;
24
-    public function getAvailableSkills(?PlayerVersion $version, array $context = null):?ArrayCollection;
22
+    public function getSppLevel(PlayerVersion $version): ?string;
23
+    public function getContextForRoll(array $roll): ?array;
24
+    public function getAvailableSkills(?PlayerVersion $version, array $context = null): ?ArrayCollection;
25 25
 }
Please login to merge, or discard this patch.
src/Tests/Helper/TranslatorTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,31 +21,31 @@  discard block
 block discarded – undo
21 21
     }
22 22
     private function getRule()
23 23
     {
24
-        $expected = self::RULE .'.title';
24
+        $expected = self::RULE . '.title';
25 25
         $result = CoreTranslation::getRuleTitle(self::RULE);
26 26
         $this->assertSame($expected, $result);
27
-        $expected = self::RULE .'.fields.' . self::FIELD . '.title';
27
+        $expected = self::RULE . '.fields.' . self::FIELD . '.title';
28 28
         $result = CoreTranslation::getFieldKey(self::RULE, self::FIELD);
29 29
         $this->assertSame($expected, $result);
30
-        $expected = self::RULE .'.fields.' . self::FIELD . '.weather.' . self::WEATHER;
30
+        $expected = self::RULE . '.fields.' . self::FIELD . '.weather.' . self::WEATHER;
31 31
         $result = CoreTranslation::getWeatherKey(self::RULE, self::FIELD, self::WEATHER);
32 32
         $this->assertSame($expected, $result);
33 33
     }
34 34
     private function getRoster()
35 35
     {
36
-        $expected = self::RULE . '.rosters.' . self::ROSTER .'.title';
36
+        $expected = self::RULE . '.rosters.' . self::ROSTER . '.title';
37 37
         $result = CoreTranslation::getRosterKey(self::RULE, self::ROSTER);
38 38
         $this->assertSame($expected, $result);
39
-        $expected = self::RULE . '.rosters.' . self::ROSTER .'.description';
39
+        $expected = self::RULE . '.rosters.' . self::ROSTER . '.description';
40 40
         $result = CoreTranslation::getRosterDescription(self::RULE, self::ROSTER);
41 41
         $this->assertSame($expected, $result);
42 42
     }
43 43
     private function getSkill()
44 44
     {
45
-        $expected = self::RULE . '.skills.' . self::SKILL .'.title';
45
+        $expected = self::RULE . '.skills.' . self::SKILL . '.title';
46 46
         $result = CoreTranslation::getSkillNameKey(self::RULE, self::SKILL);
47 47
         $this->assertSame($expected, $result);
48
-        $expected = self::RULE . '.skills.' . self::SKILL .'.description';
48
+        $expected = self::RULE . '.skills.' . self::SKILL . '.description';
49 49
         $result = CoreTranslation::getSkillDescription(self::RULE, self::SKILL);
50 50
         $this->assertSame($expected, $result);
51 51
         $expected = self::RULE . '.skill_types.' . self::SKILL_TYPE;
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
     }
55 55
     private function getTeam()
56 56
     {
57
-        $expected = self::RULE . '.rosters.' . self::ROSTER .'.title';
57
+        $expected = self::RULE . '.rosters.' . self::ROSTER . '.title';
58 58
         $result = CoreTranslation::getRosterKey(self::RULE, self::ROSTER);
59 59
         $this->assertSame($expected, $result);
60 60
     }
61 61
     private function getPlayer()
62 62
     {
63
-        $expected = self::RULE . '.rosters.' . self::ROSTER .'.title';
63
+        $expected = self::RULE . '.rosters.' . self::ROSTER . '.title';
64 64
         $result = CoreTranslation::getRosterKey(self::RULE, self::ROSTER);
65 65
         $this->assertSame($expected, $result);
66 66
     }
Please login to merge, or discard this patch.
src/Tests/Kernel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
     protected function configureContainer(ContainerConfigurator $container): void
20 20
     {
21 21
         $container->import('config/{packages}/*.yaml');
22
-        $container->import('config/{packages}/'.$this->environment.'/*.yaml');
22
+        $container->import('config/{packages}/' . $this->environment . '/*.yaml');
23 23
 
24
-        if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
24
+        if (is_file(\dirname(__DIR__) . '/config/services.yaml')) {
25 25
             $container->import('config/services.yaml');
26
-            $container->import('config/{services}_'.$this->environment.'.yaml');
27
-        } elseif (is_file($path = \dirname(__DIR__).'/../config/services.php')) {
26
+            $container->import('config/{services}_' . $this->environment . '.yaml');
27
+        } elseif (is_file($path = \dirname(__DIR__) . '/../config/services.php')) {
28 28
             (require $path)($container->withPath($path), $this);
29 29
         }
30 30
     }
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 
43 43
     protected function configureRoutes(RoutingConfigurator $routes): void
44 44
     {
45
-        $routes->import('config/{routes}/'.$this->environment.'/*.yaml');
45
+        $routes->import('config/{routes}/' . $this->environment . '/*.yaml');
46 46
         $routes->import('config/{routes}/*.yaml');
47 47
 
48
-        if (is_file(\dirname(__DIR__).'/../config/routes.yaml')) {
48
+        if (is_file(\dirname(__DIR__) . '/../config/routes.yaml')) {
49 49
             $routes->import('config/routes.yaml');
50
-        } elseif (is_file($path = \dirname(__DIR__).'/../config/routes.php')) {
50
+        } elseif (is_file($path = \dirname(__DIR__) . '/../config/routes.php')) {
51 51
             (require $path)($routes->withPath($path), $this);
52 52
         }
53 53
     }
Please login to merge, or discard this patch.
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.