diff --git a/src/Exception/BorderParsing/CutOffPieceException.php b/src/Exception/BorderParsing/CutOffPieceException.php new file mode 100644 index 00000000..29cbc454 --- /dev/null +++ b/src/Exception/BorderParsing/CutOffPieceException.php @@ -0,0 +1,15 @@ +hasBorderPixel($pixelMap, $biggestObjectColor)) { - throw new BorderParsingException('Piece is cut off'); + throw new CutOffPieceException(); } // Make given images transparent if wished diff --git a/src/Service/BorderFinder/ByWulfBorderFinder/PointParser.php b/src/Service/BorderFinder/ByWulfBorderFinder/PointParser.php index 78bef5e7..3e1b9698 100644 --- a/src/Service/BorderFinder/ByWulfBorderFinder/PointParser.php +++ b/src/Service/BorderFinder/ByWulfBorderFinder/PointParser.php @@ -6,6 +6,7 @@ use Bywulf\Jigsawlutioner\Dto\PixelMap; use Bywulf\Jigsawlutioner\Dto\Point; +use Bywulf\Jigsawlutioner\Exception\BorderParsing\NoAreaFoundException; use Bywulf\Jigsawlutioner\Exception\BorderParsingException; use Bywulf\Jigsawlutioner\Service\BorderFinder\ByWulfBorderFinder; @@ -34,7 +35,7 @@ public function getOrderedBorderPoints(PixelMap $pixelMap, int $objectColor): ar } } - throw new BorderParsingException('No area found'); + throw new NoAreaFoundException(); } /** diff --git a/src/Service/PuzzleSolver/ByWulfSolver.php b/src/Service/PuzzleSolver/ByWulfSolver.php index aa472768..9b89af9b 100644 --- a/src/Service/PuzzleSolver/ByWulfSolver.php +++ b/src/Service/PuzzleSolver/ByWulfSolver.php @@ -75,7 +75,7 @@ public function setSolutionReport(SolutionReport $solutionReport): void } /** - * @param array $pieces + * @param array $pieces * @param array> $matchingMap * * @throws PuzzleSolverException diff --git a/src/Service/PuzzleSolver/PuzzleSolverInterface.php b/src/Service/PuzzleSolver/PuzzleSolverInterface.php index c370e183..90e24102 100644 --- a/src/Service/PuzzleSolver/PuzzleSolverInterface.php +++ b/src/Service/PuzzleSolver/PuzzleSolverInterface.php @@ -11,7 +11,7 @@ interface PuzzleSolverInterface { /** - * @param array $pieces + * @param array $pieces * @param array> $matchingMap */ public function findSolution(array $pieces, array $matchingMap): Solution;