1 | <?php |
||
13 | class SerializerFactory |
||
14 | { |
||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | private $debug; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $configDir; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $cacheDir; |
||
29 | |||
30 | /** |
||
31 | * SerializerFactory constructor. |
||
32 | * |
||
33 | * @param bool $debug |
||
34 | * @param string $configDir |
||
35 | * @param string $cacheDir |
||
36 | */ |
||
37 | function __construct(bool $debug, string $configDir, string $cacheDir) |
||
43 | |||
44 | /** |
||
45 | * @return \JMS\Serializer\Serializer |
||
46 | */ |
||
47 | public function createSerializer() |
||
55 | } |
||
56 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.