| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function getAllFollows($component) |
||
| 40 | { |
||
| 41 | $instagram = $this->getConnection()->likeMedia(); |
||
| 42 | |||
| 43 | // set user's accesstoken (can be received after authentication) |
||
| 44 | $instagram->setAccessToken("2823787.9687902.21u77429n3r79o08233122306fa78902"); |
||
| 45 | |||
| 46 | // receive the list of users this user follows |
||
| 47 | $follows = $instagram->getUserFollows(); |
||
| 48 | |||
| 49 | // dump response object |
||
| 50 | echo '<pre>'; |
||
| 51 | print_r($follows); |
||
| 52 | echo '<pre>'; |
||
| 53 | } |
||
| 54 | |||
| 56 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.