The expression return static::instance could return the type null which is incompatible with the type-hinted return kalanis\kw_mapper\Storage\File\FilesSingleton. Consider adding an additional type-check to rule them out.
Loading history...
26
}
27
28
1
protected function __construct()
29
{
30
1
}
31
32
/**
33
* @codeCoverageIgnore why someone would run that?!
34
*/
35
private function __clone()
36
{
37
}
38
39
7
public function setFileAccessor(?IProcessFiles $files): void
40
{
41
7
$this->filesAccessor = $files;
42
}
43
44
/**
45
* @throws MapperException
46
* @return IProcessFiles
47
*/
48
7
public function getFilesAccessor(): IProcessFiles
49
{
50
7
if (empty($this->filesAccessor)) {
51
1
throw new MapperException('You must set the files accessor - instance of *IProcessFiles* - first!');