Completed
Pull Request — master (#11)
by
unknown
02:00
created

Stock::validate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php 
2
/**
3
 * Collmex Stock 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 Stock 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
class Stock extends AbstractType implements TypeInterface
22
{
23
    /**
24
     * @var array
25
     */
26
    protected $template = array(
27
        'type_identifier'       => 'CMXSTK',
28
        'product_id'            => null,
29
        'client_id'             => null,
30
        'stock'                 => null,
31
        'type'                  => null,
32
        'charge_number'         => null,
33
        'value'                 => null,
34
        'charge_description'    => null,
35
        'product_description'   => null
36
    );
37
38
    /**
39
     * Formally validates the type data in $data attribute.
40
     *
41
     * @return bool Validation success
42
     */
43
    public function validate()
44
    {
45
        return true;
46
    }
47
}
48
49
50
 ?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...