/** * Can this file be modified by this modifier * * @param FileNodeInterface $file * * @return bool */ public function canModify(FileNodeInterface $file) { return $file->exists() && $file instanceof FormatAwareInterface && $file->getFormat() !== null && $this->parserFactory->getParser($file->getFormat()) !== null; }
/** * Can this file be modified by this modifier * * @param FileNodeInterface $file * * @return bool */ public function canModify(FileNodeInterface $file) { return $file instanceof LocalFile && $file->exists(); }