1 | <?php |
||
14 | abstract class AbstractResourceReader implements ResourceReaderInterface |
||
15 | { |
||
16 | /** @var resource|bool */ |
||
17 | protected $FileResource = false; |
||
18 | |||
19 | /** |
||
20 | * @param resource|bool $resource |
||
21 | */ |
||
22 | 8 | public function __construct($resource = false) |
|
28 | |||
29 | public function __destruct() |
||
33 | |||
34 | /** |
||
35 | * @param resource $resource |
||
36 | * @throws \RuntimeException |
||
37 | */ |
||
38 | 6 | public function setResource($resource) |
|
48 | |||
49 | 6 | protected function closeResource() |
|
55 | |||
56 | abstract public function readHeader(); |
||
57 | |||
58 | /** |
||
59 | * @param int $row |
||
60 | * @param int $col |
||
61 | * @return int|bool elevation [m] can be false if nothing retrieved or value is unknown |
||
62 | */ |
||
63 | abstract public function getElevationFor($row, $col); |
||
64 | } |
||
65 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.