| 1 | <?php |
||
| 9 | class CiffRenderer |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Filesystem |
||
| 13 | */ |
||
| 14 | private $filesystem; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var ParserDocument |
||
| 18 | */ |
||
| 19 | private $parserDocument; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var RendererDocument |
||
| 23 | */ |
||
| 24 | private $rendererDocument; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var callable |
||
| 28 | */ |
||
| 29 | private $fontResolver; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var callable |
||
| 33 | */ |
||
| 34 | private $graphicResolver; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param Filesystem $filesystem |
||
| 38 | * @param ParserDocument $parserDocument |
||
| 39 | * @param RendererDocument $rendererDocument |
||
| 40 | */ |
||
| 41 | 2 | public function __construct( |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Render an image from a ciff file located on the filesystem. |
||
| 53 | * |
||
| 54 | * @param string $path |
||
| 55 | * @return Intervention\Image\Image |
||
|
|
|||
| 56 | */ |
||
| 57 | 1 | public function renderFile($path) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * Render an image from ciff data contained within a string. |
||
| 65 | * |
||
| 66 | * @param string $string |
||
| 67 | * @return Intervention\Image\Image |
||
| 68 | */ |
||
| 69 | 2 | public function renderString($string) |
|
| 79 | |||
| 80 | /** |
||
| 81 | * @param callable $fontResolver |
||
| 82 | */ |
||
| 83 | 2 | public function setFontResolver(callable $fontResolver) |
|
| 87 | |||
| 88 | /** |
||
| 89 | * @param callable $graphicResolver |
||
| 90 | */ |
||
| 91 | 2 | public function setGraphicResolver(callable $graphicResolver) |
|
| 95 | |||
| 96 | /** |
||
| 97 | * @return CiffRenderer |
||
| 98 | */ |
||
| 99 | public static function factory() |
||
| 107 | } |
||
| 108 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.