@@ -41,7 +41,7 @@ |
||
| 41 | 41 | { |
| 42 | 42 | $requiredParams = ['apiKey', 'login', 'passwordHash', 'isSandbox', 'countryCode']; |
| 43 | 43 | |
| 44 | - foreach($requiredParams as $property) { |
|
| 44 | + foreach ($requiredParams as $property) { |
|
| 45 | 45 | if (!array_key_exists($property, $params)) { |
| 46 | 46 | throw new Exception("{$property} is required in params array"); |
| 47 | 47 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -use PHPUnit\Framework\TestCase; |
|
| 3 | +use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | use Radowoj\Yaah\Field; |
| 5 | 5 | |
| 6 | 6 | class FieldTest extends TestCase |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | $fields = []; |
| 36 | 36 | |
| 37 | - foreach($this->fields as $fid => $value) { |
|
| 37 | + foreach ($this->fields as $fid => $value) { |
|
| 38 | 38 | $fields[] = (new Field($fid, $value))->toArray(); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->fields = []; |
| 52 | 52 | $this->photos = []; |
| 53 | 53 | |
| 54 | - foreach($fields as $apiField) { |
|
| 54 | + foreach ($fields as $apiField) { |
|
| 55 | 55 | $field = new Field(0, ''); |
| 56 | 56 | $field->fromArray((array)$apiField); |
| 57 | 57 | $this->fields[$field->getFid()] = $field->getValue(); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $data = $this->client->getSellFormFieldsForCategory(['categoryId' => $idCategory]); |
| 24 | 24 | $items = $data->sellFormFieldsForCategory->sellFormFieldsList->item; |
| 25 | 25 | |
| 26 | - return array_map(function ($item) { |
|
| 26 | + return array_map(function($item) { |
|
| 27 | 27 | return [ |
| 28 | 28 | 'fid' => $item->sellFormId, |
| 29 | 29 | 'title' => $item->sellFormTitle, |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function finishAuctions(array $auctionIds, $cancelAllBids = 0, $finishCancelReason = '') |
| 83 | 83 | { |
| 84 | - $finishItemsList = array_map(function ($auctionId) use ($cancelAllBids, $finishCancelReason) { |
|
| 84 | + $finishItemsList = array_map(function($auctionId) use ($cancelAllBids, $finishCancelReason) { |
|
| 85 | 85 | return [ |
| 86 | 86 | 'finishItemId' => $auctionId, |
| 87 | 87 | 'finishCancelAllBids' => $cancelAllBids, |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function getAuctionByItemId($itemId) |
| 131 | 131 | { |
| 132 | - $response = $this->client->getItemFields(['itemId' => $itemId]); |
|
| 132 | + $response = $this->client->getItemFields(['itemId' => $itemId]); |
|
| 133 | 133 | if (isset($response->itemFields->item)) { |
| 134 | 134 | $auction = new Auction(); |
| 135 | 135 | $auction->fromApiRepresentation($response->itemFields->item); |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | ['fvalueRangeFloatMin', 'fvalueRangeFloatMax'], |
| 168 | 168 | $range |
| 169 | 169 | ); |
| 170 | - } elseif($this->isRangeInt($range)) { |
|
| 170 | + } elseif ($this->isRangeInt($range)) { |
|
| 171 | 171 | $this->fvalueRangeInt = array_combine( |
| 172 | 172 | ['fvalueRangeIntMin', 'fvalueRangeIntMax'], |
| 173 | 173 | $range |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | //recursive object to array :) |
| 241 | 241 | $array = json_decode(json_encode($array), true); |
| 242 | 242 | |
| 243 | - foreach($array as $key => $value) { |
|
| 243 | + foreach ($array as $key => $value) { |
|
| 244 | 244 | if (!property_exists($this, $key)) { |
| 245 | 245 | throw new Exception("Unknown Field property: {$key}"); |
| 246 | 246 | } |