| Total Complexity | 6 |
| Total Lines | 73 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class Setting extends Model |
||
| 7 | { |
||
| 8 | use SettingPresenter; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * The attributes that are mass assignable. |
||
| 12 | * |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $fillable = [ |
||
| 16 | 'name', |
||
| 17 | 'value_int', |
||
| 18 | 'value_str', |
||
| 19 | 'value_bool', |
||
| 20 | 'value', |
||
| 21 | 'description', |
||
| 22 | 'last_updated_user_id' |
||
| 23 | ]; |
||
| 24 | |||
| 25 | |||
| 26 | /** |
||
| 27 | * The accessors to append to the model's array form. |
||
| 28 | * |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | protected $appends = [ |
||
| 32 | 'value' |
||
| 33 | ]; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * The "booting" method of the model. |
||
| 37 | * |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | protected static function boot() |
||
| 49 | }); |
||
| 50 | } |
||
| 51 | |||
| 52 | private static function castValue($value, $model) |
||
| 82 |
The
breakstatement is not necessary if it is preceded for example by areturnstatement:If you would like to keep this construct to be consistent with other
casestatements, you can safely mark this issue as a false-positive.