1 | <?php |
||
14 | class FontsFactory |
||
15 | { |
||
16 | /** @var array */ |
||
17 | protected $fonts = array(); |
||
18 | |||
19 | /** |
||
20 | * Initialize the FontsFactory. |
||
21 | * |
||
22 | * If $isFontPath is true then the first parameter is considered as a path to |
||
23 | * a directory containing the fonts. This directory is scanned for TTF and OTF |
||
24 | * fonts. |
||
25 | * |
||
26 | * If $isFontPath is false, then the first parameter is must contain a path to |
||
27 | * a TTF/ODF font, or must be an array of those paths. |
||
28 | * |
||
29 | * @param string|array $fontsPath |
||
|
|||
30 | * @param bool $isFontPath |
||
31 | */ |
||
32 | 14 | protected function __construct($fonts, $isFontPath = true) |
|
44 | |||
45 | /** |
||
46 | * @param string $fonts |
||
47 | * @param bool $isFontPath |
||
48 | * @return FontsFactory |
||
49 | */ |
||
50 | 14 | public static function create($fonts, $isFontPath = true) |
|
54 | |||
55 | /** |
||
56 | * @param string $fontsPath |
||
57 | */ |
||
58 | 12 | public function loadFonts($fontsPath) |
|
65 | |||
66 | /** |
||
67 | * @param string $filename |
||
68 | */ |
||
69 | 14 | protected function addFont($filename) |
|
75 | |||
76 | /** |
||
77 | * @param string $name |
||
78 | * @return Font |
||
79 | * @throws \InvalidArgumentException |
||
80 | */ |
||
81 | 13 | public function getFont($name) |
|
86 | |||
87 | /** |
||
88 | * @param string $name |
||
89 | * @param int $size |
||
90 | * @param string $color |
||
91 | * @return ImagineFont |
||
92 | */ |
||
93 | 13 | public function getImagineFont($name, $size, $color = '#000000') |
|
98 | |||
99 | /** |
||
100 | * @return array |
||
101 | */ |
||
102 | public function getFonts() |
||
106 | } |
||
107 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.