@@ -44,8 +44,8 @@ |
||
44 | 44 | |
45 | 45 | $item->productType = $raw['productType']; |
46 | 46 | $item->title = $raw['title']; |
47 | - $item->price = (float)$raw['price']; |
|
48 | - $item->sellingPrice = (float)$raw['sellingPrice']; |
|
47 | + $item->price = (float) $raw['price']; |
|
48 | + $item->sellingPrice = (float) $raw['sellingPrice']; |
|
49 | 49 | |
50 | 50 | return $item; |
51 | 51 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | static function fromArray($raw) |
42 | 42 | { |
43 | - if(!$raw){ |
|
43 | + if (!$raw) { |
|
44 | 44 | return null; |
45 | 45 | } |
46 | 46 |
@@ -43,12 +43,12 @@ |
||
43 | 43 | { |
44 | 44 | $item = new self; |
45 | 45 | |
46 | - $item->page = (int)$raw['pagination']['page']; |
|
47 | - $item->perPage = (int)$raw['pagination']['perPage']; |
|
48 | - $item->totalPages = (int)$raw['pagination']['totalPages']; |
|
49 | - $item->total = (int)$raw['pagination']['total']; |
|
46 | + $item->page = (int) $raw['pagination']['page']; |
|
47 | + $item->perPage = (int) $raw['pagination']['perPage']; |
|
48 | + $item->totalPages = (int) $raw['pagination']['totalPages']; |
|
49 | + $item->total = (int) $raw['pagination']['total']; |
|
50 | 50 | |
51 | - $item->items = array_map(function ($v) { |
|
51 | + $item->items = array_map(function($v) { |
|
52 | 52 | return ArtworkItem::fromArray($v); |
53 | 53 | }, $raw['artworks']); |
54 | 54 |
@@ -95,8 +95,8 @@ discard block |
||
95 | 95 | |
96 | 96 | $item->artworkId = $raw['artworkId']; |
97 | 97 | $item->name = $raw['name']; |
98 | - $item->isPublic = (bool)$raw['isPublic']; |
|
99 | - $item->isProcessing = (bool)$raw['isProcessing']; |
|
98 | + $item->isPublic = (bool) $raw['isPublic']; |
|
99 | + $item->isProcessing = (bool) $raw['isProcessing']; |
|
100 | 100 | if (isset($raw['description'])) { |
101 | 101 | $item->description = $raw['description']; |
102 | 102 | } |
@@ -109,18 +109,18 @@ discard block |
||
109 | 109 | $item->mainArtworkFile = ArtworkFileItem::fromArray($raw['mainArtworkFile']); |
110 | 110 | |
111 | 111 | if (isset($raw['artworkFiles'])) { |
112 | - $item->artworkFiles = array_map(function ($v) { |
|
112 | + $item->artworkFiles = array_map(function($v) { |
|
113 | 113 | return ArtworkFileItem::fromArray($v); |
114 | 114 | }, $raw['artworkFiles']); |
115 | 115 | } |
116 | 116 | |
117 | 117 | if (isset($raw['artworkProducts'])) { |
118 | - $item->artworkProducts = array_map(function ($v) { |
|
118 | + $item->artworkProducts = array_map(function($v) { |
|
119 | 119 | return ArtworkProductItem::fromArray($v); |
120 | 120 | }, $raw['artworkProducts']); |
121 | 121 | } |
122 | 122 | |
123 | - $item->createdAt = (int)$raw['createdAt']; |
|
123 | + $item->createdAt = (int) $raw['createdAt']; |
|
124 | 124 | |
125 | 125 | return $item; |
126 | 126 | } |