@@ -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 |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @throws Radowoj\Yaah\Exception on failure |
| 41 | 41 | * |
| 42 | - * @param Radowoj\Yaah\Auction $auction Auction to create |
|
| 42 | + * @param Auction $auction Auction to create |
|
| 43 | 43 | * @param integer $localId - local item id, required by WebAPI |
| 44 | 44 | * @return integer id of created auction |
| 45 | 45 | */ |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | 127 | * @param integer $itemId id of auction to get |
| 128 | - * @return Radowoj\Yaah\Auction | null |
|
| 128 | + * @return Auction|null | null |
|
| 129 | 129 | */ |
| 130 | 130 | public function getAuctionByItemId($itemId) |
| 131 | 131 | { |
@@ -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); |
@@ -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(); |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | //recursive object to array :) |
| 190 | 190 | $array = json_decode(json_encode($array), true); |
| 191 | 191 | |
| 192 | - foreach($array as $key => $value) { |
|
| 192 | + foreach ($array as $key => $value) { |
|
| 193 | 193 | if (!property_exists($this, $key)) { |
| 194 | 194 | throw new Exception("Unknown Field property: {$key}"); |
| 195 | 195 | } |