/**
  * Resolves all of the arguments.  If you do not send an array of arguments
  * it will use the Definition Arguments.
  *
  * @param  array $args
  * @return array
  */
 protected function resolveArguments($args = [])
 {
     $args = empty($args) ? $this->arguments : $args;
     $resolvedArguments = [];
     foreach ($args as $arg) {
         if (is_string($arg) && ($this->container->isRegistered($arg) || $this->container->isSingleton($arg) || class_exists($arg))) {
             $resolvedArguments[] = $this->container->get($arg);
             continue;
         }
         $resolvedArguments[] = $arg;
     }
     return $resolvedArguments;
 }