Completed
Push — master ( 067418...4daa60 )
by Xu
47:44 queued 07:08
created
src/validators/IdCardValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -149,11 +149,11 @@
 block discarded – undo
149 149
      */
150 150
     private function getPowerSum($iArr) {
151 151
         $iSum = 0;
152
-        $powerLen = count ( $this->power );
153
-        $arrLen = count ( $iArr );
152
+        $powerLen = count($this->power);
153
+        $arrLen = count($iArr);
154 154
         if ($powerLen == $arrLen) {
155
-            for($i = 0; $i < $arrLen; $i ++) {
156
-                for($j = 0; $j < $powerLen; $j ++) {
155
+            for ($i = 0; $i < $arrLen; $i++) {
156
+                for ($j = 0; $j < $powerLen; $j++) {
157 157
                     if ($i == $j) {
158 158
                         $iSum = $iSum + $iArr [$i] * $this->power [$j];
159 159
                     }
Please login to merge, or discard this patch.
src/models/Settings.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
             'url' => ['value', 'url'],
31 31
             'object' => [
32 32
                 'value',
33
-                function ($attribute) {
33
+                function($attribute) {
34 34
                     $object = null;
35 35
                     try {
36 36
                         Json::decode($this->$attribute);
Please login to merge, or discard this patch.
src/caching/YacCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
      */
97 97
     protected function setValues($data, $duration)
98 98
     {
99
-        return $this->yac->set($data,$duration);
99
+        return $this->yac->set($data, $duration);
100 100
     }
101 101
     /**
102 102
      * Stores a value identified by a key into cache if the cache does not contain this key.
Please login to merge, or discard this patch.
src/helpers/StringHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -968,7 +968,7 @@
 block discarded – undo
968 968
     {
969 969
         // Does this string have any 4+ byte Unicode chars?
970 970
         if (max(array_map('ord', str_split($string))) >= 240) {
971
-            $string = preg_replace_callback('/./u', function (array $match) {
971
+            $string = preg_replace_callback('/./u', function(array $match) {
972 972
                 if (strlen($match[0]) >= 4) {
973 973
                     // (Logic pulled from WP's wp_encode_emoji() function)
974 974
                     // UTF-32's hex encoding is the same as HTML's hex encoding.
Please login to merge, or discard this patch.
src/helpers/ArrayHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      */
62 62
     public static function filterEmptyStringsFromArray(array $arr): array
63 63
     {
64
-        return array_filter($arr, function ($value): bool {
64
+        return array_filter($arr, function($value): bool {
65 65
             return $value !== '';
66 66
         });
67 67
     }
Please login to merge, or discard this patch.
src/base/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -405,6 +405,6 @@
 block discarded – undo
405 405
         } elseif ($items instanceof Traversable) {
406 406
             return iterator_to_array($items);
407 407
         }
408
-        return (array) $items;
408
+        return (array)$items;
409 409
     }
410 410
 }
411 411
\ No newline at end of file
Please login to merge, or discard this patch.
src/behaviors/SnowflakeBehavior.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         parent::init();
45 45
         if (empty($this->attributes)) {
46
-            $this->attributes = [BaseActiveRecord::EVENT_BEFORE_INSERT => [$this->attribute],];
46
+            $this->attributes = [BaseActiveRecord::EVENT_BEFORE_INSERT => [$this->attribute], ];
47 47
         }
48 48
         if ($this->attribute === null) {
49 49
             throw new InvalidConfigException('Either "attribute" property must be specified.');
Please login to merge, or discard this patch.
src/behaviors/DatetimeBehavior.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,6 +139,6 @@
 block discarded – undo
139 139
         if ($owner->getIsNewRecord()) {
140 140
             throw new InvalidCallException('Updating the timestamp is not possible on a new record.');
141 141
         }
142
-        $owner->updateAttributes(array_fill_keys((array) $attribute, $this->getValue(null)));
142
+        $owner->updateAttributes(array_fill_keys((array)$attribute, $this->getValue(null)));
143 143
     }
144 144
 }
145 145
\ No newline at end of file
Please login to merge, or discard this patch.
src/sms/gateways/AliyunGateway.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@
 block discarded – undo
55 55
     {
56 56
         parent::init();
57 57
         if (empty ($this->accessId)) {
58
-            throw new InvalidConfigException ('The "accessId" property must be set.');
58
+            throw new InvalidConfigException('The "accessId" property must be set.');
59 59
         }
60 60
         if (empty ($this->accessKey)) {
61
-            throw new InvalidConfigException ('The "accessKey" property must be set.');
61
+            throw new InvalidConfigException('The "accessKey" property must be set.');
62 62
         }
63 63
         if (empty ($this->signName)) {
64
-            throw new InvalidConfigException ('The "signName" property must be set.');
64
+            throw new InvalidConfigException('The "signName" property must be set.');
65 65
         }
66 66
     }
67 67
 
Please login to merge, or discard this patch.