1 | <?php namespace Anomaly\SettingsModule\Setting; |
||
18 | class SettingRepository extends EntryRepository implements SettingRepositoryInterface |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * The setting model. |
||
23 | * |
||
24 | * @var SettingModel |
||
25 | */ |
||
26 | protected $model; |
||
27 | |||
28 | /** |
||
29 | * The settings collection. |
||
30 | * |
||
31 | * @var SettingCollection |
||
32 | */ |
||
33 | protected $settings; |
||
34 | |||
35 | /** |
||
36 | * Create a new SettingRepositoryInterface instance. |
||
37 | * |
||
38 | * @param SettingModel $model |
||
39 | * @param Repository $config |
||
|
|||
40 | * @param FieldTypeCollection $fieldTypes |
||
41 | */ |
||
42 | public function __construct(SettingModel $model) |
||
48 | |||
49 | /** |
||
50 | * Return if the key exists or not. |
||
51 | * |
||
52 | * @param $key |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function has($key) |
||
59 | |||
60 | /** |
||
61 | * Get a setting. |
||
62 | * |
||
63 | * @param $key |
||
64 | * @param null $default |
||
65 | * @return null|SettingInterface|SettingModel |
||
66 | */ |
||
67 | public function get($key, $default = null) |
||
73 | |||
74 | /** |
||
75 | * Set a settings value. |
||
76 | * |
||
77 | * @param $key |
||
78 | * @param $value |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function set($key, $value) |
||
89 | |||
90 | /** |
||
91 | * Get a setting value. |
||
92 | * |
||
93 | * @param $key |
||
94 | * @param null $default |
||
95 | * @return mixed|null |
||
96 | */ |
||
97 | public function value($key, $default = null) |
||
105 | |||
106 | /** |
||
107 | * Return the field type |
||
108 | * presenter for a setting. |
||
109 | * |
||
110 | * @param $key |
||
111 | * @return FieldTypePresenter|null |
||
112 | */ |
||
113 | public function presenter($key) |
||
121 | |||
122 | /** |
||
123 | * Find a setting by it's key |
||
124 | * or return a new instance. |
||
125 | * |
||
126 | * @param $key |
||
127 | * @return SettingInterface |
||
128 | */ |
||
129 | public function findByKeyOrNew($key) |
||
140 | |||
141 | /** |
||
142 | * Find all settings with namespace. |
||
143 | * |
||
144 | * @param $namespace |
||
145 | * @return SettingCollection |
||
146 | */ |
||
147 | public function findAllByNamespace($namespace) |
||
151 | } |
||
152 |
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.