| Total Complexity | 11 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Articles extends Model |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected $table = 'articles'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | public $primaryKey = 'id'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var bool |
||
| 22 | */ |
||
| 23 | public $timestamps = true; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $dates = [ |
||
| 29 | 'created_at', |
||
| 30 | 'updated_at' |
||
| 31 | ]; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param $id |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public function writer() { |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param $str |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function cutStr($str) |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param $str |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function getCat($str) |
||
| 81 |
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.