original_string: protected static function createInstance($className, $parentClassName = '', $createAll = false)
      {
          $className = self::cleanName($className);
  
          try {
              $dependencies = self::getDependenciesFor($className, $createAll);
          } catch (\Parable\DI\Exception $e) {
              $message = $e->getMessage();
              if ($parentClassName) {
                  $message .= ", required by '{$parentClassName}'";
              }
              throw new \Parable\DI\Exception($message);
          }
          return new $className(...$dependencies);
      }
code: protected static function createInstance($className, $parentClassName = '', $createAll = false)
      {
          $className = self::cleanName($className);
  
          try {
              $dependencies = self::getDependenciesFor($className, $createAll);
          } catch (\Parable\DI\Exception $e) {
              $message = $e->getMessage();
              if ($parentClassName) {
                  $message .= ", required by '{$parentClassName}'";
              }
              throw new \Parable\DI\Exception($message);
          }
          return new $className(...$dependencies);
      }
code_tokens: protected static function createInstance ( $ className , $ parentClassName = '' , $ createAll = false ) { $ className = self :: cleanName ( $ className ) ; try { $ dependencies = self :: getDependenciesFor ( $ className , $ createAll ) ; } catch ( \ Parable \ DI \ Exception $ e ) { $ message = $ e -> getMessage ( ) ; if ( $ parentClassName ) { $ message .= ", required by '{$parentClassName}'" ; } throw new \ Parable \ DI \ Exception ( $ message ) ; } return new $ className ( ... $ dependencies ) ; }
docstring: Instantiate a class and fulfill its dependency requirements.
  
  @param string $className
  @param string $parentClassName
  @param bool   $createAll
  
  @return mixed
  @throws \Parable\DI\Exception
docstring_tokens: Instantiate a class and fulfill its dependency requirements .