1 | <?php namespace Anomaly\Streams\Platform\Image; |
||
14 | class ImageMacros |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Registered macros. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $macros; |
||
23 | |||
24 | /** |
||
25 | * The service container. |
||
26 | * |
||
27 | * @var Container |
||
28 | */ |
||
29 | protected $container; |
||
30 | |||
31 | /** |
||
32 | * Create a new ImageMacros instance. |
||
33 | * |
||
34 | * @param Container $container |
||
35 | * @param Repository $config |
||
36 | */ |
||
37 | public function __construct(Repository $config, Container $container) |
||
42 | |||
43 | /** |
||
44 | * Run a macro. |
||
45 | * |
||
46 | * @param $macro |
||
47 | * @param Image $image |
||
48 | * @return Image |
||
49 | * @throws \Exception |
||
50 | */ |
||
51 | public function run($macro, Image $image) |
||
69 | |||
70 | /** |
||
71 | * Get the macros. |
||
72 | * |
||
73 | * @return array|mixed |
||
74 | */ |
||
75 | public function getMacros() |
||
79 | |||
80 | /** |
||
81 | * Set the macros. |
||
82 | * |
||
83 | * @param array $macros |
||
84 | * @return $this |
||
85 | */ |
||
86 | public function setMacros(array $macros) |
||
92 | |||
93 | /** |
||
94 | * Add an image macro hint. |
||
95 | * |
||
96 | * @param $namespace |
||
97 | * @param $macro |
||
98 | * @return $this |
||
99 | */ |
||
100 | public function addMacro($macro, $process) |
||
106 | |||
107 | /** |
||
108 | * Return if a macro exists or not. |
||
109 | * |
||
110 | * @param $macro |
||
111 | * @return bool |
||
112 | */ |
||
113 | public function isMacro($macro) |
||
117 | } |
||
118 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..