objectManager = $objectManager; } /** * Create new instance of patch * * @param string $instanceName * @param array $arguments * @return PatchInterface */ public function create($instanceName, $arguments = []) { $patchInstance = $this->objectManager->create('\\' . $instanceName, $arguments); if (!$patchInstance instanceof PatchInterface) { throw new \InvalidArgumentException( sprintf( "%s should implement %s interface", $instanceName, PatchInterface::class ) ); } return $patchInstance; } }