@@ -4,11 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | require_once 'config.php'; |
| 6 | 6 | |
| 7 | -use Radowoj\Yaah\Config; |
|
| 8 | -use Radowoj\Yaah\Client; |
|
| 9 | -use Radowoj\Yaah\Auction; |
|
| 10 | -use Radowoj\Yaah\Constants\AuctionTimespans; |
|
| 11 | -use Radowoj\Yaah\Constants\AuctionFids; |
|
| 7 | +use Radowoj\Yaah\Config; |
|
| 8 | +use Radowoj\Yaah\Client; |
|
| 9 | +use Radowoj\Yaah\Auction; |
|
| 10 | +use Radowoj\Yaah\Constants\AuctionTimespans; |
|
| 11 | +use Radowoj\Yaah\Constants\AuctionFids; |
|
| 12 | 12 | use Radowoj\Yaah\AuctionHelper; |
| 13 | 13 | |
| 14 | 14 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $data = $this->client->getSellFormFieldsForCategory(['categoryId' => $idCategory]); |
| 18 | 18 | $items = $data->sellFormFieldsForCategory->sellFormFieldsList->item; |
| 19 | 19 | |
| 20 | - return array_map(function ($item) { |
|
| 20 | + return array_map(function($item) { |
|
| 21 | 21 | return [ |
| 22 | 22 | 'fid' => $item->sellFormId, |
| 23 | 23 | 'title' => $item->sellFormTitle, |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | public function finishAuctions(array $auctionIds, $cancelAllBids = 0, $finishCancelReason = '') |
| 52 | 52 | { |
| 53 | - $finishItemsList = array_map(function ($auctionId) use ($cancelAllBids, $finishCancelReason) { |
|
| 53 | + $finishItemsList = array_map(function($auctionId) use ($cancelAllBids, $finishCancelReason) { |
|
| 54 | 54 | return [ |
| 55 | 55 | 'finishItemId' => $auctionId, |
| 56 | 56 | 'finishCancelAllBids' => $cancelAllBids, |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | throw new Exception("Invalid WebAPI doQueryAllSysStatus() response: " . print_r($response, 1)); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - $responseFiltered = array_filter($response->sysCountryStatus->item, function ($item) { |
|
| 45 | + $responseFiltered = array_filter($response->sysCountryStatus->item, function($item) { |
|
| 46 | 46 | return ($item->countryId == $this->config->getCountryCode()); |
| 47 | 47 | }); |
| 48 | 48 | |
@@ -3,18 +3,18 @@ |
||
| 3 | 3 | class Config |
| 4 | 4 | { |
| 5 | 5 | /** |
| 6 | - * @var string Allegro WebAPI key |
|
| 7 | - */ |
|
| 6 | + * @var string Allegro WebAPI key |
|
| 7 | + */ |
|
| 8 | 8 | protected $apiKey = null; |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | - * @var string Allegro login |
|
| 12 | - */ |
|
| 11 | + * @var string Allegro login |
|
| 12 | + */ |
|
| 13 | 13 | protected $login = null; |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | - * @var string Allegro password hash (base64 of sha-256 of plaintext password) |
|
| 17 | - */ |
|
| 16 | + * @var string Allegro password hash (base64 of sha-256 of plaintext password) |
|
| 17 | + */ |
|
| 18 | 18 | protected $passwordHash = null; |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -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 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | { |
| 44 | 44 | $fields = []; |
| 45 | 45 | |
| 46 | - foreach($this->fields as $fid => $value) { |
|
| 46 | + foreach ($this->fields as $fid => $value) { |
|
| 47 | 47 | $fields[] = (new Field($fid, $value))->toArray(); |
| 48 | 48 | } |
| 49 | 49 | |