1 | <?php |
||
36 | class RawEntityLoader implements LoaderInterface |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The connection instance. |
||
41 | * |
||
42 | * @var \TechDivision\Import\Connection\ConnectionInterface |
||
43 | */ |
||
44 | protected $connection; |
||
45 | |||
46 | /** |
||
47 | * The column metadata loader instance. |
||
48 | * |
||
49 | * @var \TechDivision\Import\Loaders\LoaderInterface |
||
50 | */ |
||
51 | protected $rawEntities = array(); |
||
52 | |||
53 | /** |
||
54 | * The loader instance for the raw EAV entities. |
||
55 | * |
||
56 | * @var \TechDivision\Import\Loaders\LoaderInterface |
||
57 | */ |
||
58 | protected $eavRawEntityLoader; |
||
59 | |||
60 | /** |
||
61 | * The array with the attribute specific entity types. |
||
62 | * |
||
63 | * @var array |
||
64 | */ |
||
65 | protected $entityTypes = array(EntityTypeCodes::EAV_ATTRIBUTE_OPTION, EntityTypeCodes::CATALOG_EAV_ATTRIBUTE); |
||
66 | |||
67 | /** |
||
68 | * Construct a new instance. |
||
69 | * |
||
70 | * @param \TechDivision\Import\Connection\ConnectionInterface $connection The DB connection instance used to load the table metadata |
||
71 | * @param \TechDivision\Import\Loaders\LoaderInterface $columnMetadataLoader The column metadata loader instance |
||
72 | * @param \TechDivision\Import\Loaders\LoaderInterface $eavRawEntityLoader The loader instance for the raw EAV entities |
||
73 | */ |
||
74 | public function __construct( |
||
99 | |||
100 | /** |
||
101 | * Return's the default value for the passed column. |
||
102 | * |
||
103 | * @param array $column The column to return the default value for |
||
104 | * |
||
105 | * @return string|null The default value for the passed column |
||
106 | */ |
||
107 | protected function loadDefaultValue(array $column) |
||
128 | |||
129 | /** |
||
130 | * Loads and returns data. |
||
131 | * |
||
132 | * @param string|null $entityTypeCode The table name to return the list for |
||
133 | * @param array $data An array with data that will be used to initialize the raw entity with |
||
134 | * |
||
135 | * @return \ArrayAccess The array with the raw data |
||
136 | */ |
||
137 | public function load($entityTypeCode = null, array $data = array()) |
||
141 | } |
||
142 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.