Completed
Pull Request — master (#592)
by
unknown
14:06
created
xoops_lib/Xoops/Core/Service/Provider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         static $ret = null;
84 84
 
85
-        if ($ret===null) {
85
+        if ($ret === null) {
86 86
             if (count($this->providers)) {
87 87
                 $ret = reset($this->providers)->getMode();
88 88
             } else {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public function register(AbstractContract $object)
103 103
     {
104 104
         // verify this is the proper type of object
105
-        $contract = '\Xoops\Core\Service\Contract\\' . $this->service . 'Interface';
105
+        $contract = '\Xoops\Core\Service\Contract\\'.$this->service.'Interface';
106 106
 
107 107
         if (is_a($object, '\Xoops\Core\Service\AbstractContract')
108 108
             && $object instanceof $contract
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     public function sortProviders()
130 130
     {
131 131
         $sortable = $this->providers;
132
-        usort($sortable, function (AbstractContract $a, AbstractContract $b) {
132
+        usort($sortable, function(AbstractContract $a, AbstractContract $b) {
133 133
             if ($a->getPriority() != $b->getPriority()) {
134 134
                 return ($a->getPriority() > $b->getPriority()) ? 1 : -1;
135 135
             } else {
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
         $path = rtrim($path, '/');
38 38
         if (is_dir($path) && $handle = opendir($path)) {
39 39
             while (false !== ($file = readdir($handle))) {
40
-                if (!preg_match('/^[\.]{1,2}$/', $file) && is_file($path . '/' . $file)) {
41
-                    $file = $prefix . $file;
40
+                if (!preg_match('/^[\.]{1,2}$/', $file) && is_file($path.'/'.$file)) {
41
+                    $file = $prefix.$file;
42 42
                     $fileList[$file] = $file;
43 43
                 }
44 44
             }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/Editor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,6 +32,6 @@
 block discarded – undo
32 32
      */
33 33
     public static function getList()
34 34
     {
35
-        return Directory::getList(\XoopsBaseConfig::get('root-path') . '/class/xoopseditor/');
35
+        return Directory::getList(\XoopsBaseConfig::get('root-path').'/class/xoopseditor/');
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/Time.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@
 block discarded – undo
37 37
         $timeList = array();
38 38
         $tz = new \DateTimeZone('UTC');
39 39
 
40
-        $start = (int) $start;
41
-        $end = (int) $end;
42
-        if (abs($end-$start) > 86400) {
40
+        $start = (int)$start;
41
+        $end = (int)$end;
42
+        if (abs($end - $start) > 86400) {
43 43
             $start = 0;
44 44
             $end = 86400;
45 45
         }
46
-        $end = ($end <= 86400 && $end > 0) ?  $end : 86400;
46
+        $end = ($end <= 86400 && $end > 0) ? $end : 86400;
47 47
 
48
-        $interval = ((int) $interval !== 0) ? 60 * $interval : 60*15;
48
+        $interval = ((int)$interval !== 0) ? 60 * $interval : 60 * 15;
49 49
 
50 50
         for ($t = $start; $t < $end; $t += $interval) {
51 51
             //$formatted = Calendar::formatTimeEx($t, 'short', $tz);
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/HtmlFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
         if (is_dir($path) && $handle = opendir($path)) {
38 38
             while (false !== ($file = readdir($handle))) {
39 39
                 if ((preg_match('/\.(htm|html|xhtml)$/i', $file) && !is_dir($file))) {
40
-                    $file = $prefix . $file;
41
-                    $fileList[$file] = $prefix . $file;
40
+                    $file = $prefix.$file;
41
+                    $fileList[$file] = $prefix.$file;
42 42
                 }
43 43
             }
44 44
             closedir($handle);
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/Directory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,15 +34,15 @@
 block discarded – undo
34 34
      */
35 35
     public static function getList($path = '', $ignored = [])
36 36
     {
37
-        $ignored = (array) $ignored;
37
+        $ignored = (array)$ignored;
38 38
         $list = array();
39
-        $path = rtrim($path, '/') . '/';
39
+        $path = rtrim($path, '/').'/';
40 40
         if (is_dir($path) && $handle = opendir($path)) {
41 41
             while ($file = readdir($handle)) {
42 42
                 if (substr($file, 0, 1) === '.' || in_array(strtolower($file), $ignored)) {
43 43
                     continue;
44 44
                 }
45
-                if (is_dir($path . $file)) {
45
+                if (is_dir($path.$file)) {
46 46
                     $list[$file] = $file;
47 47
                 }
48 48
             }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/ImageFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         if (is_dir($path) && $handle = opendir($path)) {
38 38
             while (false !== ($file = readdir($handle))) {
39 39
                 if (preg_match('/\.(gif|jpg|jpeg|png|swf)$/i', $file)) {
40
-                    $file = $prefix . $file;
40
+                    $file = $prefix.$file;
41 41
                     $fileList[$file] = $file;
42 42
                 }
43 43
             }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/Theme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public static function getList()
32 32
     {
33
-        $fileList = Directory::getList(\XoopsBaseConfig::get('themes-path') . '/');
33
+        $fileList = Directory::getList(\XoopsBaseConfig::get('themes-path').'/');
34 34
 
35 35
         return $fileList;
36 36
     }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Lists/SubjectIcon.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $xoops = \Xoops::getInstance();
38 38
         $subDirectory = trim($subDirectory, '/');
39
-        $path = 'images/subject/' . $subDirectory;
40
-        $subjects = ImageFile::getList($xoops->path($path), $subDirectory . '/');
39
+        $path = 'images/subject/'.$subDirectory;
40
+        $subjects = ImageFile::getList($xoops->path($path), $subDirectory.'/');
41 41
 
42 42
         return $subjects;
43 43
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         foreach (array_keys($subjects) as $name) {
58 58
             $element->addOption(
59 59
                 $name,
60
-                '<img src="' . $xoops->url('images/subject/') . $name . '" alt="' . $name . '" />'
60
+                '<img src="'.$xoops->url('images/subject/').$name.'" alt="'.$name.'" />'
61 61
             );
62 62
         }
63 63
     }
Please login to merge, or discard this patch.