original_string: protected function build(string $modelClass): IRepository
      {
          $repositoryClass = $this->registeredRepositories[$modelClass] ?? Repository::class;
  
          $parameters = [];
  
          if ($repositoryClass === Repository::class || is_subclass_of($repositoryClass, Repository::class)
          ) {
              $parameters = ['modelClass' => $modelClass];
          }
  
          return $this->container->make($repositoryClass, $parameters);
      }
code: protected function build(string $modelClass): IRepository
      {
          $repositoryClass = $this->registeredRepositories[$modelClass] ?? Repository::class;
  
          $parameters = [];
  
          if ($repositoryClass === Repository::class || is_subclass_of($repositoryClass, Repository::class)
          ) {
              $parameters = ['modelClass' => $modelClass];
          }
  
          return $this->container->make($repositoryClass, $parameters);
      }
code_tokens: protected function build ( string $ modelClass ) : IRepository { $ repositoryClass = $ this -> registeredRepositories [ $ modelClass ] ?? Repository :: class ; $ parameters = [ ] ; if ( $ repositoryClass === Repository :: class || is_subclass_of ( $ repositoryClass , Repository :: class ) ) { $ parameters = [ 'modelClass' => $ modelClass ] ; } return $ this -> container -> make ( $ repositoryClass , $ parameters ) ; }
docstring: Build repository by model class from registered instances or creates default.
  
  @param string $modelClass Model class
  
  @return IRepository
  
  @throws BindingResolutionException
docstring_tokens: Build repository by model class from registered instances or creates default .