$defaults =
[ 'name' => 'file.txt',
'contents' => null,
'mode' => null,
'type' => null,
'relativePath' => null,
'relativePathname' => null,
];
$defaults =
array_merge($defaults,
$param);
parent::
__construct($defaults['name'
]);
$this->
setContents($defaults['contents'
]);
$this->
setMode($defaults['mode'
]);
$this->
setType($defaults['type'
]);
$this->
setRelativePath($defaults['relativePath'
]);
$this->
setRelativePathname($defaults['relativePathname'
]);
} else { throw new \
RuntimeException(sprintf('Incorrect parameter "%s"',
$param));
} } public function isFile(): bool
{ if (null ===
$this->type
) {