1 | <?php |
||
26 | abstract class AbstractFinder implements FinderInterface |
||
27 | { |
||
28 | |||
29 | use ConfigTrait; |
||
30 | |||
31 | /** |
||
32 | * Array of Findables that the Finder can iterate through to find a match. |
||
33 | * |
||
34 | * @since 0.1.0 |
||
35 | * |
||
36 | * @var Findable[] |
||
37 | */ |
||
38 | protected $findables; |
||
39 | |||
40 | /** |
||
41 | * NullObject that is returned if the Finder could not find a match. |
||
42 | * |
||
43 | * @since 0.1.0 |
||
44 | * |
||
45 | * @var NullObject |
||
46 | */ |
||
47 | protected $nullObject; |
||
48 | |||
49 | /** |
||
50 | * Instantiate an AbstractFinder object. |
||
51 | * |
||
52 | * @since 0.1.0 |
||
53 | * |
||
54 | * @param ConfigInterface $config Configuration of the EngineFinder. |
||
55 | * |
||
56 | * @throws FailedToProcessConfigException If the config could not be processed. |
||
57 | */ |
||
58 | 7 | public function __construct(ConfigInterface $config) |
|
64 | |||
65 | /** |
||
66 | * Register the Findables defined in the given configuration. |
||
67 | * |
||
68 | * @since 0.1.0 |
||
69 | * |
||
70 | * @param ConfigInterface $config Configuration to register the Findables from. |
||
71 | */ |
||
72 | 7 | public function registerFindables(ConfigInterface $config) |
|
78 | |||
79 | /** |
||
80 | * Register the NullObject defined in the given configuration. |
||
81 | * |
||
82 | * @since 0.1.0 |
||
83 | * |
||
84 | * @param ConfigInterface $config Configuration to register the NullObject from. |
||
85 | */ |
||
86 | 7 | public function registerNullObject(ConfigInterface $config) |
|
90 | |||
91 | /** |
||
92 | * Get the NullObject. |
||
93 | * |
||
94 | * @since 0.1.1 |
||
95 | * |
||
96 | * @return NullObject NullObject for the current Finder. |
||
97 | */ |
||
98 | public function getNullObject() |
||
104 | |||
105 | /** |
||
106 | * Register a single Findable. |
||
107 | * |
||
108 | * @since 0.1.0 |
||
109 | * |
||
110 | * @param string $key Key used to reference the Findable. |
||
111 | * @param mixed $findable Findable as a FQCN, callable or object. |
||
112 | */ |
||
113 | 7 | protected function registerFindable($key, $findable) |
|
117 | |||
118 | /** |
||
119 | * Get the config key for the Findables definitions. |
||
120 | * |
||
121 | * @since 0.1.0 |
||
122 | * |
||
123 | * @return string Config key use to define the Findables. |
||
124 | */ |
||
125 | protected function getFindablesConfigKey() |
||
129 | |||
130 | /** |
||
131 | * Get the config key for the NullObject definitions. |
||
132 | * |
||
133 | * @since 0.1.0 |
||
134 | * |
||
135 | * @return string Config key use to define the NullObject. |
||
136 | */ |
||
137 | 7 | protected function getNullObjectConfigKey() |
|
141 | |||
142 | /** |
||
143 | * Initialize the NullObject. |
||
144 | * |
||
145 | * @since 0.1.1 |
||
146 | */ |
||
147 | protected function initializeNullObject() |
||
153 | } |
||
154 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.