@@ -149,11 +149,11 @@ |
||
| 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 | } |
@@ -30,7 +30,7 @@ |
||
| 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); |
@@ -96,7 +96,7 @@ |
||
| 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. |
@@ -968,7 +968,7 @@ |
||
| 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. |
@@ -75,6 +75,6 @@ |
||
| 75 | 75 | ]; |
| 76 | 76 | $cosApi = new Api($config); |
| 77 | 77 | |
| 78 | - return new \Freyo\Flysystem\QcloudCOSv4\Adapter($cosApi,$config); |
|
| 78 | + return new \Freyo\Flysystem\QcloudCOSv4\Adapter($cosApi, $config); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | \ No newline at end of file |
@@ -61,7 +61,7 @@ |
||
| 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 | } |
@@ -405,6 +405,6 @@ |
||
| 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 |
@@ -43,7 +43,7 @@ |
||
| 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.'); |
@@ -72,13 +72,13 @@ discard block |
||
| 72 | 72 | const AFTER_REGISTER = 'afterRegister'; |
| 73 | 73 | |
| 74 | 74 | //场景定义 |
| 75 | - const SCENARIO_CREATE = 'create';//后台或控制台创建用户 |
|
| 76 | - const SCENARIO_UPDATE = 'update';//后台或控制台修改用户 |
|
| 77 | - const SCENARIO_REGISTER = 'basic_create';//邮箱注册 |
|
| 78 | - const SCENARIO_EMAIL_REGISTER = 'email_create';//邮箱注册 |
|
| 79 | - const SCENARIO_MOBILE_REGISTER = 'mobile_create';//手机号注册 |
|
| 80 | - const SCENARIO_SETTINGS = 'settings';//更新 |
|
| 81 | - const SCENARIO_CONNECT = 'connect';//账户链接或自动注册新用户 |
|
| 75 | + const SCENARIO_CREATE = 'create'; //后台或控制台创建用户 |
|
| 76 | + const SCENARIO_UPDATE = 'update'; //后台或控制台修改用户 |
|
| 77 | + const SCENARIO_REGISTER = 'basic_create'; //邮箱注册 |
|
| 78 | + const SCENARIO_EMAIL_REGISTER = 'email_create'; //邮箱注册 |
|
| 79 | + const SCENARIO_MOBILE_REGISTER = 'mobile_create'; //手机号注册 |
|
| 80 | + const SCENARIO_SETTINGS = 'settings'; //更新 |
|
| 81 | + const SCENARIO_CONNECT = 'connect'; //账户链接或自动注册新用户 |
|
| 82 | 82 | const SCENARIO_PASSWORD = 'password'; |
| 83 | 83 | |
| 84 | 84 | // following constants are used on secured email changing process |
@@ -157,8 +157,8 @@ discard block |
||
| 157 | 157 | static::SCENARIO_EMAIL_REGISTER => ['nickname', 'email', 'password'], |
| 158 | 158 | static::SCENARIO_MOBILE_REGISTER => ['mobile', 'password'], |
| 159 | 159 | static::SCENARIO_SETTINGS => ['username', 'email', 'password'], |
| 160 | - static::SCENARIO_CONNECT => ['nickname', 'email', 'password'],//链接账户密码可以为空邮箱可以为空 |
|
| 161 | - static::SCENARIO_PASSWORD => ['password'],//只修改密码 |
|
| 160 | + static::SCENARIO_CONNECT => ['nickname', 'email', 'password'], //链接账户密码可以为空邮箱可以为空 |
|
| 161 | + static::SCENARIO_PASSWORD => ['password'], //只修改密码 |
|
| 162 | 162 | ]); |
| 163 | 163 | } |
| 164 | 164 | |