| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 46 | public function delete() |
||
| 47 | { |
||
| 48 | // Remove kanban tags |
||
| 49 | \DB::table('projects_kanban_tags')->where('tag_id', '=', $this->id)->delete(); |
||
|
|
|||
| 50 | |||
| 51 | // Remove relation to issues |
||
| 52 | \DB::table('projects_issues_tags')->where('tag_id', '=', $this->id)->delete(); |
||
| 53 | |||
| 54 | return parent::delete(); |
||
| 55 | } |
||
| 56 | |||
| 59 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: