/**
* Obtain the (optional) stop-file-config-file, it is placed in the folder of the stop-file, always
* prefixed with a dot: stop-file-folder/.n98-magerun2.yaml
*
* @param string $magerunStopFileFolder
* @return ConfigFile|null
*/
public function getStopFileConfigFile($magerunStopFileFolder)
{
if (empty($magerunStopFileFolder)) {
return;
}
$stopFileConfigFilePath = $magerunStopFileFolder . '/.' . $this->customConfigFilename;
if (!file_exists($stopFileConfigFilePath)) {
return;
}
try {
$stopFileConfigFile = ConfigFile::createFromFile($stopFileConfigFilePath);
$stopFileConfigFile->applyVariables($this->magentoRootFolder);
} catch (InvalidArgumentException $e) {
$stopFileConfigFile = null;
}
return $stopFileConfigFile;
}