callable = $callable(...); return $this; } public function setArgs(array $args): Define\Repository\Factory { $this->args = $args; return $this; } /** * @return mixed * @throws EmptyResult */ public function run(): mixed { try { return call_user_func_array($this->callable, $this->args); } catch (Exception $exception) { throw new EmptyResult($exception->getMessage(), $exception); } } }