| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace WITR\Http\Controllers\Admin; |
||
| 35 | public function update(Request $request) |
||
| 36 | { |
||
| 37 | $input = $request->all(); |
||
| 38 | $settings = SystemSetting::all(); |
||
| 39 | |||
| 40 | foreach ($settings as $setting) { |
||
| 41 | $value = $input['value_' . $setting->id]; |
||
| 42 | $setting->value = $value; |
||
| 43 | |||
| 44 | $enabled_id = 'enabled_' . $setting->id; |
||
| 45 | if (array_key_exists($enabled_id, $input)) { |
||
| 46 | $setting->enabled = $input[$enabled_id]; |
||
| 47 | } else { |
||
| 48 | $setting->enabled = 1; |
||
| 49 | } |
||
| 50 | |||
| 51 | $setting->save(); |
||
| 52 | } |
||
| 53 | |||
| 54 | return redirect()->route('admin.settings') |
||
| 55 | ->with('success', 'Settings Saved!'); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.