1 | <?php namespace Anomaly\ConfigurationModule\Configuration; |
||
17 | class ConfigurationRepository extends EntryRepository implements ConfigurationRepositoryInterface |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * The configuration model. |
||
22 | * |
||
23 | * @var ConfigurationModel |
||
24 | */ |
||
25 | protected $model; |
||
26 | |||
27 | /** |
||
28 | * The configurations collection. |
||
29 | * |
||
30 | * @var ConfigurationCollection |
||
31 | */ |
||
32 | protected $configurations; |
||
33 | |||
34 | /** |
||
35 | * Create a new ConfigurationRepositoryInterface instance. |
||
36 | * |
||
37 | * @param ConfigurationModel $model |
||
38 | * @param Repository $config |
||
|
|||
39 | * @param FieldTypeCollection $fieldTypes |
||
40 | */ |
||
41 | public function __construct(ConfigurationModel $model) |
||
47 | |||
48 | /** |
||
49 | * Get a configuration. |
||
50 | * |
||
51 | * @param $key |
||
52 | * @param $scope |
||
53 | * @return ConfigurationInterface|null |
||
54 | */ |
||
55 | public function get($key, $scope) |
||
59 | |||
60 | /** |
||
61 | * Set a configurations value. |
||
62 | * |
||
63 | * @param $key |
||
64 | * @param $scope |
||
65 | * @param $value |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function set($key, $scope, $value) |
||
76 | |||
77 | /** |
||
78 | * Get a configuration value. |
||
79 | * |
||
80 | * @param $key |
||
81 | * @param $scope |
||
82 | * @param null $default |
||
83 | * @return mixed|null |
||
84 | */ |
||
85 | public function value($key, $scope, $default = null) |
||
93 | |||
94 | /** |
||
95 | * Get a configuration value presenter instance. |
||
96 | * |
||
97 | * @param $key |
||
98 | * @param $scope |
||
99 | * @return FieldTypePresenter|null |
||
100 | */ |
||
101 | public function presenter($key, $scope) |
||
109 | |||
110 | /** |
||
111 | * Find a configuration by it's key |
||
112 | * or return a new instance. |
||
113 | * |
||
114 | * @param $key |
||
115 | * @param $scope |
||
116 | * @return ConfigurationInterface |
||
117 | */ |
||
118 | public function findByKeyAndScopeOrNew($key, $scope) |
||
130 | |||
131 | /** |
||
132 | * Purge a namespace's configuration. |
||
133 | * |
||
134 | * @param $namespace |
||
135 | * @return $this |
||
136 | */ |
||
137 | public function purge($namespace) |
||
143 | } |
||
144 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.