1 | <?php |
||
17 | class STLSplit { |
||
18 | /** |
||
19 | * @var STL |
||
20 | */ |
||
21 | private $stl; |
||
22 | |||
23 | /** |
||
24 | * @return STL |
||
25 | */ |
||
26 | public function getStl(): STL |
||
30 | |||
31 | /** |
||
32 | * @param STL $stl |
||
33 | * @return STLSplit |
||
34 | */ |
||
35 | private function setStl(STL $stl): STLSplit |
||
40 | |||
41 | /** |
||
42 | * STLSplit constructor. |
||
43 | * @param STL $stl |
||
44 | */ |
||
45 | public function __construct(STL $stl) |
||
49 | |||
50 | /** |
||
51 | * Splits an STL object into 3, and returns the new 3D objects in an array of STL files. |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public function split() : array |
||
89 | |||
90 | /** |
||
91 | * Finds the neighbouring facets of a facet. |
||
92 | * |
||
93 | * @param array $facet |
||
94 | * @param array $object |
||
95 | * @param array $facets |
||
96 | */ |
||
97 | private function findNeighbour(array $facet, array &$object, array &$facets) |
||
114 | } |
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of
return
,die
orexit
statements that have been added for debug purposes.In the above example, the last
return false
will never be executed, because a return statement has already been met in every possible execution path.