These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | error_reporting(E_ALL); |
||
3 | |||
4 | // namespace and autoloaders |
||
5 | use Ridvanbaluyos\Face\FaceDetection as FaceDetection; |
||
6 | require_once __DIR__ . '/vendor/autoload.php'; |
||
7 | |||
8 | // let's use Justin Bieber's photo |
||
9 | $image = array( |
||
10 | 'url' => 'http://img2.timeinc.net/people/i/2014/database/140831/justin-bieber-300.jpg', |
||
11 | ); |
||
12 | |||
13 | // detect face |
||
14 | $face = new FaceDetection($image); |
||
15 | |||
16 | // face only |
||
17 | $result = $face->getFaces(); |
||
18 | |||
19 | // analyze all |
||
0 ignored issues
–
show
|
|||
20 | //$face->analyzeAll()->getFaces(); |
||
21 | |||
22 | // analyze chaining |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
58% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
23 | //$face->analyzeFaceLandmarks()->analyzeFaceAttributes()->getFaces(); |
||
24 | |||
25 | // analyze face attributes |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
48% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
26 | //$face->analyzeFaceAttributes()->getFaces(); |
||
27 | |||
28 | // analyze face landmarks |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
48% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
29 | //$face->analyzeFaceLandmarks()->getFaces(); |
||
30 | |||
31 | echo $result; |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.