Completed
Pull Request — develop (#302)
by John
03:42
created
Alpha/Model/ActiveRecord.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Alpha\Model\Type\Integer;
6 6
 use Alpha\Model\Type\Timestamp;
7
-use Alpha\Model\Type\Enum;
8 7
 use Alpha\Model\Type\Relation;
9 8
 use Alpha\Util\Config\ConfigProvider;
10 9
 use Alpha\Util\Logging\Logger;
Please login to merge, or discard this patch.
Alpha/Model/Article.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Alpha\Model\Type\Boolean;
9 9
 use Alpha\Model\Type\Relation;
10 10
 use Alpha\Util\Logging\Logger;
11
-use Alpha\Util\Config\Configprovider;
12 11
 use Alpha\Util\Http\Session\SessionProviderFactory;
13 12
 use Alpha\Exception\ValidationException;
14 13
 use Alpha\Exception\FileNotFoundException;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -452,7 +452,7 @@
 block discarded – undo
452 452
         }
453 453
 
454 454
         if ($vote_count > 0) {
455
-            $score = $total_score / $vote_count;
455
+            $score = $total_score/$vote_count;
456 456
         }
457 457
 
458 458
         return sprintf('%01.2f', $score);
Please login to merge, or discard this patch.
public/index.php 1 patch
Unused Use Statements   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,15 +2,15 @@
 block discarded – undo
2 2
 
3 3
 require_once __DIR__.'/../vendor/autoload.php';
4 4
 
5
-use Alpha\Controller\Front\FrontController;
6
-use Alpha\Util\Config\ConfigProvider;
7
-use Alpha\Util\Http\Filter\ClientBlacklistFilter;
8
-use Alpha\Util\Http\Filter\IPBlacklistFilter;
9
-use Alpha\Util\Http\Filter\ClientTempBlacklistFilter;
10
-use Alpha\Util\Http\Request;
11
-use Alpha\Util\Http\Response;
12
-use Alpha\Exception\ResourceNotFoundException;
13
-use Alpha\Exception\ResourceNotAllowedException;
5
+use Alpha\Controller\Front\FrontController;
6
+use Alpha\Util\Config\ConfigProvider;
7
+use Alpha\Util\Http\Filter\ClientBlacklistFilter;
8
+use Alpha\Util\Http\Filter\IPBlacklistFilter;
9
+use Alpha\Util\Http\Filter\ClientTempBlacklistFilter;
10
+use Alpha\Util\Http\Request;
11
+use Alpha\Util\Http\Response;
12
+use Alpha\Exception\ResourceNotFoundException;
13
+use Alpha\Exception\ResourceNotAllowedException;
14 14
 use Alpha\View\View;
15 15
 
16 16
 try {
Please login to merge, or discard this patch.
Alpha/View/Renderer/Html/RendererProviderHTML.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         // work out how many columns will be in the table
219 219
         $reflection = new ReflectionClass(get_class($this->BO));
220 220
         $properties = array_keys($reflection->getDefaultProperties());
221
-        $fields['colCount'] = 1 + count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
221
+        $fields['colCount'] = 1+count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
222 222
 
223 223
         // get the class attributes
224 224
         $properties = $reflection->getProperties();
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                     $html .= '  <th>'.$this->BO->getDataLabel($propName).'</th>';
240 240
                 }
241 241
             } else {
242
-                $fields['colCount'] = $fields['colCount'] - 1;
242
+                $fields['colCount'] = $fields['colCount']-1;
243 243
             }
244 244
         }
245 245
         $html .= '</tr><tr>';
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
                 if ($viewState->get('markdownTextBoxRows') == '') {
1010 1010
                     $text = new TextBox($this->BO->getPropObject($name), $label, $name, 10);
1011 1011
                 } else {
1012
-                    $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer) $viewState->get('markdownTextBoxRows'));
1012
+                    $text = new TextBox($this->BO->getPropObject($name), $label, $name, (integer)$viewState->get('markdownTextBoxRows'));
1013 1013
                 }
1014 1014
 
1015 1015
                 $html .= $text->render();
Please login to merge, or discard this patch.
Alpha/View/SequenceView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         // work out how many columns will be in the table
104 104
         $reflection = new \ReflectionClass(get_class($this->BO));
105 105
         $properties = array_keys($reflection->getDefaultProperties());
106
-        $fields['colCount'] = 1 + count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
106
+        $fields['colCount'] = 1+count(array_diff($properties, $this->BO->getDefaultAttributes(), $this->BO->getTransientAttributes()));
107 107
 
108 108
         // get the class attributes
109 109
         $properties = $reflection->getProperties();
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                     $html .= '  <th>'.$this->BO->getDataLabel($propName).'</th>';
125 125
                 }
126 126
             } else {
127
-                $fields['colCount'] = $fields['colCount'] - 1;
127
+                $fields['colCount'] = $fields['colCount']-1;
128 128
             }
129 129
         }
130 130
         $html .= '</tr><tr>';
Please login to merge, or discard this patch.
Alpha/View/Widget/Image.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             }
243 243
         } else {
244 244
             // make a cache dir for the article
245
-            $cacheDir = $config->get('app.file.store.dir').'cache/images/article_'.mb_substr($this->source, mb_strpos($this->source, 'attachments/article_') + 20, 11);
245
+            $cacheDir = $config->get('app.file.store.dir').'cache/images/article_'.mb_substr($this->source, mb_strpos($this->source, 'attachments/article_')+20, 11);
246 246
             if (!file_exists($cacheDir)) {
247 247
                 $success = mkdir($cacheDir);
248 248
 
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
             $targetScreenY = $targetScreenResolution[1];
301 301
 
302 302
             // calculate the new units we will scale by
303
-            $xu = $targetScreenX / $originalScreenX;
304
-            $yu = $targetScreenY / $originalScreenY;
303
+            $xu = $targetScreenX/$originalScreenX;
304
+            $yu = $targetScreenY/$originalScreenY;
305 305
 
306
-            $this->width = new Integer(intval($this->width->getValue() * $xu));
307
-            $this->height = new Integer(intval($this->height->getValue() * $yu));
306
+            $this->width = new Integer(intval($this->width->getValue()*$xu));
307
+            $this->height = new Integer(intval($this->height->getValue()*$yu));
308 308
 
309 309
             // need to update the cache filename as the dimensions have changed
310 310
             $this->setFilename();
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                 if ($this->sourceType->getValue() == 'png' && $config->get('cms.images.perserve.png')) {
369 369
                     imagepng($new_image);
370 370
                 } else {
371
-                    imagejpeg($new_image, null, 100 * $this->quality->getValue());
371
+                    imagejpeg($new_image, null, 100*$this->quality->getValue());
372 372
                 }
373 373
 
374 374
                 $this->cache($new_image);
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         if ($this->sourceType->getValue() == 'png' && $config->get('cms.images.perserve.png')) {
393 393
             imagepng($image, $this->filename);
394 394
         } else {
395
-            imagejpeg($image, $this->filename, 100 * $this->quality->getValue());
395
+            imagejpeg($image, $this->filename, 100*$this->quality->getValue());
396 396
         }
397 397
     }
398 398
 
Please login to merge, or discard this patch.
Alpha/View/DEnumView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 
112 112
         $html .= '</tr>';
113 113
 
114
-        $html .= '<tr><td colspan="'.($colCount + 1).'" style="text-align:center;">';
114
+        $html .= '<tr><td colspan="'.($colCount+1).'" style="text-align:center;">';
115 115
         // render edit buttons for admins only
116 116
         if ($session->get('currentUser') != null && $session->get('currentUser')->inGroup('Admin')) {
117 117
             $html .= '&nbsp;&nbsp;';
Please login to merge, or discard this patch.
Alpha/View/ArticleView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
 
219 219
                     $html .= '<tr>';
220 220
 
221
-                    $html .= '<td>'.$file.' <em>('.number_format(filesize($this->BO->getAttachmentsLocation().'/'.$file) / 1024).' KB)</em></td>';
221
+                    $html .= '<td>'.$file.' <em>('.number_format(filesize($this->BO->getAttachmentsLocation().'/'.$file)/1024).' KB)</em></td>';
222 222
 
223 223
                     $js = "if(window.jQuery) {
224 224
                             BootstrapDialog.show({
Please login to merge, or discard this patch.
Alpha/Task/CronManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             $task = new $taskClass();
86 86
 
87 87
             $startTime = microtime(true);
88
-            $maxAllowedTime = $startTime + $task->getMaxRunTime();
88
+            $maxAllowedTime = $startTime+$task->getMaxRunTime();
89 89
 
90 90
             self::$logger->info('Start time is ['.$startTime.'], maximum task run time is ['.$task->getMaxRunTime().']');
91 91
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             set_time_limit($task->getMaxRunTime());
94 94
             $task->doTask();
95 95
 
96
-            self::$logger->info('Done in ['.round(microtime(true) - $startTime, 5).'] seconds');
96
+            self::$logger->info('Done in ['.round(microtime(true)-$startTime, 5).'] seconds');
97 97
         }
98 98
 
99 99
         self::$logger->info('Finished processing all cron tasks');
Please login to merge, or discard this patch.