Fix and improve reflection

- use "p" for path (security check for nul byte)
- fix number of args for some methods
- add type hinting
- throw standard exception (simplify)
- fix test suite for PHP 7.0 to 8.0
This commit is contained in:
Remi Collet
2020-06-22 16:22:37 +02:00
parent d36a2de544
commit cf0ce5a01e
14 changed files with 48 additions and 50 deletions
+3 -3
View File
@@ -6,10 +6,10 @@ Testing CnnFaceDetection constructor without arguments
<?php
try {
new CnnFaceDetection();
} catch (Exception $e) {
} catch (Error $e) {
var_dump($e->getMessage());
}
?>
--EXPECTF--
Warning: CnnFaceDetection::__construct() expects exactly 1 parameter, 0 given in %s on line 3
string(41) "Unable to parse face_detection_model_path"
string(68) "CnnFaceDetection::__construct() expects exactly 1 parameter, 0 given"