original_string: public function load()
      {
          $this->extensions = [];
          foreach ($this->getPackages() as $package) {
              [$v, $p] = explode('/', $package['name']);
              $extension = Extension::findBy([
                  'vendor' => $v,
                  'package' => $p
              ]);
              if (!$extension) {
                  $extension = (new Extension())
                      ->vendor($v)
                      ->package($p);
              }
              $extension
                  ->version($package['version'] ?? '')
                  ->description($package['description'] ?? '')
                  ->save();
              $this->extensions[] = $extension;
          }
          return $this;
      }
code: public function load()
      {
          $this->extensions = [];
          foreach ($this->getPackages() as $package) {
              [$v, $p] = explode('/', $package['name']);
              $extension = Extension::findBy([
                  'vendor' => $v,
                  'package' => $p
              ]);
              if (!$extension) {
                  $extension = (new Extension())
                      ->vendor($v)
                      ->package($p);
              }
              $extension
                  ->version($package['version'] ?? '')
                  ->description($package['description'] ?? '')
                  ->save();
              $this->extensions[] = $extension;
          }
          return $this;
      }
code_tokens: public function load ( ) { $ this -> extensions = [ ] ; foreach ( $ this -> getPackages ( ) as $ package ) { [ $ v , $ p ] = explode ( '/' , $ package [ 'name' ] ) ; $ extension = Extension :: findBy ( [ 'vendor' => $ v , 'package' => $ p ] ) ; if ( ! $ extension ) { $ extension = ( new Extension ( ) ) -> vendor ( $ v ) -> package ( $ p ) ; } $ extension -> version ( $ package [ 'version' ] ?? '' ) -> description ( $ package [ 'description' ] ?? '' ) -> save ( ) ; $ this -> extensions [ ] = $ extension ; } return $ this ; }
docstring: sync install packages with extension repository
  
  @return $this
docstring_tokens: sync install packages with extension repository