Completed
Branch master (14c121)
by Michael
03:22
created
Category
src/Provider/Poshmark/DataParser.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $crawler = new Crawler($html);
112 112
         $items = $crawler->filter('a.item');
113
-        $retItems = $items->each(static function (Crawler $node, $i) {
113
+        $retItems = $items->each(static function(Crawler $node, $i) {
114 114
             $order = new Order();
115 115
             $price = Price::fromString($node->filter('.price .value')->first()->text());
116 116
             $path = $node->attr('href');
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
         $multiItemOrder = $count > 1;
161 161
 
162 162
         $title = $multiItemOrder ?
163
-            sprintf('Order %s (%d items)', $orderId, count($items)) :
164
-            $items[0]->getTitle();
163
+            sprintf('Order %s (%d items)', $orderId, count($items)) : $items[0]->getTitle();
165 164
 
166 165
         $dateAndUser = $contentNode->filter('.order-details')->html('');
167 166
         $dateAndUser = str_replace("\n", ' ', $this->dumbHtmlTagReplacement($dateAndUser));
Please login to merge, or discard this patch.
src/Provider/Poshmark/Helper.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
 
42 42
         if (isset($itemFields['price'])) {
43 43
             $newPrice = $itemFields['price'] instanceof Price ?
44
-                $itemFields['price'] :
45
-                Price::fromString($itemFields['price']);
44
+                $itemFields['price'] : Price::fromString($itemFields['price']);
46 45
 
47 46
             $newPrice = [
48 47
                 'val' => $newPrice->getAmount(),
Please login to merge, or discard this patch.
src/Provider/Poshmark/PoshmarkService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             }
171 171
         }
172 172
 
173
-        usort($items, static function ($a, $b) {
173
+        usort($items, static function($a, $b) {
174 174
             // sort array items by their item ids
175 175
             return strcmp($a->getId(), $b->getId());
176 176
         });
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         $contentNode = $crawler->filter('.order-main-con');
356 356
         $itemNodes = $contentNode->filter('.listing-details .rw');
357 357
 
358
-        $itemUrls = $itemNodes->each(static function (Crawler $node, $i) {
358
+        $itemUrls = $itemNodes->each(static function(Crawler $node, $i) {
359 359
             return $node->filter('a')->first()->attr('href');
360 360
         });
361 361
         $items = [];
Please login to merge, or discard this patch.
anonymize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 //    $matches = [];
50 50
 //    preg_match_all('/Buyer: <span class=\\\"value\\\">([^<]+)<\/span>/i', $contents, $matches);
51 51
 //    print_r($matches);
52
-    $contents = preg_replace_callback('/Buyer: <span class=\\\"value\\\">([^<]+)<\/span>/i', static function ($matches) {
52
+    $contents = preg_replace_callback('/Buyer: <span class=\\\"value\\\">([^<]+)<\/span>/i', static function($matches) {
53 53
         return 'Buyer: <span class=\\"value\\">Shopper' . random_int(1000, 99999999) . '</span>';
54 54
     }, $contents);
55 55
 }
Please login to merge, or discard this patch.