@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | $nonceStr = $this->getNonceStr(); |
60 | 60 | $timeStamp = time(); |
61 | - $plain = 'jsapi_ticket=' . $this->getTicket() . '&noncestr=' . $nonceStr . '×tamp=' . $timeStamp . '&url=' . $url; |
|
61 | + $plain = 'jsapi_ticket='.$this->getTicket().'&noncestr='.$nonceStr.'×tamp='.$timeStamp.'&url='.$url; |
|
62 | 62 | $signature = sha1($plain); |
63 | 63 | return [ |
64 | 64 | 'agentId' => $this->app['config']->get('agent_id'), |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | * |
86 | 86 | * @return string |
87 | 87 | */ |
88 | - protected function getNonceStr($length=16) |
|
88 | + protected function getNonceStr($length = 16) |
|
89 | 89 | { |
90 | 90 | $strs = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm"; |
91 | - return substr(str_shuffle($strs), mt_rand(0, strlen($strs)-11), $length); |
|
91 | + return substr(str_shuffle($strs), mt_rand(0, strlen($strs) - 11), $length); |
|
92 | 92 | } |
93 | 93 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function register(Container $pimple) |
27 | 27 | { |
28 | - $pimple['h5app'] = function ($app) { |
|
28 | + $pimple['h5app'] = function($app) { |
|
29 | 29 | return new Client($app); |
30 | 30 | }; |
31 | 31 | } |