@@ -89,7 +89,7 @@ |
||
89 | 89 | $array = ['products' => ['desk' => ['price' => 100]]]; |
90 | 90 | $value = Arr::get($array, 'products.desk'); |
91 | 91 | $this->assertEquals(['price' => 100], $value); |
92 | - $this->assertEquals('test', Arr::get($array, 'foo.bar', function () { |
|
92 | + $this->assertEquals('test', Arr::get($array, 'foo.bar', function() { |
|
93 | 93 | return 'test'; |
94 | 94 | })); |
95 | 95 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public function testValue() |
18 | 18 | { |
19 | 19 | $this->assertEquals('foo', timsdk_value('foo')); |
20 | - $this->assertEquals('foo', timsdk_value(function () { |
|
20 | + $this->assertEquals('foo', timsdk_value(function() { |
|
21 | 21 | return 'foo'; |
22 | 22 | })); |
23 | 23 | } |
@@ -110,7 +110,7 @@ |
||
110 | 110 | $content = ''; |
111 | 111 | foreach ($members as $member) { |
112 | 112 | if (!isset($json[$member])) { |
113 | - throw new OpensslException('json need ' . $member); |
|
113 | + throw new OpensslException('json need '.$member); |
|
114 | 114 | } |
115 | 115 | $content .= "{$member}:{$json[$member]}\n"; |
116 | 116 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | private function __construct() |
26 | 26 | { |
27 | - throw new NotInstantiableException(__CLASS__ . ' can not instantiate.'); |
|
27 | + throw new NotInstantiableException(__CLASS__.' can not instantiate.'); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | $keys = (array) $keys; |
135 | 135 | |
136 | - if (! $array) { |
|
136 | + if (!$array) { |
|
137 | 137 | return false; |
138 | 138 | } |
139 | 139 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $part = array_shift($parts); |
176 | 176 | |
177 | 177 | if (!static::exists($array, $part)) { |
178 | - return ; |
|
178 | + return; |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | if (is_array($array[$part])) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $json = \json_encode($value, $options, $depth); |
27 | 27 | if (JSON_ERROR_NONE !== json_last_error()) { |
28 | 28 | throw new JsonParseException( |
29 | - 'json_encode error: ' . json_last_error_msg(), |
|
29 | + 'json_encode error: '.json_last_error_msg(), |
|
30 | 30 | json_last_error() |
31 | 31 | ); |
32 | 32 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $data = \json_decode($json, $assoc, $depth, $options); |
51 | 51 | if (JSON_ERROR_NONE !== json_last_error()) { |
52 | 52 | throw new JsonParseException( |
53 | - 'json_decode error: ' . json_last_error_msg(), |
|
53 | + 'json_decode error: '.json_last_error_msg(), |
|
54 | 54 | json_last_error() |
55 | 55 | ); |
56 | 56 | } |
@@ -24,9 +24,9 @@ |
||
24 | 24 | */ |
25 | 25 | public function register(Container $pimple) |
26 | 26 | { |
27 | - $pimple['httpClient'] = $pimple[Client::class] = function ($app) { |
|
27 | + $pimple['httpClient'] = $pimple[Client::class] = function($app) { |
|
28 | 28 | return new Client(array_merge($app['config']->get('http', []), [ |
29 | - 'verify' => realpath($app['path.cert'] . '/cacert.pem') |
|
29 | + 'verify' => realpath($app['path.cert'].'/cacert.pem') |
|
30 | 30 | ])); |
31 | 31 | }; |
32 | 32 | } |
@@ -25,11 +25,11 @@ |
||
25 | 25 | */ |
26 | 26 | public function register(Container $pimple) |
27 | 27 | { |
28 | - $pimple[IMCloud::class] = $pimple['im'] = function ($app) { |
|
28 | + $pimple[IMCloud::class] = $pimple['im'] = function($app) { |
|
29 | 29 | return new IMCloud($app); |
30 | 30 | }; |
31 | 31 | |
32 | - $pimple[TLSSig::class] = $pimple['TLSSig'] = function ($app) { |
|
32 | + $pimple[TLSSig::class] = $pimple['TLSSig'] = function($app) { |
|
33 | 33 | $api = new TLSSig(); |
34 | 34 | $api->setAppid($app['config']->get('app_id')); |
35 | 35 | $api->setPrivateKey($app['config']->get('private_key')); |
@@ -88,9 +88,9 @@ |
||
88 | 88 | return $key; |
89 | 89 | } |
90 | 90 | |
91 | - return "-----BEGIN $keyType KEY-----" . PHP_EOL . |
|
92 | - wordwrap(str_replace(["\r", "\n"], '', $key), 64, PHP_EOL, true) . |
|
93 | - PHP_EOL . "-----END $keyType KEY-----"; |
|
91 | + return "-----BEGIN $keyType KEY-----".PHP_EOL. |
|
92 | + wordwrap(str_replace(["\r", "\n"], '', $key), 64, PHP_EOL, true). |
|
93 | + PHP_EOL."-----END $keyType KEY-----"; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |