|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Collmex ShipmentConfirm Type |
|
4
|
|
|
* |
|
5
|
|
|
* @author Marcus Jaschen <[email protected]> |
|
6
|
|
|
* @author René Galle <[email protected]> |
|
7
|
|
|
* @license http://www.opensource.org/licenses/mit-license MIT License |
|
8
|
|
|
* @link https://github.com/mjaschen/collmex |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
namespace MarcusJaschen\Collmex\Type; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Collmex ShipmentConfirm Type |
|
15
|
|
|
* |
|
16
|
|
|
* @author Marcus Jaschen <[email protected]> |
|
17
|
|
|
* @author René Galle <[email protected]> |
|
18
|
|
|
* @license http://www.opensource.org/licenses/mit-license MIT License |
|
19
|
|
|
* @link https://github.com/mjaschen/collmex |
|
20
|
|
|
* |
|
21
|
|
|
* @property string $type_identifier |
|
22
|
|
|
* @property int $delivery_id |
|
23
|
|
|
* @property int $client_id |
|
24
|
|
|
* @property int $customer_id |
|
25
|
|
|
* @property int $mode_of_shipment |
|
26
|
|
|
* @property int $sent_to_shipment_company |
|
27
|
|
|
* @property string $tracking_code |
|
28
|
|
|
* @property string $delivery_date_from |
|
29
|
|
|
*/ |
|
30
|
|
View Code Duplication |
class ShipmentConfirm extends AbstractType implements TypeInterface |
|
|
|
|
|
|
31
|
|
|
{ |
|
32
|
|
|
/** |
|
33
|
|
|
* @var array |
|
34
|
|
|
*/ |
|
35
|
|
|
protected $template = [ |
|
36
|
|
|
'type_identifier' => 'SHIPMENT_CONFIRM', |
|
37
|
|
|
'delivery_id' => null, |
|
38
|
|
|
'client_id' => null, |
|
39
|
|
|
'customer_id' => null, |
|
40
|
|
|
'mode_of_shipment' => null, |
|
41
|
|
|
'sent_to_shipment_company' => null, |
|
42
|
|
|
'use_tracking_code' => null, |
|
43
|
|
|
'delivery_date_from' => null, |
|
44
|
|
|
]; |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* Formally validates the type data in $data attribute. |
|
48
|
|
|
* |
|
49
|
|
|
* @return bool Validation success |
|
50
|
|
|
*/ |
|
51
|
|
|
public function validate() |
|
52
|
|
|
{ |
|
53
|
|
|
return true; |
|
54
|
|
|
} |
|
55
|
|
|
} |
|
56
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.