1 | <?php |
||
18 | class DocumentRepository |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $basePath; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $documents = []; |
||
29 | |||
30 | /** |
||
31 | * @var Cache |
||
32 | */ |
||
33 | private $cache; |
||
34 | |||
35 | /** |
||
36 | * Initializes a new Repository. |
||
37 | * |
||
38 | * @param string $basePath |
||
39 | * @param Cache $cache |
||
40 | */ |
||
41 | public function __construct($basePath = null, Cache $cache = null) |
||
46 | |||
47 | /** |
||
48 | * @param string $documentPath |
||
49 | * |
||
50 | * @return SwaggerDocument |
||
51 | */ |
||
52 | public function get($documentPath) |
||
66 | |||
67 | /** |
||
68 | * @param string $documentPath |
||
69 | * |
||
70 | * @return SwaggerDocument |
||
71 | * @throws ResourceNotReadableException |
||
72 | */ |
||
73 | private function load($documentPath) |
||
93 | } |
||
94 |
This check looks at variables that 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.