1 | <?php |
||
18 | class Content implements ContentInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var null|string |
||
22 | */ |
||
23 | private $content = null; |
||
24 | |||
25 | /** |
||
26 | * Content constructor. |
||
27 | * |
||
28 | * @param string $content |
||
29 | */ |
||
30 | 20 | public function __construct($content) |
|
34 | |||
35 | /** |
||
36 | * @return string |
||
|
|||
37 | */ |
||
38 | 26 | public function get() |
|
42 | |||
43 | /** |
||
44 | * Return the content as an array |
||
45 | * |
||
46 | * @return array |
||
47 | * @throws \NeedleProject\FileIo\Exception\ContentException |
||
48 | */ |
||
49 | 4 | public function getArray() |
|
53 | |||
54 | /** |
||
55 | * @return mixed|\stdClass |
||
56 | * @throws \NeedleProject\FileIo\Exception\ContentException |
||
57 | */ |
||
58 | 4 | public function getObject() |
|
62 | } |
||
63 |
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.