@@ -43,14 +43,14 @@ |
||
| 43 | 43 | public function getSchema() |
| 44 | 44 | { |
| 45 | 45 | return [ |
| 46 | - 'city' => 'string', |
|
| 47 | - 'complement' => 'string', |
|
| 48 | - 'neighborhood' => 'string', |
|
| 49 | - 'number' => 'string', |
|
| 50 | - 'postalCode' => 'string', |
|
| 51 | - 'reference' => 'string', |
|
| 52 | - 'state' => 'string', |
|
| 53 | - 'street' => 'string', |
|
| 46 | + 'city' => 'string', |
|
| 47 | + 'complement' => 'string', |
|
| 48 | + 'neighborhood' => 'string', |
|
| 49 | + 'number' => 'string', |
|
| 50 | + 'postalCode' => 'string', |
|
| 51 | + 'reference' => 'string', |
|
| 52 | + 'state' => 'string', |
|
| 53 | + 'street' => 'string', |
|
| 54 | 54 | ]; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -51,17 +51,17 @@ |
||
| 51 | 51 | public function getSchema() |
| 52 | 52 | { |
| 53 | 53 | return [ |
| 54 | - 'shippingCode' => 'integer', |
|
| 55 | - 'customer' => 'object', |
|
| 56 | - 'freightAmount' => 'number', |
|
| 57 | - 'invoice' => 'object', |
|
| 58 | - 'items' => 'object', |
|
| 59 | - 'sender' => 'object', |
|
| 60 | - 'status' => 'string', |
|
| 61 | - 'transport' => 'object', |
|
| 62 | - 'country' => 'string', |
|
| 63 | - 'cancellationReason' => 'string', |
|
| 64 | - 'devolutionItems' => 'object', |
|
| 54 | + 'shippingCode' => 'integer', |
|
| 55 | + 'customer' => 'object', |
|
| 56 | + 'freightAmount' => 'number', |
|
| 57 | + 'invoice' => 'object', |
|
| 58 | + 'items' => 'object', |
|
| 59 | + 'sender' => 'object', |
|
| 60 | + 'status' => 'string', |
|
| 61 | + 'transport' => 'object', |
|
| 62 | + 'country' => 'string', |
|
| 63 | + 'cancellationReason' => 'string', |
|
| 64 | + 'devolutionItems' => 'object', |
|
| 65 | 65 | ]; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | { |
| 76 | 76 | parent::update($entity, $existent); |
| 77 | 77 | |
| 78 | - $factory204 = function ($message) { |
|
| 78 | + $factory204 = function($message) { |
|
| 79 | 79 | return new Response([ |
| 80 | 80 | 'raw' => '{"message":"'.$message.'"}', |
| 81 | 81 | 'httpStatusCode' => 204, |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $current = $schedule; |
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | - $convert = function ($int) { |
|
| 47 | + $convert = function($int) { |
|
| 48 | 48 | return date('d-m-Y', ($int / 1000)); |
| 49 | 49 | }; |
| 50 | 50 | $current->setDateInit($convert($schedule->getDateInit())); |
@@ -46,11 +46,11 @@ |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $array = [ |
| 49 | - 'productId' => $foreign->get('productId'), |
|
| 50 | - 'department' => $foreign->get('department'), |
|
| 51 | - 'productType' => $foreign->get('productType'), |
|
| 52 | - 'brand' => $foreign->get('brand'), |
|
| 53 | - 'skus' => $skusList, |
|
| 49 | + 'productId' => $foreign->get('productId'), |
|
| 50 | + 'department' => $foreign->get('department'), |
|
| 51 | + 'productType' => $foreign->get('productType'), |
|
| 52 | + 'brand' => $foreign->get('brand'), |
|
| 53 | + 'skus' => $skusList, |
|
| 54 | 54 | ]; |
| 55 | 55 | |
| 56 | 56 | return $array; |
@@ -14,14 +14,14 @@ |
||
| 14 | 14 | |
| 15 | 15 | $skusList = []; |
| 16 | 16 | |
| 17 | -$a = function ($key, $array) { |
|
| 17 | +$a = function($key, $array) { |
|
| 18 | 18 | if (array_key_exists($key, (array) $array)) { |
| 19 | 19 | return $array[$key]; |
| 20 | 20 | } |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | 23 | foreach ((array) $foreign->get('skus') as $sku) { |
| 24 | - $f = function ($key) use ($a, $sku) { |
|
| 24 | + $f = function($key) use ($a, $sku) { |
|
| 25 | 25 | return $a($key, $sku); |
| 26 | 26 | }; |
| 27 | 27 | $skusList[] = [ |
@@ -41,10 +41,10 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return [ |
| 44 | - 'productId' => $native->getId(), |
|
| 45 | - 'productType' => $native->getProductType(), |
|
| 46 | - 'department' => $native->getDepartment(), |
|
| 47 | - 'category' => '', |
|
| 48 | - 'brand' => $native->getBrand(), |
|
| 49 | - 'skus' => $skusList, |
|
| 44 | + 'productId' => $native->getId(), |
|
| 45 | + 'productType' => $native->getProductType(), |
|
| 46 | + 'department' => $native->getDepartment(), |
|
| 47 | + 'category' => '', |
|
| 48 | + 'brand' => $native->getBrand(), |
|
| 49 | + 'skus' => $skusList, |
|
| 50 | 50 | ]; |
@@ -154,7 +154,7 @@ |
||
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | $sm = $this->skuManager(); |
| 157 | - $product->getSkus()->forAll(function ($key, $element) use ($sm) { |
|
| 157 | + $product->getSkus()->forAll(function($key, $element) use ($sm) { |
|
| 158 | 158 | $sm->hydrate($element); |
| 159 | 159 | }); |
| 160 | 160 | |