Completed
Push — master ( 2f8aec...b781ca )
by Richard
16s
created
xoops_lib/Xoops/Core/Service/Data/EmailAddress.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function __construct(?string $email = null, ?string $displayName = null)
60 60
     {
61
-        if (null!==$email) {
61
+        if (null !== $email) {
62 62
             $email = trim($email);
63 63
             Assert::true(
64
-                false!==filter_var($email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE),
64
+                false !== filter_var($email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE),
65 65
                 static::MESSAGE_ADDRESS
66 66
             );
67 67
             $this->email = $email;
68 68
         }
69
-        if (null!==$displayName) {
69
+        if (null !== $displayName) {
70 70
             $displayName = trim($displayName);
71 71
             $displayName = empty($displayName) ? null : $displayName;
72 72
             Assert::nullOrStringNotEmpty($displayName, static::MESSAGE_NAME);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         try {
87 87
             Assert::true(
88
-                false!==filter_var($this->email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE),
88
+                false !== filter_var($this->email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE),
89 89
                 static::MESSAGE_ADDRESS
90 90
             );
91 91
         } catch (\InvalidArgumentException $e) {
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Service/Data/Email.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,22 +115,22 @@
 block discarded – undo
115 115
         ?EmailAddress $fromAddress = null,
116 116
         ?EmailAddress $toAddress = null
117 117
     ) {
118
-        if (null!==$subject) {
118
+        if (null !== $subject) {
119 119
             $subject = trim($subject);
120 120
             Assert::stringNotEmpty($subject, static::MESSAGE_SUBJECT);
121 121
             $this->subject = $subject;
122 122
         }
123
-        if (null!==$body) {
123
+        if (null !== $body) {
124 124
             $body = trim($body);
125 125
             Assert::stringNotEmpty($body, static::MESSAGE_BODY);
126 126
             $this->body = $body;
127 127
         }
128 128
         try {
129
-            if (null!==$fromAddress) {
129
+            if (null !== $fromAddress) {
130 130
                 $fromAddress->getEmail();
131 131
                 $this->fromAddress = $fromAddress;
132 132
             }
133
-            if (null!==$toAddress) {
133
+            if (null !== $toAddress) {
134 134
                 $toAddress->getEmail();
135 135
                 $this->toAddresses = new EmailAddressList([$toAddress]);
136 136
             }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Service/AbstractContract.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
      */
41 41
     public function setPriority($priority)
42 42
     {
43
-        $this->priority = (int) $priority;
43
+        $this->priority = (int)$priority;
44 44
     }
45 45
 
46 46
     /**
Please login to merge, or discard this patch.
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.