| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 9 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | View Code Duplication | public function addLabels( array $labels ) |
|
| 23 | { |
||
| 24 | $this->messageRequest->setAddLabelIds( $labels ); |
||
| 25 | try { |
||
| 26 | return $this->modify(); |
||
| 27 | } catch ( \Exception $e ) { |
||
| 28 | throw new \Exception( "Couldn't mark email as unread: {$e->getMessage()}" ); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 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: