Completed
Pull Request — master (#75)
by
unknown
06:31
created

BillOfMaterial::validate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Collmex BillOfMaterial 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 BillOfMaterial 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 $type_identifier
22
 * @property $product_id
23
 * @property $client_id
24
 * @property $version
25
 * @property $assignment
26
 * @property $valid_from
27
 * @property $text
28
 * @property $reserved_1
29
 * @property $reserved_2
30
 * @property $reserved_3
31
 * @property $reserved_4
32
 * @property $reserved_5
33
 * @property $position
34
 * @property $component_product_id
35
 * @property $quantity
36
 * @property $allocation_base
37
 */
38
class BillOfMaterial extends AbstractType implements TypeInterface
39
{
40
    /**
41
     * @var array
42
     */
43
    protected $template = [
44
        'type_identifier'      => 'CMXBOM',
45
        'product_id'           => null,
46
        'client_id'            => null,
47
        'version'              => null,
48
        'assignment'           => null,
49
        'valid_from'           => null,
50
        'text'                 => null,
51
        'reserved_1'           => null,
52
        'reserved_2'           => null,
53
        'reserved_3'           => null,
54
        'reserved_4'           => null,
55
        'reserved_5'           => null,
56
        'position'             => null,
57
        'component_product_id' => null,
58
        'quantity'             => null,
59
        'allocation_base'      => null,
60
    ];
61
62
    /**
63
     * Formally validates the type data in $data attribute.
64
     *
65
     * @return bool Validation success
66
     */
67
    public function validate()
68
    {
69
        return true;
70
    }
71
}
72