validator->validateDelete($this->reader->readDelete($path)); } /** * @throws LocalizedException */ public function run(string $path): array { $result = $this->validate($path); if (!$result['valid']) { throw new LocalizedException(__('Validation failed. No prices were deleted.')); } if ($result['groups'] === []) { throw new LocalizedException(__('There are no existing configurable products to delete.')); } return $this->attributeWriter->write($result['groups'], true); } }