Completed
Push — master ( 8cd561...ecf8e9 )
by Jim
03:41
created
tests/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 define('TEST_ROOT', __DIR__);
4 4
 
5
-require __DIR__ . '/../vendor/autoload.php';
5
+require __DIR__.'/../vendor/autoload.php';
6 6
 
7 7
 function phpunit_env($name, $default = null)
8 8
 {
9
-    return \TimSDK\Support\Arr::get(get_defined_constants(true), 'user.' . strtoupper($name), $default);
9
+    return \TimSDK\Support\Arr::get(get_defined_constants(true), 'user.'.strtoupper($name), $default);
10 10
 }
11 11
 
12
-if (! function_exists('dd')) {
12
+if (!function_exists('dd')) {
13 13
     function dd()
14 14
     {
15 15
         var_dump(func_get_args());
Please login to merge, or discard this patch.
tests/Support/ArrTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/Support/HelpersTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/TimCloudTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $t = $this->timCloud();
24 24
 
25
-        $this->assertTrue(file_exists($t['path.cert'] . '/cacert.pem'));
25
+        $this->assertTrue(file_exists($t['path.cert'].'/cacert.pem'));
26 26
     }
27 27
 
28 28
     public function testRefreshConfiguration()
Please login to merge, or discard this patch.
tests/Foundation/ApplicationTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
         $app = new Application([
23 23
             'foo' => 'bar',
24 24
         ], [
25
-            'bar' => function () {
25
+            'bar' => function() {
26 26
                 return new \stdClass();
27 27
             },
28 28
             'name' => 'TimSDK',
29 29
             'foo'  => 'Jim'
30 30
         ]);
31 31
 
32
-        $app['foo'] = function () {
32
+        $app['foo'] = function() {
33 33
             return 'bar';
34 34
         };
35 35
 
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 {
86 86
     public function register(Container $pimple)
87 87
     {
88
-        $pimple['bar'] = function () {
88
+        $pimple['bar'] = function() {
89 89
             return 'foo';
90 90
         };
91 91
 
92
-        $pimple['foo'] = function () {
92
+        $pimple['foo'] = function() {
93 93
             return new \stdClass();
94 94
         };
95 95
     }
Please login to merge, or discard this patch.
src/TimCloud.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
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
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     protected function setConfig($key, $value)
110 110
     {
111
-        if (! empty($value)) {
111
+        if (!empty($value)) {
112 112
             $oldVal = $this['config']->get($key, null);
113 113
             if ($value !== $oldVal) {
114 114
                 $this['config']->set($key, $value);
Please login to merge, or discard this patch.
src/Core/IMCloud.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         foreach (['sdkappid', 'identifier', 'prikey', 'pubkey'] 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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Core/ServiceProviders/IMCloudServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
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('sdkappid'));
35 35
             $api->setPrivateKey($app['config']->get('prikey'));
Please login to merge, or discard this patch.
src/Core/TLSSig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.