Passed
Pull Request — master (#4)
by Raúl
02:04
created

notifyController   B

Complexity

Total Complexity 52

Size/Duplication

Total Lines 430
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 168
dl 0
loc 430
rs 7.44
c 1
b 0
f 0
wmc 52

25 Methods

Rating   Name   Duplication   Size   Complexity  
A getPagantisOrder() 0 9 2
A unblockConcurrency() 0 12 4
A getPagantisOrderId() 0 10 3
A checkOrderStatus() 0 14 4
A confirmPagantisOrder() 0 10 2
A validateAmount() 0 7 2
A checkConcurrencyTable() 0 11 2
A checkMerchantOrderStatus() 0 6 2
A getMerchantOrder() 0 6 2
A getQuoteId() 0 4 2
A rollbackMerchantOrder() 0 8 1
A confirmInformation() 0 24 3
A getOrigin() 0 3 1
A checkConcurrency() 0 6 1
A setOrderStatus() 0 3 1
A updateBdInfo() 0 14 1
A blockConcurrency() 0 16 3
A getOrderStatus() 0 3 1
A setOscommerceOrderId() 0 3 1
A setOrigin() 0 3 1
A checkPagantisStatus() 0 19 5
A getOscommerceOrderId() 0 3 1
A findOscommerceOrderId() 0 8 1
A insertLog() 0 8 2
A processInformation() 0 30 4

How to fix   Complexity   

Complex Class

Complex classes like notifyController often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use notifyController, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
use Pagantis\OrdersApiClient\Client;
4
use Pagantis\ModuleUtils\Exception\AlreadyProcessedException;
5
use Pagantis\ModuleUtils\Exception\AmountMismatchException;
6
use Pagantis\ModuleUtils\Exception\MerchantOrderNotFoundException;
7
use Pagantis\ModuleUtils\Exception\NoIdentificationException;
8
use Pagantis\ModuleUtils\Exception\OrderNotFoundException;
9
use Pagantis\ModuleUtils\Exception\QuoteNotFoundException;
10
use Pagantis\ModuleUtils\Exception\UnknownException;
11
use Pagantis\ModuleUtils\Exception\WrongStatusException;
12
use Pagantis\ModuleUtils\Model\Response\JsonSuccessResponse;
13
use Pagantis\ModuleUtils\Model\Response\JsonExceptionResponse;
14
use Pagantis\ModuleUtils\Exception\ConcurrencyException;
15
use Pagantis\ModuleUtils\Model\Log\LogEntry;
16
17
18
define('TABLE_PAGANTIS_LOG', 'pagantis_log');
19
define('TABLE_PAGANTIS_CONFIG', 'pagantis_config');
20
define('TABLE_PAGANTIS_ORDERS', 'pagantis_order');
21
define('TABLE_PAGANTIS_CONCURRENCY', 'pagantis_concurrency');
22
23
class notifyController
24
{
25
    /** @var mixed $pagantisOrder */
26
    protected $pagantisOrder;
27
28
    /** @var $string $origin */
0 ignored issues
show
Documentation Bug introduced by
The doc comment $string at position 0 could not be parsed: Unknown type name '$string' at position 0 in $string.
Loading history...
29
    public $origin;
30
31
    /** @var $string */
0 ignored issues
show
Documentation Bug introduced by
The doc comment $string at position 0 could not be parsed: Unknown type name '$string' at position 0 in $string.
Loading history...
32
    public $order;
33
34
    /** @var mixed $oscommerceOrderId */
35
    protected $oscommerceOrderId = '';
36
37
    /** @var mixed $cfg */
38
    protected $cfg;
39
40
    /** @var Client $orderClient */
41
    protected $orderClient;
42
43
    /** @var Order $oscommerceOrder */
0 ignored issues
show
Bug introduced by
The type Order was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
44
    protected $oscommerceOrder;
45
46
    /** @var mixed $pagantisOrderId */
47
    protected $pagantisOrderId = '';
48
49
    /**
50
     * Validation vs PagantisClient
51
     *
52
     * @return array|Array_
0 ignored issues
show
Bug introduced by
The type Array_ was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
53
     * @throws Exception
54
     */
55
    public function processInformation()
56
    {
57
        require_once('vendor/autoload.php');
58
        try {
59
            $this->checkConcurrency();
60
            $this->getMerchantOrder();
61
            $this->getPagantisOrderId();
62
            $this->getPagantisOrder();
63
            $this->checkOrderStatus();
64
            $this->checkMerchantOrderStatus();
65
            $this->validateAmount();
66
            //$this->processMerchantOrder(); //ESTE PASO SE HACE EN EL CHECKOUT_PROCESS
67
        } catch (\Exception $exception) {
68
            $this->unblockConcurrency($this->oscommerceOrderId);
69
            $jsonResponse = new JsonExceptionResponse();
70
            $jsonResponse->setMerchantOrderId($this->merchantOrderId);
71
            $jsonResponse->setPagantisOrderId($this->pagantisOrderId);
72
            $jsonResponse->setException($exception);
73
            $this->insertLog($exception);
74
            $shippingUrl = trim(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL', false));
0 ignored issues
show
Bug introduced by
The function tep_href_link was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

74
            $shippingUrl = trim(/** @scrutinizer ignore-call */ tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL', false));
Loading history...
Bug introduced by
The constant FILENAME_CHECKOUT_SHIPPING was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
75
76
            if ($this->origin == 'notify') {
77
                $jsonResponse->printResponse();
78
            } else {
79
                if ($exception->getMessage() == AlreadyProcessedException::ERROR_MESSAGE) {
80
                    return;
81
                }
82
83
                header("Location: $shippingUrl");
84
                exit;
85
            }
86
        }
87
    }
88
89
    public function confirmInformation()
90
    {
91
        try {
92
            $this->confirmPagantisOrder();
93
            $this->updateBdInfo();
94
            $jsonResponse = new JsonSuccessResponse();
95
            $jsonResponse->setMerchantOrderId($this->merchantOrderId);
96
            $jsonResponse->setPagantisOrderId($this->pagantisOrderId);
97
            $this->unblockConcurrency($this->oscommerceOrderId);
98
        } catch (\Exception $exception) {
99
            $this->rollbackMerchantOrder();
100
            $this->unblockConcurrency($this->oscommerceOrderId);
101
            $jsonResponse = new JsonExceptionResponse();
102
            $jsonResponse->setMerchantOrderId($this->merchantOrderId);
103
            $jsonResponse->setPagantisOrderId($this->pagantisOrderId);
104
            $jsonResponse->setException($exception);
105
            $jsonResponse->toJson();
106
            $this->insertLog($exception);
107
        }
108
109
        if ($this->origin == 'notify') {
110
            $jsonResponse->printResponse();
111
        } else {
112
            return $jsonResponse;
113
        }
114
    }
115
116
    /**
117
     * COMMON FUNCTIONS
118
     */
119
120
    /**
121
     * @throws Exception
122
     */
123
    private function checkConcurrency()
124
    {
125
        $this->getQuoteId();
126
        $this->checkConcurrencyTable();
127
        $this->unblockConcurrency();
128
        $this->blockConcurrency();
129
    }
130
131
    /**
132
     * @throws MerchantOrderNotFoundException
133
     */
134
    private function getMerchantOrder()
135
    {
136
        global $order;
137
        $this->oscommerceOrder = $order;
138
        if (!isset($order->info)) {
139
            throw new MerchantOrderNotFoundException();
140
        }
141
    }
142
143
    /**
144
     * @throws NoIdentificationException
145
     */
146
    private function getPagantisOrderId()
147
    {
148
        $query = "select pagantis_order_id from ".TABLE_PAGANTIS_ORDERS." where os_order_reference='".$this->oscommerceOrderId."'";
149
        $resultsSelect = tep_db_query($query);
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

149
        $resultsSelect = /** @scrutinizer ignore-call */ tep_db_query($query);
Loading history...
150
        while ($orderRow = tep_db_fetch_array($resultsSelect)) {
0 ignored issues
show
Bug introduced by
The function tep_db_fetch_array was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

150
        while ($orderRow = /** @scrutinizer ignore-call */ tep_db_fetch_array($resultsSelect)) {
Loading history...
151
            $this->pagantisOrderId = $orderRow['pagantis_order_id'];
152
        }
153
154
        if ($this->pagantisOrderId == '') {
155
            throw new NoIdentificationException();
156
        }
157
    }
158
159
    /**
160
     * @throws OrderNotFoundException
161
     */
162
    private function getPagantisOrder()
163
    {
164
        try {
165
            $publicKey     = trim(MODULE_PAYMENT_PAGANTIS_PK);
0 ignored issues
show
Bug introduced by
The constant MODULE_PAYMENT_PAGANTIS_PK was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
166
            $secretKey     = trim(MODULE_PAYMENT_PAGANTIS_SK);
0 ignored issues
show
Bug introduced by
The constant MODULE_PAYMENT_PAGANTIS_SK was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
167
            $this->orderClient   = new \Pagantis\OrdersApiClient\Client($publicKey, $secretKey);
168
            $this->pagantisOrder = $this->orderClient->getOrder($this->pagantisOrderId);
169
        } catch (\Exception $e) {
170
            throw new OrderNotFoundException();
171
        }
172
    }
173
174
    /**
175
     * @throws AlreadyProcessedException
176
     * @throws WrongStatusException
177
     */
178
    private function checkOrderStatus()
179
    {
180
        try {
181
            $this->checkPagantisStatus(array('AUTHORIZED'));
182
        } catch (\Exception $e) {
183
            if ($this->findOscommerceOrderId()!='') {
184
                throw new AlreadyProcessedException();
185
            } else {
186
                if ($this->pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
187
                    $status = $this->pagantisOrder->getStatus();
188
                } else {
189
                    $status = '-';
190
                }
191
                throw new WrongStatusException($status);
192
            }
193
        }
194
    }
195
196
    /**
197
     * @throws AlreadyProcessedException
198
     */
199
    private function checkMerchantOrderStatus()
200
    {
201
        global $order;
202
203
        if ($order->info['order_status']!=='1') {
204
            throw new AlreadyProcessedException();
205
        }
206
    }
207
208
    /**
209
     * @throws AmountMismatchException
210
     */
211
    private function validateAmount()
212
    {
213
        $pagantisAmount = $this->pagantisOrder->getShoppingCart()->getTotalAmount();
214
        $ocAmount = intval($this->oscommerceOrder->info['total'] * 100);
215
216
        if ($pagantisAmount != $ocAmount) {
217
            throw new AmountMismatchException($pagantisAmount, $ocAmount);
218
        }
219
    }
220
221
    /**
222
     * @return false|string
223
     * @throws UnknownException
224
     */
225
    private function confirmPagantisOrder()
226
    {
227
        try {
228
            $this->pagantisOrder = $this->orderClient->confirmOrder($this->pagantisOrderId);
229
        } catch (\Exception $e) {
230
            throw new UnknownException($e->getMessage());
231
        }
232
233
        $jsonResponse = new JsonSuccessResponse();
234
        return $jsonResponse->toJson();
235
    }
236
    /**
237
     * UTILS FUNCTIONS
238
     */
239
240
    /** STEP 1 CC - Check concurrency */
241
242
    /**
243
     * @throws QuoteNotFoundException
244
     */
245
    private function getQuoteId()
246
    {
247
        if ($this->oscommerceOrderId == "") {
248
            throw new QuoteNotFoundException();
249
        }
250
    }
251
252
    /**
253
     * Check if concurrency table exists
254
     */
255
    private function checkConcurrencyTable()
256
    {
257
        $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_CONCURRENCY."'");
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

257
        $checkTable = /** @scrutinizer ignore-call */ tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_CONCURRENCY."'");
Loading history...
258
        if (tep_db_num_rows($checkTable) == 0) {
0 ignored issues
show
Bug introduced by
The function tep_db_num_rows was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

258
        if (/** @scrutinizer ignore-call */ tep_db_num_rows($checkTable) == 0) {
Loading history...
259
            $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_CONCURRENCY." (
260
                            id int NOT NULL,
261
                            `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
262
                            UNIQUE KEY id(id))";
263
            tep_db_query($sql);
264
        }
265
        return;
266
    }
267
268
    /**
269
     * Unlock the concurrency
270
     *
271
     * @param null $orderId
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $orderId is correct as it would always require null to be passed?
Loading history...
272
     * @throws Exception
273
     */
274
    private function unblockConcurrency($orderId = null)
275
    {
276
        try {
277
            if ($orderId == null) {
0 ignored issues
show
introduced by
The condition $orderId == null is always true.
Loading history...
278
                $query = "delete from ".TABLE_PAGANTIS_CONCURRENCY." where  timestamp<".(time() - 5);
279
                tep_db_query($query);
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

279
                /** @scrutinizer ignore-call */ 
280
                tep_db_query($query);
Loading history...
280
            } elseif ($orderId!='') {
281
                $query = "delete from ".TABLE_PAGANTIS_CONCURRENCY." where id='$orderId'";
282
                tep_db_query($query);
283
            }
284
        } catch (Exception $exception) {
285
            throw new ConcurrencyException();
286
        }
287
    }
288
289
    /**
290
     * @throws \Exception
291
     */
292
    private function blockConcurrency()
293
    {
294
        try {
295
            $query = "SELECT timestamp FROM ".TABLE_PAGANTIS_CONCURRENCY." where id='$this->oscommerceOrderId'";
296
            $resultsSelect = tep_db_query($query);
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

296
            $resultsSelect = /** @scrutinizer ignore-call */ tep_db_query($query);
Loading history...
297
            $orderRow = tep_db_fetch_array($resultsSelect);
0 ignored issues
show
Bug introduced by
The function tep_db_fetch_array was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

297
            $orderRow = /** @scrutinizer ignore-call */ tep_db_fetch_array($resultsSelect);
Loading history...
298
299
            if (isset($orderRow['timestamp'])) {
300
                throw new ConcurrencyException();
301
            }
302
303
            $query = "INSERT INTO ".TABLE_PAGANTIS_CONCURRENCY." (id) VALUES ('$this->oscommerceOrderId')";
304
            tep_db_query($query);
305
306
        } catch (Exception $exception) {
307
            throw new ConcurrencyException();
308
        }
309
    }
310
311
    /** STEP 2 GMO - Get Merchant Order */
312
    /** STEP 3 GPOI - Get Pagantis OrderId */
313
    /** STEP 4 GPO - Get Pagantis Order */
314
    /** STEP 5 COS - Check Order Status */
315
    /**
316
     * @param $statusArray
317
     *
318
     * @throws \Exception
319
     */
320
    private function checkPagantisStatus($statusArray)
321
    {
322
        $pagantisStatus = array();
323
        foreach ($statusArray as $status) {
324
            $pagantisStatus[] = constant("\Pagantis\OrdersApiClient\Model\Order::STATUS_$status");
325
        }
326
327
        if ($this->pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
328
            $payed = in_array($this->pagantisOrder->getStatus(), $pagantisStatus);
329
            if (!$payed) {
330
                if ($this->pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
0 ignored issues
show
introduced by
$this->pagantisOrder is always a sub-type of Pagantis\OrdersApiClient\Model\Order.
Loading history...
331
                    $status = $this->pagantisOrder->getStatus();
332
                } else {
333
                    $status = '-';
334
                }
335
                throw new WrongStatusException($status);
336
            }
337
        } else {
338
            throw new OrderNotFoundException();
339
        }
340
    }
341
342
    /**
343
     * @return mixed
344
     */
345
    private function findOscommerceOrderId()
346
    {
347
        $query = "select os_order_id from ".TABLE_PAGANTIS_ORDERS." where os_order_reference='".$this->oscommerceOrderId."'";
348
        $resultsSelect = tep_db_query($query);
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

348
        $resultsSelect = /** @scrutinizer ignore-call */ tep_db_query($query);
Loading history...
349
        $orderRow = tep_db_fetch_array($resultsSelect);
0 ignored issues
show
Bug introduced by
The function tep_db_fetch_array was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

349
        $orderRow = /** @scrutinizer ignore-call */ tep_db_fetch_array($resultsSelect);
Loading history...
350
        $this->merchantOrderId = $orderRow['os_order_id'];
0 ignored issues
show
Bug Best Practice introduced by
The property merchantOrderId does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
351
352
        return $orderRow['os_order_id'];
353
    }
354
355
    /** STEP 6 CMOS - Check Merchant Order Status */
356
    /** STEP 7 VA - Validate Amount */
357
    /** STEP 8 PMO - Process Merchant Order */
358
359
    /**
360
     * Save the order status with the related identification
361
     */
362
    private function updateBdInfo()
363
    {
364
        global $insert_id;
365
        $this->merchantOrderId = $insert_id;
0 ignored issues
show
Bug Best Practice introduced by
The property merchantOrderId does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
366
        $query = "update ".TABLE_PAGANTIS_ORDERS." set os_order_id='$insert_id' where os_order_reference='$this->oscommerceOrderId'";
367
        tep_db_query($query);
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

367
        /** @scrutinizer ignore-call */ 
368
        tep_db_query($query);
Loading history...
368
369
        $comment = "Pagantis id=$this->pagantisOrderId/Via=".ucfirst($this->origin);
370
        $query = "insert into ".TABLE_ORDERS_STATUS_HISTORY ."(comments, orders_id, orders_status_id, customer_notified, date_added) values
0 ignored issues
show
Bug introduced by
The constant TABLE_ORDERS_STATUS_HISTORY was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
371
            ('$comment', ".$insert_id.", '2', -1, now() )";
372
        tep_db_query($query);
373
374
        $query = "update ".TABLE_ORDERS." set orders_status='2' where orders_id='$insert_id'";
0 ignored issues
show
Bug introduced by
The constant TABLE_ORDERS was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
375
        tep_db_query($query);
376
    }
377
378
    /** STEP 9 CPO - Confirmation Pagantis Order */
379
    private function rollbackMerchantOrder()
380
    {
381
        global $insert_id;
382
        $query = "update orders set orders_status='1' where orders_id='$insert_id' ";
383
        tep_db_query($query);
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

383
        /** @scrutinizer ignore-call */ 
384
        tep_db_query($query);
Loading history...
384
385
        $query = "update ".TABLE_PAGANTIS_ORDERS." set os_order_id='' where os_order_reference='$this->oscommerceOrderId'";
386
        tep_db_query($query);
387
    }
388
389
    /**
390
     * @param $exception
391
     */
392
    private function insertLog($exception)
393
    {
394
        if ($exception instanceof \Exception) {
395
            $logEntry= new LogEntry();
396
            $logEntryJson = $logEntry->error($exception)->toJson();
397
398
            $query = "insert into ".TABLE_PAGANTIS_LOG."(log) values ('$logEntryJson')";
399
            tep_db_query($query);
0 ignored issues
show
Bug introduced by
The function tep_db_query was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

399
            /** @scrutinizer ignore-call */ 
400
            tep_db_query($query);
Loading history...
400
        }
401
    }
402
403
    /***
404
     * SETTERS Y GETTERS
405
     */
406
407
    /**
408
     * @return mixed
409
     */
410
    public function getOscommerceOrderId()
411
    {
412
        return $this->oscommerceOrderId;
413
    }
414
415
    /**
416
     * @param $oscommerceOrderId
417
     */
418
    public function setOscommerceOrderId($oscommerceOrderId)
419
    {
420
        $this->oscommerceOrderId = $oscommerceOrderId;
421
    }
422
423
    /**
424
     * @return mixed
425
     */
426
    public function getOrigin()
427
    {
428
        return $this->origin;
429
    }
430
431
    /**
432
     * @param mixed $origin
433
     */
434
    public function setOrigin($origin)
435
    {
436
        $this->origin = $origin;
437
    }
438
439
    /**
440
     * @return String
441
     */
442
    public function getOrderStatus()
443
    {
444
        return $this->orderStatus;
445
    }
446
447
    /**
448
     * @param String $orderStatus
449
     */
450
    public function setOrderStatus($orderStatus)
451
    {
452
        $this->orderStatus = $orderStatus;
0 ignored issues
show
Bug Best Practice introduced by
The property orderStatus does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
453
    }
454
}
455