original_string: protected function getContractNamespace($withApp = true)
      {
          // get path from settings
          $path = config('generators.settings.contract.namespace') . '\\';
  
          // dont add the default namespace if specified not to in config
          $path .= str_replace('/', '\\', $this->getArgumentPath());
  
          $pieces = array_map('ucfirst', explode('/', $path));
  
          $namespace = ($withApp === true ? $this->getAppNamespace() : '') . implode('\\', $pieces);
  
          $namespace = rtrim(ltrim(str_replace('\\\\', '\\', $namespace), '\\'), '\\');
  
          return $namespace;
      }
code: protected function getContractNamespace($withApp = true)
      {
          // get path from settings
          $path = config('generators.settings.contract.namespace') . '\\';
  
          // dont add the default namespace if specified not to in config
          $path .= str_replace('/', '\\', $this->getArgumentPath());
  
          $pieces = array_map('ucfirst', explode('/', $path));
  
          $namespace = ($withApp === true ? $this->getAppNamespace() : '') . implode('\\', $pieces);
  
          $namespace = rtrim(ltrim(str_replace('\\\\', '\\', $namespace), '\\'), '\\');
  
          return $namespace;
      }
code_tokens: protected function getContractNamespace ( $ withApp = true ) { // get path from settings $ path = config ( 'generators.settings.contract.namespace' ) . '\\' ; // dont add the default namespace if specified not to in config $ path .= str_replace ( '/' , '\\' , $ this -> getArgumentPath ( ) ) ; $ pieces = array_map ( 'ucfirst' , explode ( '/' , $ path ) ) ; $ namespace = ( $ withApp === true ? $ this -> getAppNamespace ( ) : '' ) . implode ( '\\' , $ pieces ) ; $ namespace = rtrim ( ltrim ( str_replace ( '\\\\' , '\\' , $ namespace ) , '\\' ) , '\\' ) ; return $ namespace ; }
docstring: Get the namespace of where contract was created
  @param bool $withApp
  @return string
docstring_tokens: Get the namespace of where contract was created