original_string: public function getUpdatableThemes()
      {
          $items = [];
          $repository = $this->repository['themes'];
  
          // local cache to speed things up
          if (isset($this->cache[__METHOD__])) {
              return $this->cache[__METHOD__];
          }
  
          foreach ($this->installed['themes'] as $slug => $plugin) {
              if (!isset($repository[$slug]) || $plugin->symlink || !$plugin->version || $plugin->gpm === false) {
                  continue;
              }
  
              $local_version = $plugin->version ?: 'Unknown';
              $remote_version = $repository[$slug]->version;
  
              if (version_compare($local_version, $remote_version) < 0) {
                  $repository[$slug]->available = $remote_version;
                  $repository[$slug]->version = $local_version;
                  $repository[$slug]->type = $repository[$slug]->release_type;
                  $items[$slug] = $repository[$slug];
              }
          }
  
          $this->cache[__METHOD__] = $items;
  
          return $items;
      }
code: public function getUpdatableThemes()
      {
          $items = [];
          $repository = $this->repository['themes'];
  
          // local cache to speed things up
          if (isset($this->cache[__METHOD__])) {
              return $this->cache[__METHOD__];
          }
  
          foreach ($this->installed['themes'] as $slug => $plugin) {
              if (!isset($repository[$slug]) || $plugin->symlink || !$plugin->version || $plugin->gpm === false) {
                  continue;
              }
  
              $local_version = $plugin->version ?: 'Unknown';
              $remote_version = $repository[$slug]->version;
  
              if (version_compare($local_version, $remote_version) < 0) {
                  $repository[$slug]->available = $remote_version;
                  $repository[$slug]->version = $local_version;
                  $repository[$slug]->type = $repository[$slug]->release_type;
                  $items[$slug] = $repository[$slug];
              }
          }
  
          $this->cache[__METHOD__] = $items;
  
          return $items;
      }
code_tokens: public function getUpdatableThemes ( ) { $ items = [ ] ; $ repository = $ this -> repository [ 'themes' ] ; // local cache to speed things up if ( isset ( $ this -> cache [ __METHOD__ ] ) ) { return $ this -> cache [ __METHOD__ ] ; } foreach ( $ this -> installed [ 'themes' ] as $ slug => $ plugin ) { if ( ! isset ( $ repository [ $ slug ] ) || $ plugin -> symlink || ! $ plugin -> version || $ plugin -> gpm === false ) { continue ; } $ local_version = $ plugin -> version ? : 'Unknown' ; $ remote_version = $ repository [ $ slug ] -> version ; if ( version_compare ( $ local_version , $ remote_version ) < 0 ) { $ repository [ $ slug ] -> available = $ remote_version ; $ repository [ $ slug ] -> version = $ local_version ; $ repository [ $ slug ] -> type = $ repository [ $ slug ] -> release_type ; $ items [ $ slug ] = $ repository [ $ slug ] ; } } $ this -> cache [ __METHOD__ ] = $ items ; return $ items ; }
docstring: Returns an array of Themes that can be updated.
  The Themes are extended with the `available` property that relies to the remote version
  @return array Array of updatable Themes
docstring_tokens: Returns an array of Themes that can be updated . The Themes are extended with the available property that relies to the remote version