Completed
Push — master ( 484013...7348d2 )
by Ronan
02:45
created

Itf14   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 1
c 1
b 1
f 0
lcom 0
cbo 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 4 1
1
<?php
2
3
namespace IsoCodes;
4
5
/**
6
 * Class Itf14: ITF-14 (Interleaved Two of Five) is the GS1 implementation
7
 * of an Interleaved 2 of 5 bar code to encode a Global Trade Item Number.
8
 * This is a symlink, for convenience purposes only.
9
 *
10
 * @link https://en.wikipedia.org/wiki/ITF-14
11
 * @link https://en.wikipedia.org/wiki/Global_Trade_Item_Number
12
 */
13
class Itf14 extends Gtin14 implements IsoCodeInterface
14
{
15
    /**
16
     * @param mixed $itf14
17
     *
18
     * @deprecated in favor of Gtin14
19
     *
20
     * @return bool
21
     */
22
    public static function validate($itf14)
23
    {
24
        return parent::check($itf14, 14);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (check() instead of validate()). Are you sure this is correct? If so, you might want to change this to $this->check().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
25
    }
26
}
27