1 | <?php |
||
22 | class File implements ReaderInterface |
||
23 | { |
||
24 | /** |
||
25 | * The file |
||
26 | * |
||
27 | * @var string |
||
28 | **/ |
||
29 | private $file; |
||
30 | |||
31 | /** |
||
32 | * Constructor |
||
33 | * |
||
34 | * @param string $file version file |
||
35 | * @return void |
||
|
|||
36 | **/ |
||
37 | public function __construct($file) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | **/ |
||
45 | public function canRead($directory) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | **/ |
||
53 | public function read($directory) |
||
57 | |||
58 | /** |
||
59 | * Get the file |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getFile() |
||
67 | |||
68 | /** |
||
69 | * Set the file |
||
70 | * |
||
71 | * @param string $file |
||
72 | * @return parent |
||
73 | */ |
||
74 | public function setFile($file) |
||
80 | |||
81 | } |
||
82 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.