@@ -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 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function register(Container $pimple) |
27 | 27 | { |
28 | - $pimple['logger'] = $pimple['log'] = function () { |
|
28 | + $pimple['logger'] = $pimple['log'] = function() { |
|
29 | 29 | $log = new Monolog('TimSDK'); |
30 | 30 | |
31 | 31 | if (defined('PHPUNIT_RUNNING') || 'cli' === php_sapi_name()) { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function register(Container $pimple) |
25 | 25 | { |
26 | - $pimple['config'] = $pimple[Config::class] = $pimple['config'] = function ($app) { |
|
26 | + $pimple['config'] = $pimple[Config::class] = $pimple['config'] = function($app) { |
|
27 | 27 | return new Config($app->getConfig()); |
28 | 28 | }; |
29 | 29 | } |
@@ -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 | } |
@@ -154,7 +154,7 @@ |
||
154 | 154 | $config = new Config($this->getConfig()); |
155 | 155 | |
156 | 156 | foreach (['sdkappid', 'account_type'] as $item) { |
157 | - $config->has($item) && $config->set($item, substr($config->get($item), 0, 5) . '...'); |
|
157 | + $config->has($item) && $config->set($item, substr($config->get($item), 0, 5).'...'); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | Log::debug('Current config:', $config->toArray()); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | $t = $this->timCloud(); |
26 | 26 | |
27 | - $this->assertTrue(file_exists($t['path.cert'] . '/cacert.pem')); |
|
27 | + $this->assertTrue(file_exists($t['path.cert'].'/cacert.pem')); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function testRefreshConfiguration() |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function testRequestApi() |
76 | 76 | { |
77 | 77 | $t = $this->timCloud(); |
78 | - $t->offsetSet('im', function () { |
|
78 | + $t->offsetSet('im', function() { |
|
79 | 79 | $m = Mockery::mock('im'); |
80 | 80 | $m->shouldReceive('handle')->withAnyArgs()->andReturn(new ResponseBag([ |
81 | 81 | 'ActionStatus' => 'OK' |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'prikey' => phpunit_env('private_key', 'openssl_private_key'), |
98 | 98 | 'pubkey' => phpunit_env('public_key', 'openssl_public_key'), |
99 | 99 | ], [ |
100 | - 'TLSSig' => function () { |
|
100 | + 'TLSSig' => function() { |
|
101 | 101 | $m = Mockery::mock('TLSSig'); |
102 | 102 | $m->shouldReceive('genSig')->withAnyArgs()->andReturn('test usersig'); |
103 | 103 | return $m; |