for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace XSolve\FaceValidatorBundle\Calculator;
class FaceToImageRatioCalculator
{
public function calculate(string $filePath, int $faceWidth, int $faceHeight): float
list($imageWidth, $imageHeight) = getimagesize($filePath);
return ($faceWidth * $faceHeight) / ($imageWidth * $imageHeight);
}