1 | <?php |
||
23 | class LocalFile extends FileNode implements LocalFileNodeInterface, NodeStreamInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $compression; |
||
29 | |||
30 | /** |
||
31 | * @var string|null |
||
32 | */ |
||
33 | protected $encoding; |
||
34 | |||
35 | /** |
||
36 | * @param string $path |
||
37 | */ |
||
38 | 109 | public function __construct($path) |
|
45 | |||
46 | /** |
||
47 | * @return string |
||
|
|||
48 | */ |
||
49 | 14 | public function getEncoding() |
|
53 | |||
54 | /** |
||
55 | * @param string $encoding |
||
56 | * |
||
57 | * @return $this |
||
58 | */ |
||
59 | 15 | public function setEncoding($encoding) |
|
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 20 | public function getContents() |
|
84 | |||
85 | /** |
||
86 | * @return string - see CompressionFactory |
||
87 | */ |
||
88 | 31 | public function getCompression() |
|
92 | |||
93 | /** |
||
94 | * @param string $compression - @see CompressionFactory |
||
95 | * |
||
96 | * @return $this |
||
97 | */ |
||
98 | 22 | public function setCompression($compression) |
|
104 | |||
105 | /** |
||
106 | * Get a stream for the given node |
||
107 | * |
||
108 | * @param string $mode |
||
109 | * |
||
110 | * @return StreamInterface |
||
111 | */ |
||
112 | 1 | public function getStream($mode = 'c+') |
|
116 | } |
||
117 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.