| 1 | <?php  | 
            ||
| 14 | class FieldExtension extends AbstractExtension  | 
            ||
| 15 | { | 
            ||
| 16 | /**  | 
            ||
| 17 | * @var MetadataFactoryInterface  | 
            ||
| 18 | */  | 
            ||
| 19 | private $metadataFactory;  | 
            ||
| 20 | |||
| 21 | /**  | 
            ||
| 22 | * @var FieldRegistry  | 
            ||
| 23 | */  | 
            ||
| 24 | private $fieldRegistry;  | 
            ||
| 25 | |||
| 26 | public function __construct(  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 |      * {@inheritdoc} | 
            ||
| 36 | */  | 
            ||
| 37 | public function hasType($type)  | 
            ||
| 45 | |||
| 46 | /**  | 
            ||
| 47 |      * {@inheritdoc} | 
            ||
| 48 | */  | 
            ||
| 49 | public function loadTypes()  | 
            ||
| 54 | |||
| 55 | /**  | 
            ||
| 56 |      * {@inheritdoc} | 
            ||
| 57 | */  | 
            ||
| 58 | public function getType($type)  | 
            ||
| 81 | }  | 
            ||
| 82 | 
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:
The
getFirstName()method in theSoncalls the wrong method in the parent class.