@@ -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 | } |
@@ -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() |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | public function testRequestApi() |
| 106 | 106 | { |
| 107 | 107 | $t = $this->timCloud(); |
| 108 | - $t->offsetSet('im', function () { |
|
| 108 | + $t->offsetSet('im', function() { |
|
| 109 | 109 | $m = Mockery::mock('im'); |
| 110 | 110 | $m->shouldReceive('handle')->withAnyArgs()->andReturn(new ResponseBag([ |
| 111 | 111 | 'ActionStatus' => 'OK' |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | 'private_key' => phpunit_env('private_key', 'openssl_private_key'), |
| 128 | 128 | 'public_key' => phpunit_env('public_key', 'openssl_public_key'), |
| 129 | 129 | ], [ |
| 130 | - 'TLSSig' => function () { |
|
| 130 | + 'TLSSig' => function() { |
|
| 131 | 131 | $m = Mockery::mock('TLSSig'); |
| 132 | 132 | $m->shouldReceive('genSig')->withAnyArgs()->andReturn('test usersig'); |
| 133 | 133 | return $m; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | foreach (['app_id', 'identifier', 'public_key', 'private_key'] as $item) { |
| 168 | 168 | if (!isset($data[$item])) { |
| 169 | 169 | Log::debug('IMCloud Query: ', $data); |
| 170 | - throw new MissingArgumentsException('Missing ' . $item); |
|
| 170 | + throw new MissingArgumentsException('Missing '.$item); |
|
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | */ |
| 185 | 185 | protected function getFullApiUrl($uri) |
| 186 | 186 | { |
| 187 | - return Str::startsWith($uri, ['http', 'https']) ? $uri : API::BASE_URL . $uri; |
|
| 187 | + return Str::startsWith($uri, ['http', 'https']) ? $uri : API::BASE_URL.$uri; |
|
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
@@ -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')); |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | $config = new Config($this->getConfig()); |
| 155 | 155 | |
| 156 | 156 | foreach (['app_id', '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()); |
@@ -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 | /** |