1 | <?php |
||
7 | class CiffRenderer |
||
8 | { |
||
9 | /** |
||
10 | * @var RendererDocument |
||
11 | */ |
||
12 | private $rendererDocument; |
||
13 | |||
14 | /** |
||
15 | * @var callable |
||
16 | */ |
||
17 | private $fontResolver; |
||
18 | |||
19 | /** |
||
20 | * @var callable |
||
21 | */ |
||
22 | private $graphicResolver; |
||
23 | |||
24 | /** |
||
25 | * @param RendererDocument $rendererDocument |
||
26 | */ |
||
27 | public function __construct(RendererDocument $rendererDocument) |
||
31 | |||
32 | /** |
||
33 | * Render an image from a ciff file located on the filesystem. |
||
34 | * |
||
35 | * @param string $filePath |
||
36 | * @return Intervention\Image\Image |
||
|
|||
37 | */ |
||
38 | public function renderFile($filePath) |
||
43 | |||
44 | /** |
||
45 | * Render an image from ciff data contained within a string. |
||
46 | * |
||
47 | * @param string $string |
||
48 | * @return Intervention\Image\Image |
||
49 | */ |
||
50 | public function renderString($string) |
||
55 | |||
56 | /** |
||
57 | * @param \SimpleXMLElement $xml |
||
58 | * @return Intervention\Image\Image |
||
59 | */ |
||
60 | private function render(\SimpleXMLElement $xml) |
||
68 | |||
69 | /** |
||
70 | * @param callable $fontResolver |
||
71 | */ |
||
72 | public function setFontResolver(callable $fontResolver) |
||
76 | |||
77 | /** |
||
78 | * @param callable $graphicResolver |
||
79 | */ |
||
80 | public function setGraphicResolver(callable $graphicResolver) |
||
84 | |||
85 | /** |
||
86 | * @return CiffRenderer |
||
87 | */ |
||
88 | public static function factory() |
||
94 | } |
||
95 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.