Passed
Push — master ( d070fe...57713c )
by Radosław
02:55
created
src/Journal/Deal.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Radowoj\Yaah\Journal;
4 4
 
5
-use stdClass;
5
+use stdClass;
6 6
 use InvalidArgumentException;
7 7
 
8 8
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      */
73 73
     protected function mapFromObject(stdClass $deal)
74 74
     {
75
-        foreach($deal as $prop => $value) {
75
+        foreach ($deal as $prop => $value) {
76 76
             $this->setProperty($prop, $value);
77 77
         }
78 78
     }
Please login to merge, or discard this patch.
tests/Journal/DealTest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@
 block discarded – undo
7 7
 
8 8
 class DealTest extends TestCase
9 9
 {
10
+    /**
11
+     * @return \stdClass
12
+     */
10 13
     protected function getExampleDeal()
11 14
     {
12 15
         return (object)[
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Radowoj\Yaah\Journal;
4 4
 
5 5
 use PHPUnit\Framework\TestCase;
6
-use Radowoj\Yaah\Auction;
7 6
 
8 7
 class DealTest extends TestCase
9 8
 {
Please login to merge, or discard this patch.
src/Helper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $items = $data->sellFormFieldsForCategory->sellFormFieldsList->item;
31 31
 
32
-        return array_map(function ($item) {
32
+        return array_map(function($item) {
33 33
             return [
34 34
                 'fid' => $item->sellFormId,
35 35
                 'title' => $item->sellFormTitle,
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function finishAuctions(array $auctionIds, $cancelAllBids = 0, $finishCancelReason = '')
89 89
     {
90
-        $finishItemsList = array_map(function ($auctionId) use ($cancelAllBids, $finishCancelReason) {
90
+        $finishItemsList = array_map(function($auctionId) use ($cancelAllBids, $finishCancelReason) {
91 91
             return [
92 92
                 'finishItemId' => $auctionId,
93 93
                 'finishCancelAllBids' => $cancelAllBids,
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         $response = $this->client->doGetSiteJournalDeals(['journalStart' => $journalStart]);
124 124
         if (isset($response->siteJournalDeals->item)) {
125
-            return array_map(function($deal){
125
+            return array_map(function($deal) {
126 126
                 return new Deal($deal);
127 127
             }, $response->siteJournalDeals->item);
128 128
         }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public function getAuctionByItemId($itemId)
139 139
     {
140
-        $response =  $this->client->doGetItemFields(['itemId' => $itemId]);
140
+        $response = $this->client->doGetItemFields(['itemId' => $itemId]);
141 141
         if (isset($response->itemFields->item)) {
142 142
             $auction = new Auction();
143 143
             $auction->fromApiRepresentation($response->itemFields->item);
Please login to merge, or discard this patch.
examples/GetJournal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      * Process journal entries - in this case echo details of every journal
16 16
      * item that creates a deal
17 17
      */
18
-    array_map(function($deal){
18
+    array_map(function($deal) {
19 19
         if ($deal->isTypeCreateDeal()) {
20 20
             echo "Deal {$deal->getId()} (itemId {$deal->getItemId()} - quantity {$deal->getQuantity()}) created at {$deal->getEventTime()}\n";
21 21
         }
Please login to merge, or discard this patch.