@@ -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 |
@@ -400,7 +400,7 @@ |
||
400 | 400 | return $items->all(); |
401 | 401 | } elseif ($items instanceof Arrayable) { |
402 | 402 | return $items->toArray(); |
403 | - } elseif ($items instanceof JsonSerializable) { |
|
403 | + } elseif ($items instanceof JsonSerializable) { |
|
404 | 404 | return $items->jsonSerialize(); |
405 | 405 | } elseif ($items instanceof Traversable) { |
406 | 406 | return iterator_to_array($items); |
@@ -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.'); |
@@ -34,10 +34,10 @@ |
||
34 | 34 | { |
35 | 35 | parent::init(); |
36 | 36 | if (empty ($this->appKey)) { |
37 | - throw new InvalidConfigException ('The "appKey" property must be set.'); |
|
37 | + throw new InvalidConfigException('The "appKey" property must be set.'); |
|
38 | 38 | } |
39 | 39 | if (empty ($this->appSecret)) { |
40 | - throw new InvalidConfigException ('The "appSecret" property must be set.'); |
|
40 | + throw new InvalidConfigException('The "appSecret" property must be set.'); |
|
41 | 41 | } |
42 | 42 | $this->_client = new JPush($this->appKey, $this->appSecret); |
43 | 43 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | public function exportFor($channel) |
58 | 58 | { |
59 | - if (method_exists($this, $method = 'exportFor'.Inflector::camelize($channel))) { |
|
59 | + if (method_exists($this, $method = 'exportFor' . Inflector::camelize($channel))) { |
|
60 | 60 | return $this->{$method}(); |
61 | 61 | } |
62 | 62 | throw new \InvalidArgumentException("Can not find message export for chanel `{$channel}`"); |
@@ -23,8 +23,8 @@ |
||
23 | 23 | /** |
24 | 24 | * Handles adding <?= $columns ?> to table `<?= $table ?>`. |
25 | 25 | <?= $this->render('_foreignTables', [ |
26 | - 'foreignKeys' => $foreignKeys, |
|
27 | - ]) ?> |
|
26 | + 'foreignKeys' => $foreignKeys, |
|
27 | + ]) ?> |
|
28 | 28 | */ |
29 | 29 | class <?= $className ?> extends Migration |
30 | 30 | { |
@@ -139,6 +139,6 @@ |
||
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 |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | * @var array 交易类型和Trade映射 |
61 | 61 | */ |
62 | 62 | public $tradeTypeMap = [ |
63 | - Trade::TYPE_NATIVE => 'alipay.trade.page.pay',//WEB 原生扫码支付 |
|
64 | - Trade::TYPE_JS_API => 'alipay.trade.create',//应用内JS API,如微信 |
|
65 | - Trade::TYPE_APP => 'alipay.trade.app.pay',//app支付 |
|
66 | - Trade::TYPE_H5 => 'alipay.trade.wap.pay',//H5支付 |
|
67 | - Trade::TYPE_MICROPAY => 'alipay.trade.precreate',//刷卡支付 |
|
63 | + Trade::TYPE_NATIVE => 'alipay.trade.page.pay', //WEB 原生扫码支付 |
|
64 | + Trade::TYPE_JS_API => 'alipay.trade.create', //应用内JS API,如微信 |
|
65 | + Trade::TYPE_APP => 'alipay.trade.app.pay', //app支付 |
|
66 | + Trade::TYPE_H5 => 'alipay.trade.wap.pay', //H5支付 |
|
67 | + Trade::TYPE_MICROPAY => 'alipay.trade.precreate', //刷卡支付 |
|
68 | 68 | ]; |
69 | 69 | |
70 | 70 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | protected function initApp() |
85 | 85 | { |
86 | 86 | if (empty ($this->appId) && !isset($this->payment->params['alipay.appId'])) { |
87 | - throw new InvalidConfigException ('The "appId" property must be set.'); |
|
87 | + throw new InvalidConfigException('The "appId" property must be set.'); |
|
88 | 88 | } |
89 | 89 | if (empty ($this->appId)) { |
90 | 90 | $this->appId = $this->payment->params['alipay.appId']; |
@@ -95,10 +95,10 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | if (empty ($this->privateKey)) { |
98 | - throw new InvalidConfigException ('The "privateKey" property must be set.'); |
|
98 | + throw new InvalidConfigException('The "privateKey" property must be set.'); |
|
99 | 99 | } |
100 | 100 | if (empty ($this->publicKey)) { |
101 | - throw new InvalidConfigException ('The "publicKey" property must be set.'); |
|
101 | + throw new InvalidConfigException('The "publicKey" property must be set.'); |
|
102 | 102 | } |
103 | 103 | $privateKey = "file://" . Yii::getAlias($this->privateKey); |
104 | 104 | $this->privateKey = openssl_pkey_get_private($privateKey); |
@@ -55,13 +55,13 @@ |
||
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 |
@@ -44,10 +44,10 @@ |
||
44 | 44 | { |
45 | 45 | parent::init(); |
46 | 46 | if (empty ($this->appId)) { |
47 | - throw new InvalidConfigException ('The "appId" property must be set.'); |
|
47 | + throw new InvalidConfigException('The "appId" property must be set.'); |
|
48 | 48 | } |
49 | 49 | if (empty ($this->appKey)) { |
50 | - throw new InvalidConfigException ('The "appKey" property must be set.'); |
|
50 | + throw new InvalidConfigException('The "appKey" property must be set.'); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 |