original_string: private static function getBaseNamespace()
      {
          // try to determine the namespace of the
          $composerFile = PSX_PATH_SRC . '/../composer.json';
          $composer = \json_decode(\file_get_contents($composerFile), true);
  
          if (isset($composer['autoload'])) {
              $paths = $composer['autoload']['psr-4'] ?? [];
              $base  = trim(key($paths), '\\');
  
              if (!empty($base)) {
                  return $base;
              }
          }
  
          throw new \RuntimeException('Could not determine the base namespace');
      }
code: private static function getBaseNamespace()
      {
          // try to determine the namespace of the
          $composerFile = PSX_PATH_SRC . '/../composer.json';
          $composer = \json_decode(\file_get_contents($composerFile), true);
  
          if (isset($composer['autoload'])) {
              $paths = $composer['autoload']['psr-4'] ?? [];
              $base  = trim(key($paths), '\\');
  
              if (!empty($base)) {
                  return $base;
              }
          }
  
          throw new \RuntimeException('Could not determine the base namespace');
      }
code_tokens: private static function getBaseNamespace ( ) { // try to determine the namespace of the $ composerFile = PSX_PATH_SRC . '/../composer.json' ; $ composer = \ json_decode ( \ file_get_contents ( $ composerFile ) , true ) ; if ( isset ( $ composer [ 'autoload' ] ) ) { $ paths = $ composer [ 'autoload' ] [ 'psr-4' ] ?? [ ] ; $ base = trim ( key ( $ paths ) , '\\' ) ; if ( ! empty ( $ base ) ) { return $ base ; } } throw new \ RuntimeException ( 'Could not determine the base namespace' ) ; }
docstring: This method tries to find the base namespace of the current app. We try
  to look at the composer.json file and use the first psr-4 autoload key
  
  @return string
docstring_tokens: This method tries to find the base namespace of the current app . We try to look at the composer . json file and use the first psr - 4 autoload key