public function all(): Repository
    {
        if ($this->repository === null && !$this->restore()) {
            $this->repository = new Repository();
            $this->scan();
        }

        return $this->repository;
    }
public function all(): Repository
    {
        if ($this->repository === null && !$this->restore()) {
            $this->repository = new Repository();
            $this->scan();
        }

        return $this->repository;
    }
public function all ( ) : Repository { if ( $ this -> repository === null && ! $ this -> restore ( ) ) { $ this -> repository = new Repository ( ) ; $ this -> scan ( ) ; } return $ this -> repository ; }
Get all modules.

@return Repository
Get all modules .