Passed
Pull Request — master (#610)
by Richard
14:27
created
htdocs/modules/mainmenu/blocks/mainmenu_mainmenu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                     if ($helper->isCurrentModule() && isset($res['subMenu']) && is_array($res['subMenu'])) {
56 56
                         foreach ($res['subMenu'] as  $key => $subMenu) {
57 57
                             if (isset($subMenu['name']) && isset($subMenu['link'])) {
58
-                                $subMenu['icon'] = isset($subMenu['icon']) ? $subMenu['icon'] :'glyphicon-menu-right';
58
+                                $subMenu['icon'] = isset($subMenu['icon']) ? $subMenu['icon'] : 'glyphicon-menu-right';
59 59
                                 $res['subMenu'][$key] = $subMenu;
60 60
                             }
61 61
                         }
Please login to merge, or discard this patch.
htdocs/modules/thumbs/admin/about.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * @package   thumbs
18 18
  * @author    Mage Grégory (AKA Mage)
19 19
  */
20
-include __DIR__ . '/header.php';
20
+include __DIR__.'/header.php';
21 21
 $xoops = Xoops::getInstance();
22 22
 $xoops->header();
23 23
 $aboutAdmin = new \Xoops\Module\Admin();
Please login to merge, or discard this patch.
htdocs/modules/thumbs/admin/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * @package   thumbs
18 18
  * @author    Mage Grégory (AKA Mage)
19 19
  */
20
-include __DIR__ . '/header.php';
20
+include __DIR__.'/header.php';
21 21
 
22 22
 $xoops = Xoops::getInstance();
23 23
 
Please login to merge, or discard this patch.
htdocs/modules/thumbs/admin/header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,4 +17,4 @@
 block discarded – undo
17 17
  * @package   thumbs
18 18
  * @author    Mage Grégory (AKA Mage)
19 19
  */
20
-require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
20
+require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
Please login to merge, or discard this patch.
htdocs/modules/thumbs/preloads/preload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public static function eventCoreServiceLocateThumbnail(Provider $provider)
34 34
     {
35 35
         if (is_a($provider, '\Xoops\Core\Service\Provider')) {
36
-            $path = dirname(__DIR__) . '/class/ThumbsProvider.php';
36
+            $path = dirname(__DIR__).'/class/ThumbsProvider.php';
37 37
             require $path;
38 38
             $object = new ThumbsProvider();
39 39
             $provider->register($object);
Please login to merge, or discard this patch.
htdocs/modules/thumbs/include/thumbrender.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  */
20 20
 
21 21
 // this is located in include, otherwise normal/anon users do not have authority to run
22
-include dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
22
+include dirname(dirname(dirname(__DIR__))).'/mainfile.php';
23 23
 
24 24
 $xoops = Xoops::getInstance();
25 25
 $xoops->logger()->quiet();
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 $imgWidth  = Request::getInt('w', 0);
29 29
 $imgHeight = Request::getInt('h', 0);
30 30
 
31
-if ($imgWidth==0 && $imgHeight==0) {
31
+if ($imgWidth == 0 && $imgHeight == 0) {
32 32
     $configs = $xoops->getModuleConfigs('thumbs');
33 33
     $imgWidth  = $configs['thumbs_width'];
34 34
     $imgHeight = $configs['thumbs_height'];
35 35
 }
36
-$helper  = $xoops->getModuleHelper('thumbs');
36
+$helper = $xoops->getModuleHelper('thumbs');
37 37
 $thumbPath = $helper->buildThumbPath($imgPath, $imgWidth, $imgHeight);
38 38
 
39 39
 $oldUmask = umask(022);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 if ($image->resize($imgWidth, $imgHeight, ZEBRA_IMAGE_NOT_BOXED, -1)) {
53 53
     header("HTTP/1.1 301 Moved Permanently");
54
-    header('Location: ' . $xoops->url($thumbPath));
54
+    header('Location: '.$xoops->url($thumbPath));
55 55
 } else {
56 56
     header("HTTP/1.0 404 Not Found");
57 57
     // http_response_code(400);
Please login to merge, or discard this patch.
htdocs/modules/thumbs/class/helper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function buildThumbPath($imgPath, $width, $height)
46 46
     {
47 47
         //$xoops = \Xoops::getInstance();
48
-        if ($width==0 && $height==0) {
48
+        if ($width == 0 && $height == 0) {
49 49
             $width = $this->getConfig('thumbs_width');
50 50
             $height = $this->getConfig('thumbs_height');
51 51
         }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         if ($pathParts['dirname'] === '.') {
55 55
             $pathParts['dirname'] = '';
56 56
         }
57
-        $thumbPath = 'assets/thumbs/' . $pathParts['dirname'].$sizeDir.$pathParts['basename'];
57
+        $thumbPath = 'assets/thumbs/'.$pathParts['dirname'].$sizeDir.$pathParts['basename'];
58 58
 
59 59
         return $thumbPath;
60 60
     }
Please login to merge, or discard this patch.
htdocs/modules/thumbs/class/ThumbsProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,14 +63,14 @@
 block discarded – undo
63 63
     private function getThumbnailUrl($imgPath, $width, $height)
64 64
     {
65 65
         $xoops = \Xoops::getInstance();
66
-        $helper  = $xoops->getModuleHelper('thumbs');
66
+        $helper = $xoops->getModuleHelper('thumbs');
67 67
         $thumbPath = $helper->buildThumbPath($imgPath, $width, $height);
68 68
 
69 69
         $originalMtime = filemtime($xoops->path($imgPath));
70 70
         $thumbMtime = filemtime($xoops->path($thumbPath));
71
-        if (false===$thumbMtime || $originalMtime>$thumbMtime) {
71
+        if (false === $thumbMtime || $originalMtime > $thumbMtime) {
72 72
             $params = array(
73
-                'img' => (string) $imgPath,
73
+                'img' => (string)$imgPath,
74 74
             );
75 75
             if ($height) {
76 76
                 $params['h'] = $height;
Please login to merge, or discard this patch.
htdocs/modules/images/imagemanager.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @version         $Id$
23 23
  */
24 24
 
25
-include dirname(dirname(__DIR__)) . '/mainfile.php';
25
+include dirname(dirname(__DIR__)).'/mainfile.php';
26 26
 
27 27
 $xoops = Xoops::getInstance();
28 28
 $helper = Images::getInstance();
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 
61 61
             foreach (array_keys($images) as $i) {
62 62
                 if ($category->getVar('imgcat_storetype') === 'db') {
63
-                    $lcode = '[img align=left id=' . $images[$i]->getVar('image_id') . ']' . $images[$i]->getVar('image_nicename') . '[/img]';
64
-                    $code = '[img align=center id=' . $images[$i]->getVar('image_id') . ']' . $images[$i]->getVar('image_nicename') . '[/img]';
65
-                    $rcode = '[img align=right id=' . $images[$i]->getVar('image_id') . ']' . $images[$i]->getVar('image_nicename') . '[/img]';
66
-                    $src = $helper->url("image.php?id=" . $images[$i]->getVar('image_id'));
63
+                    $lcode = '[img align=left id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]';
64
+                    $code = '[img align=center id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]';
65
+                    $rcode = '[img align=right id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]';
66
+                    $src = $helper->url("image.php?id=".$images[$i]->getVar('image_id'));
67 67
                 } else {
68
-                    $lcode = '[img align=left]' . \XoopsBaseConfig::get('uploads-url') . '/' . $images[$i]->getVar('image_name') . '[/img]';
69
-                    $code = '[img align=center]' . \XoopsBaseConfig::get('uploads-url') . '/' . $images[$i]->getVar('image_name') . '[/img]';
70
-                    $rcode = '[img align=right]' . \XoopsBaseConfig::get('uploads-url') . '/' . $images[$i]->getVar('image_name') . '[/img]';
71
-                    $src = \XoopsBaseConfig::get('uploads-url') . '/' . $images[$i]->getVar('image_name');
68
+                    $lcode = '[img align=left]'.\XoopsBaseConfig::get('uploads-url').'/'.$images[$i]->getVar('image_name').'[/img]';
69
+                    $code = '[img align=center]'.\XoopsBaseConfig::get('uploads-url').'/'.$images[$i]->getVar('image_name').'[/img]';
70
+                    $rcode = '[img align=right]'.\XoopsBaseConfig::get('uploads-url').'/'.$images[$i]->getVar('image_name').'[/img]';
71
+                    $src = \XoopsBaseConfig::get('uploads-url').'/'.$images[$i]->getVar('image_name');
72 72
                 }
73 73
                 $xoopsTpl->append('images', array(
74 74
                     'id' => $images[$i]->getVar('image_id'),
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             if ($perm_handler->checkRight('imgcat_write', $imgcat_id, $groups)) {
91 91
                 $xoops->simpleHeader();
92 92
                 $xoopsTpl = new XoopsTpl();
93
-                $obj =  $helper->getHandlerImages()->create();
93
+                $obj = $helper->getHandlerImages()->create();
94 94
                 $obj->setVar('imgcat_id', $imgcat_id);
95 95
                 $form = $helper->getForm(array('obj' => $obj, 'target' => $target), 'image_imagemanager');
96 96
                 $xoopsTpl->assign('form', $form->render());
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
     case 'save':
102 102
         if (!$xoops->security()->check()) {
103
-            $xoops->redirect('imagemanager.php?imgcat_id=' . $imgcat_id, 3, implode('<br />', $xoops->security()->getErrors()));
103
+            $xoops->redirect('imagemanager.php?imgcat_id='.$imgcat_id, 3, implode('<br />', $xoops->security()->getErrors()));
104 104
         }
105 105
 
106 106
         $mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         $xoops_upload_file = Request::getArray('xoops_upload_file', array());
120 120
 
121 121
         $uploader = new XoopsMediaUploader(
122
-            \XoopsBaseConfig::get('uploads-url') . '/images',
122
+            \XoopsBaseConfig::get('uploads-url').'/images',
123 123
             $mimetypes,
124 124
             $category->getVar('imgcat_maxsize'),
125 125
             $category->getVar('imgcat_maxwidth'),
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     @fclose($fp);
140 140
                     $image_body = $fbinary;
141 141
                 } else {
142
-                    $obj->setVar('image_name', 'images/' . $uploader->getSavedFileName());
142
+                    $obj->setVar('image_name', 'images/'.$uploader->getSavedFileName());
143 143
                 }
144 144
             }
145 145
         }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                     @unlink($uploader->getSavedDestination());
157 157
                 }
158 158
             }
159
-            $xoops->redirect('imagemanager.php?target=' . $target . '&imgcat_id=' . $imgcat_id, 2, implode('<br />', $msg));
159
+            $xoops->redirect('imagemanager.php?target='.$target.'&imgcat_id='.$imgcat_id, 2, implode('<br />', $msg));
160 160
         }
161 161
         echo $xoops->alert('error', $obj->getHtmlErrors());
162 162
         break;
Please login to merge, or discard this patch.