| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 8 | 
| Code Lines | 4 | 
| Lines | 8 | 
| Ratio | 100 % | 
| Tests | 5 | 
| CRAP Score | 1 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 56 | 1 | View Code Duplication | public function deleteReply($commentId)  | 
            
| 57 |     { | 
            ||
| 58 | 1 | $params = array_merge($this->mediaPress(), [  | 
            |
| 59 | 1 | 'user_comment_id' => $commentId,  | 
            |
| 60 | 1 | ]);  | 
            |
| 61 | |||
| 62 | 1 |         return $this->parseJSON('post', [self::API_DELETE_REPLY, $params]); | 
            |
| 63 | }  | 
            ||
| 64 | }  | 
            ||
| 65 | 
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idableprovides a methodequalsIdthat in turn relies on the methodgetId(). If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()as an abstract method to the trait will make sure it is available.