Passed
Pull Request — master (#24)
by
unknown
04:01
created
src/Models/TrackingDocument.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $answer = $this->checkTTN($ttns, $phone);
67 67
         $statuses = [];
68 68
 
69
-        if ($answer['success'] && ! empty($answer['result'])) {
69
+        if ($answer['success'] && !empty($answer['result'])) {
70 70
             foreach ($answer['result'] as $key => $status) {
71 71
                 $statuses[$key]['Number'] = $status['Number'];
72 72
                 $statuses[$key]['StatusCode'] = $status['StatusCode'];
Please login to merge, or discard this patch.
src/NovaPoshtaServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         $this->mergeConfigFrom(__DIR__.'/../config/novaposhta.php', 'novaposhta');
35 35
 
36
-        $this->app->singleton('novaposhta', function () {
36
+        $this->app->singleton('novaposhta', function() {
37 37
             return $this->app->make(NovaPoshta::class);
38 38
         });
39 39
 
Please login to merge, or discard this patch.
src/Traits/CounterpartyProperty.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getCounterpartyType()
56 56
     {
57
-        if (! $this->counterpartyType) {
57
+        if (!$this->counterpartyType) {
58 58
             $this->counterpartyType = 'PrivatePerson';
59 59
         }
60 60
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             return $this;
75 75
         }
76 76
 
77
-        if (! $this->counterpartyProperty) {
77
+        if (!$this->counterpartyProperty) {
78 78
             $this->counterpartyProperty = 'Recipient';
79 79
         }
80 80
 
Please login to merge, or discard this patch.
src/Traits/RecipientProperty.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         }
34 34
 
35 35
         //указываем строками проверяем и вставляем
36
-        if (isset($Recipient['RecipientName']) &&     //имя получателя
36
+        if (isset($Recipient['RecipientName']) && //имя получателя
37 37
             isset($Recipient['RecipientCityName']) && //город
38 38
             isset($Recipient['RecipientAddressName']) //отделение или улица
39 39
         ) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     public function getRecipientType()
71 71
     {
72
-        if (! $this->RecipientType) {
72
+        if (!$this->RecipientType) {
73 73
             $this->RecipientType = config('novaposhta.recipient_type');
74 74
         }
75 75
         $this->methodProperties['RecipientType'] = $this->RecipientType;
Please login to merge, or discard this patch.
src/Traits/InternetDocumentProperty.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function getPayerType()
35 35
     {
36
-        if (! $this->PayerType) {
36
+        if (!$this->PayerType) {
37 37
             $this->PayerType = config('novaposhta.payer_type');
38 38
         }
39 39
         $this->methodProperties['PayerType'] = $this->PayerType;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function getServiceType()
59 59
     {
60
-        if (! $this->ServiceType) {
60
+        if (!$this->ServiceType) {
61 61
             $this->ServiceType = config('novaposhta.service_type');
62 62
         }
63 63
         $this->methodProperties['ServiceType'] = $this->ServiceType;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
     public function getPaymentMethod()
83 83
     {
84
-        if (! $this->PaymentMethod) {
84
+        if (!$this->PaymentMethod) {
85 85
             $this->PaymentMethod = config('novaposhta.payment_method');
86 86
         }
87 87
         $this->methodProperties['PaymentMethod'] = $this->PaymentMethod;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
     public function getCargoType()
107 107
     {
108
-        if (! $this->CargoType) {
108
+        if (!$this->CargoType) {
109 109
             $this->CargoType = config('novaposhta.cargo_type');
110 110
         }
111 111
         $this->methodProperties['CargoType'] = $this->CargoType;
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
     public function getSeatsAmount()
148 148
     {
149
-        if (! $this->SeatsAmount) {
149
+        if (!$this->SeatsAmount) {
150 150
             $this->SeatsAmount = config('novaposhta.seats_amount');
151 151
         }
152 152
         $this->methodProperties['SeatsAmount'] = $this->SeatsAmount;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
     public function getCost()
171 171
     {
172
-        if (! $this->Cost) {
172
+        if (!$this->Cost) {
173 173
             $this->Cost = config('novaposhta.cost');
174 174
         }
175 175
         $this->methodProperties['Cost'] = $this->Cost;
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function setBackwardDeliveryData($RedeliveryString, $PayerType = null, $CargoType = null)
236 236
     {
237
-        if (! $PayerType) {
237
+        if (!$PayerType) {
238 238
             $PayerType = config('novaposhta.back_delivery_payer_type');
239 239
         }
240
-        if (! $CargoType) {
240
+        if (!$CargoType) {
241 241
             $CargoType = config('novaposhta.back_delivery_cargo_type');
242 242
         }
243 243
         $this->BackwardDeliveryData = [
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,27 +17,27 @@
 block discarded – undo
17 17
     protected $AdditionalInformation;
18 18
 
19 19
 
20
-	/**
21
-	 * @param string $Ref
22
-	 *
23
-	 * @return $this
24
-	 */
25
-	public function setRef(string $Ref)
26
-	{
27
-		$this->Ref = $Ref;
28
-
29
-		return $this;
30
-	}
31
-
32
-	public function getRef()
33
-	{
34
-		if (!$this->PayerType) {
35
-			return $this;
36
-		}
37
-		$this->methodProperties['Ref'] = $this->Ref;
38
-
39
-		return $this;
40
-	}
20
+    /**
21
+     * @param string $Ref
22
+     *
23
+     * @return $this
24
+     */
25
+    public function setRef(string $Ref)
26
+    {
27
+        $this->Ref = $Ref;
28
+
29
+        return $this;
30
+    }
31
+
32
+    public function getRef()
33
+    {
34
+        if (!$this->PayerType) {
35
+            return $this;
36
+        }
37
+        $this->methodProperties['Ref'] = $this->Ref;
38
+
39
+        return $this;
40
+    }
41 41
 
42 42
     /**
43 43
      * @param string $PayerType
Please login to merge, or discard this patch.
src/Traits/SenderProperty.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
     public function getSender()
32 32
     {
33 33
         //конструктор нельзя, потому как трейт
34
-        if (! $this->Sender) {
34
+        if (!$this->Sender) {
35 35
             $this->Sender = config('novaposhta.sender');
36 36
         }
37
-        if (! $this->CitySender) {
37
+        if (!$this->CitySender) {
38 38
             $this->CitySender = config('novaposhta.sender');
39 39
         }
40
-        if (! $this->SenderAddress) {
40
+        if (!$this->SenderAddress) {
41 41
             $this->SenderAddress = config('novaposhta.sender_address');
42 42
         }
43
-        if (! $this->ContactSender) {
43
+        if (!$this->ContactSender) {
44 44
             $this->ContactSender = config('novaposhta.contact_sender');
45 45
         }
46
-        if (! $this->SendersPhone) {
46
+        if (!$this->SendersPhone) {
47 47
             $this->SendersPhone = config('novaposhta.senders_phone');
48 48
         }
49 49
 
Please login to merge, or discard this patch.
src/Traits/OptionsSeatProperty.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function getOptionsSeat()
36 36
     {
37
-        if (! $this->OptionsSeat) {
37
+        if (!$this->OptionsSeat) {
38 38
             $this->OptionsSeat[] = config('novaposhta.options_seat')[10];
39 39
         }
40 40
         $this->methodProperties['OptionsSeat'] = $this->OptionsSeat;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     public function getWeight()
61 61
     {
62
-        if (! $this->Weight) {
62
+        if (!$this->Weight) {
63 63
             $this->Weight = config('novaposhta.weight');
64 64
         }
65 65
         $this->methodProperties['Weight'] = $this->Weight;
Please login to merge, or discard this patch.
src/Traits/DateTimes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function getDateTime()
51 51
     {
52
-        if ($this->dateTime && (! $this->dateTimeFrom || ! $this->dateTimeTo)) {
52
+        if ($this->dateTime && (!$this->dateTimeFrom || !$this->dateTimeTo)) {
53 53
             $this->methodProperties['DateTime'] = $this->dateTime;
54 54
         }
55 55
 
56
-        if (! $this->dateTime) {
56
+        if (!$this->dateTime) {
57 57
             $this->dateTime = Carbon::now()->format($this->format);
58 58
             $this->methodProperties['DateTime'] = $this->dateTime;
59 59
         }
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
     public function getDateTimeFromTo()
68 68
     {
69 69
         if ($this->dateTimeFrom || $this->dateTimeTo) {
70
-            if (! $this->dateTimeTo) {
70
+            if (!$this->dateTimeTo) {
71 71
                 $this->dateTimeTo = Carbon::now()->format($this->format);
72 72
             }
73
-            if (! $this->dateTimeFrom) {
73
+            if (!$this->dateTimeFrom) {
74 74
                 $this->dateTimeFrom = $this->dateTimeTo;
75 75
             }
76 76
 
Please login to merge, or discard this patch.
src/NovaPoshta.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function getApi()
33 33
     {
34
-        if (! $this->api) {
34
+        if (!$this->api) {
35 35
             $this->api = config('novaposhta.api_key');
36 36
         }
37 37
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             $answer = $answer[0];
95 95
         }
96 96
 
97
-        if (! isset($answer['success']) || ! isset($answer['data']) || empty($answer['data'])) {
97
+        if (!isset($answer['success']) || !isset($answer['data']) || empty($answer['data'])) {
98 98
             // что-то не так в ответе
99 99
             $info = trans('novaposhta::novaposhta.error_answer');
100 100
             $success = false;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             }
121 121
         }
122 122
 
123
-        if (! $info && isset($answer['info'])) {
123
+        if (!$info && isset($answer['info'])) {
124 124
             $info = $answer['info'];
125 125
         }
126 126
 
Please login to merge, or discard this patch.