original_string: protected function registerServiceProvider($properties)
      {
          $namespace = $this->resolveNamespace($properties);
  
          $name = Str::studly(
              isset($properties['type']) ? $properties['type'] : 'package'
          );
  
          // The main service provider from a package should be named like:
          // AcmeCorp\Pages\Providers\PackageServiceProvider
  
          $provider = "{$namespace}\\Providers\\{$name}ServiceProvider";
  
          if (! class_exists($provider)) {
              // We will try to find the alternate service provider, named like:
              // AcmeCorp\Pages\PageServiceProvider
  
              $name = Str::singular(
                  $properties['basename']
              );
  
              if (! class_exists($provider = "{$namespace}\\{$name}ServiceProvider")) {
                  return;
              }
          }
  
          $this->app->register($provider);
      }
code: protected function registerServiceProvider($properties)
      {
          $namespace = $this->resolveNamespace($properties);
  
          $name = Str::studly(
              isset($properties['type']) ? $properties['type'] : 'package'
          );
  
          // The main service provider from a package should be named like:
          // AcmeCorp\Pages\Providers\PackageServiceProvider
  
          $provider = "{$namespace}\\Providers\\{$name}ServiceProvider";
  
          if (! class_exists($provider)) {
              // We will try to find the alternate service provider, named like:
              // AcmeCorp\Pages\PageServiceProvider
  
              $name = Str::singular(
                  $properties['basename']
              );
  
              if (! class_exists($provider = "{$namespace}\\{$name}ServiceProvider")) {
                  return;
              }
          }
  
          $this->app->register($provider);
      }
code_tokens: protected function registerServiceProvider ( $ properties ) { $ namespace = $ this -> resolveNamespace ( $ properties ) ; $ name = Str :: studly ( isset ( $ properties [ 'type' ] ) ? $ properties [ 'type' ] : 'package' ) ; // The main service provider from a package should be named like: // AcmeCorp\Pages\Providers\PackageServiceProvider $ provider = "{$namespace}\\Providers\\{$name}ServiceProvider" ; if ( ! class_exists ( $ provider ) ) { // We will try to find the alternate service provider, named like: // AcmeCorp\Pages\PageServiceProvider $ name = Str :: singular ( $ properties [ 'basename' ] ) ; if ( ! class_exists ( $ provider = "{$namespace}\\{$name}ServiceProvider" ) ) { return ; } } $ this -> app -> register ( $ provider ) ; }
docstring: Register the Package Service Provider.
  
  @param array $properties
  
  @return void
  
  @throws \Nova\Packages\FileMissingException
docstring_tokens: Register the Package Service Provider .