Completed
Pull Request — master (#51)
by De Cramer
02:42
created
src/eXpansion/Framework/Core/Model/Gui/Factory/PagerFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $actionPreviousPage,
46 46
         $actionNextPage,
47 47
         $actionLastPage
48
-    ){
48
+    ) {
49 49
         $frame = new Frame();
50 50
         $frame->setSize($width, 7);
51 51
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         if ($currentPageNumber > 2) {
56 56
             $button = Quad_Icons64x64_1::create();
57 57
             $button->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_ArrowFirst)
58
-                ->setSize($buttonSize,$buttonSize)
58
+                ->setSize($buttonSize, $buttonSize)
59 59
                 ->setPosition(1, 0)
60 60
                 ->setAction($actionFirstPage);
61 61
             $frame->addChild($button);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if ($currentPageNumber > 1) {
64 64
             $button = Quad_Icons64x64_1::create();
65 65
             $button->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_ArrowPrev)
66
-                ->setSize($buttonSize,$buttonSize)
66
+                ->setSize($buttonSize, $buttonSize)
67 67
                 ->setPosition(2 + $buttonSize, 0)
68 68
                 ->setAction($actionPreviousPage);
69 69
             $frame->addChild($button);
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
         if ($currentPageNumber < $lastPageNumber) {
80 80
             $button = Quad_Icons64x64_1::create();
81 81
             $button->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_ArrowNext)
82
-                ->setSize($buttonSize,$buttonSize)
83
-                ->setPosition($frame->getWidth() - 1 - (2*$buttonSize), 0)
82
+                ->setSize($buttonSize, $buttonSize)
83
+                ->setPosition($frame->getWidth() - 1 - (2 * $buttonSize), 0)
84 84
                 ->setAction($actionNextPage);
85 85
             $frame->addChild($button);
86 86
         }
87 87
         if ($currentPageNumber < $lastPageNumber - 1) {
88 88
             $button = Quad_Icons64x64_1::create();
89 89
             $button->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_ArrowLast)
90
-                ->setSize($buttonSize,$buttonSize)
90
+                ->setSize($buttonSize, $buttonSize)
91 91
                 ->setPosition($frame->getWidth() - 1 - $buttonSize, 0)
92 92
                 ->setAction($actionLastPage);
93 93
             $frame->addChild($button);
Please login to merge, or discard this patch.
src/eXpansion/Framework/Core/Model/Gui/Factory/LineFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     public function create($totalWidth, $columns, $index = 0)
54 54
     {
55 55
         $totalCoef
56
-            = ($totalWidth - 1) / array_reduce($columns, function($carry, $item){return $carry + $item['width'];});
56
+            = ($totalWidth - 1) / array_reduce($columns, function($carry, $item) {return $carry + $item['width']; });
57 57
 
58 58
         $frame = new Frame();
59 59
         $frame->setHeight(5);
Please login to merge, or discard this patch.
src/eXpansion/Framework/Core/Model/Gui/Grid/GridBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->lineFactory = $lineFactory;
91 91
         $this->pagerFactory = $pagerFactory;
92 92
 
93
-        $this->pageKey = spl_object_hash($this) . "_key";
93
+        $this->pageKey = spl_object_hash($this)."_key";
94 94
     }
95 95
 
96 96
     /**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $lineHeight = 5 + 0.5;
193 193
 
194 194
         $frame = new Frame();
195
-        $frame->setPosition(0,0);
195
+        $frame->setPosition(0, 0);
196 196
         $frame->setSize($width, $height);
197 197
 
198 198
         $posY = 0;
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                         'width' => $columnData->getWidthCoeficiency(),
222 222
                         'translatable' => $columnData->getTranslatable()
223 223
                     ];
224
-                } elseif($columnData instanceof ActionColumn) {
224
+                } elseif ($columnData instanceof ActionColumn) {
225 225
                     $action = $this->actionFactory
226 226
                         ->createManialinkAction($this->manialink, $columnData->getCallable(), $lineData);
227 227
                     $this->temporaryActions[] = $action;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         /*
242 242
          * Handle the pager.
243 243
          */
244
-        $posY = ($frame->getHeight() -7) * -1;
244
+        $posY = ($frame->getHeight() - 7) * -1;
245 245
         $pager = $this->pagerFactory->create(
246 246
             $frame->getWidth(),
247 247
             $this->currentPage,
Please login to merge, or discard this patch.
src/eXpansion/Framework/Core/Helpers/Data/ArrayFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
                     $allTrue = true;
41 41
                     break;
42 42
                 } else if ($logic == self::FILTER_LOGIC_AND) {
43
-                    if (!$result)  {
43
+                    if (!$result) {
44 44
                         $allTrue = false;
45 45
                         break;
46 46
                     }
Please login to merge, or discard this patch.
src/eXpansion/Framework/Core/Plugins/Gui/WindowHelpFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,6 +113,6 @@
 block discarded – undo
113 113
      */
114 114
     public function callbackHelp($login, $params, $arguments)
115 115
     {
116
-        $this->chatCommandDataPovider->onPlayerChat(0, $login, '/' . $arguments['command'] . ' -h', true);
116
+        $this->chatCommandDataPovider->onPlayerChat(0, $login, '/'.$arguments['command'].' -h', true);
117 117
     }
118 118
 }
Please login to merge, or discard this patch.
src/eXpansion/Framework/Core/Model/Gui/Window.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         foreach ($translations as $msgId => $messages) {
169 169
             foreach ($messages as $message) {
170
-                $this->dictionary->setEntry($message['Lang'], $msgId, htmlspecialchars ($message['Text']));
170
+                $this->dictionary->setEntry($message['Lang'], $msgId, htmlspecialchars($message['Text']));
171 171
             }
172 172
         }
173 173
     }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         foreach ($frame->getChildren() as $child) {
184 184
             if ($child instanceof Label && $child->getTranslate()) {
185
-                $textId = 'exp_' . md5($child->getTextId());
185
+                $textId = 'exp_'.md5($child->getTextId());
186 186
                 $translations[$textId] = $this->translationHelper->getTranslations($child->getTextId(), []);
187 187
 
188 188
                 // Replaces with text id that can be used in the xml.
Please login to merge, or discard this patch.
src/eXpansion/Framework/Core/Helpers/Translations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@
 block discarded – undo
39 39
         $this->supportedLocales = $supportedLocales;
40 40
 
41 41
         foreach ($colorCodes as $code => $colorCode) {
42
-            $this->replacementPatterns["{" . $code . "}"] = '$z' . $colorCode;
42
+            $this->replacementPatterns["{".$code."}"] = '$z'.$colorCode;
43 43
         }
44 44
 
45 45
         foreach ($glyphIcons as $name => $icon) {
46
-            $this->replacementPatterns["|" . $name . "|"] = $icon;
46
+            $this->replacementPatterns["|".$name."|"] = $icon;
47 47
         }
48 48
     }
49 49
 
Please login to merge, or discard this patch.