Test Failed
Push — master ( b17341...b0168b )
by Yuji
11:48 queued 04:05
created
src/YahooShoppingJp/Api/GetItemStockInfoApi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function distillResponse(array $response): array
30 30
     {
31
-        if(! isset($response['Result'])) {
31
+        if (!isset($response['Result'])) {
32 32
             throw new DistillationException;
33 33
         }
34 34
 
Please login to merge, or discard this patch.
src/YahooShoppingJp/Request/AbstractRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * @throws InvalidRequestException
44 44
      */
45 45
     public function requires($paramKey) {
46
-        if (! isset($this->params[$paramKey])) {
46
+        if (!isset($this->params[$paramKey])) {
47 47
             throw new InvalidRequestException($paramKey.' is required');
48 48
         }
49 49
     }
Please login to merge, or discard this patch.
src/YahooShoppingJp/Api/UpdateItemStockInfoApi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function distillResponse(array $response): array
31 31
     {
32
-        if (! isset($response['@attributes']['totalResultsAvailable'])) {
32
+        if (!isset($response['@attributes']['totalResultsAvailable'])) {
33 33
             throw new ApiException('予期しないエラー');
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/YahooShoppingJp/Request/UpdateOrderShippingStatusRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
             throw new LogicException('ShipUrl is already set.');
206 206
         }
207 207
 
208
-        $this->params['Order']['Ship']['ShipUrl'] = '![CDATA[' . $shipUrl . ']]';
208
+        $this->params['Order']['Ship']['ShipUrl'] = '![CDATA['.$shipUrl.']]';
209 209
 
210 210
         return $this;
211 211
     }
Please login to merge, or discard this patch.
src/YahooShoppingJp/Request/UpdateItemStockInfoRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             if (!preg_match('/^[a-zA-Z0-9\-]{1,99}$/', $subCode)) {
86 86
                 throw new InvalidRequestException('sub_code error.');
87 87
             }
88
-            $this->params['item_code'] = $this->params['item_code'] . ':' . $subCode;
88
+            $this->params['item_code'] = $this->params['item_code'].':'.$subCode;
89 89
         }
90 90
 
91 91
         return $this;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             throw new LogicException('allow_overdraft is already set.');
122 122
         }
123 123
 
124
-        $this->params['allow_overdraft'] = (int)$allowOverdraft;
124
+        $this->params['allow_overdraft'] = (int) $allowOverdraft;
125 125
 
126 126
         return $this;
127 127
     }
Please login to merge, or discard this patch.
src/YahooShoppingJp/Request/GetItemStockInfoRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@
 block discarded – undo
33 33
      */
34 34
     protected function validateParams(): void
35 35
     {
36
-        if (! isset($this->params['seller_id'])) {
36
+        if (!isset($this->params['seller_id'])) {
37 37
             throw new InvalidRequestException('seller_id is not set.');
38 38
         }
39 39
 
40
-        if (! isset($this->params['itemCodeList'])
40
+        if (!isset($this->params['itemCodeList'])
41 41
             ||  !is_array($this->params['itemCodeList'])
42 42
             || count($this->params['itemCodeList']) == 0) {
43 43
             throw new InvalidRequestException('item_code is not set.');
Please login to merge, or discard this patch.
src/YahooShoppingJp/Request/SearchOrdersRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
             throw new InvalidRequestException;
125 125
         }
126 126
 
127
-        if(!isset($this->params['Search']['Condition']['OrderId'])
127
+        if (!isset($this->params['Search']['Condition']['OrderId'])
128 128
             && !isset($this->params['Search']['Condition']['OrderTime'])
129 129
             && !isset($this->params['Search']['Condition']['OrderTimeFrom'])
130 130
             && !isset($this->params['Search']['Condition']['OrderTimeTo'])) {
Please login to merge, or discard this patch.
src/YahooShoppingJp/Api/SearchOrdersApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
      */
28 28
     public function distillResponse(array $response): array
29 29
     {
30
-        if(! isset($response['Search']['OrderInfo'])) {
30
+        if (!isset($response['Search']['OrderInfo'])) {
31 31
             return [];
32 32
         }
33 33
 
34 34
 //        dd(array_keys($response['Search']['OrderInfo']));
35
-        if(0 !== array_keys($response['Search']['OrderInfo'])[0]){
35
+        if (0 !== array_keys($response['Search']['OrderInfo'])[0]) {
36 36
             return [$response['Search']['OrderInfo']];
37 37
         }
38 38
 
Please login to merge, or discard this patch.
YahooClientTest2.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //kanazawa test
3 3
 
4
-require_once __DIR__ . '/vendor/autoload.php';
4
+require_once __DIR__.'/vendor/autoload.php';
5 5
 
6 6
 use Shippinno\YahooShoppingJp\Client;
7 7
 use Shippinno\YahooShoppingJp\Enum\OrderStatus;
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
 
13 13
 define('YAHOO_APP_ID', 'dj0zaiZpPUZFNTFuUUQ3Q2piSSZzPWNvbnN1bWVyc2VjcmV0Jng9MWY-');
14 14
 define('YAHOO_SECRET', 'a71d10c84a7826c7f98aae379f4d33607dff4a87');
15
-$seller_id    = 'snbx-nxpqe5hm3';
15
+$seller_id = 'snbx-nxpqe5hm3';
16 16
 
17 17
 
18 18
 $client = new Client(
19 19
     file_get_contents(__DIR__.'/access_token.txt'),
20
-    null,null,true
20
+    null, null, true
21 21
 );
22 22
 
23
-try{
23
+try {
24 24
     /*
25 25
      * UpdateOrderShippingStatusRequest
26 26
      */
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     echo "レスポンス\n";
57 57
     var_dump($response);
58 58
 
59
-}catch (Exception $e){
59
+} catch (Exception $e) {
60 60
     echo $e;
61 61
 }
62 62
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     echo "レスポンス\n";
57 57
     var_dump($response);
58 58
 
59
-}catch (Exception $e){
59
+} catch (Exception $e){
60 60
     echo $e;
61 61
 }
62 62
 
Please login to merge, or discard this patch.