Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 9 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
38 | View Code Duplication | public function removeLabels( array $labels ) |
|
39 | { |
||
40 | $this->messageRequest->setRemoveLabelIds( $labels ); |
||
41 | try { |
||
42 | return $this->modify(); |
||
43 | } catch ( \Exception $e ) { |
||
44 | throw new \Exception( "Couldn't remove mark email as important.: {$e->getMessage()}" ); |
||
45 | } |
||
46 | } |
||
47 | |||
85 | } |
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: