original_string: public function getSortedProductionVersions($descending = false)
      {
          $versions = [];
          foreach ($this->getVersions() as $v) {
              if (strpos($v->getVersion(), Package\Version::DEV_PREFIX) !== 0) {
                  $versions[] = $v;
              }
          }
          usort($versions, function (Package\Version $a, Package\Version $b) use ($descending) {
              return version_compare($a->getVersion(), $b->getVersion()) * ($descending ? -1 : 1);
          });
  
          return $versions;
      }
code: public function getSortedProductionVersions($descending = false)
      {
          $versions = [];
          foreach ($this->getVersions() as $v) {
              if (strpos($v->getVersion(), Package\Version::DEV_PREFIX) !== 0) {
                  $versions[] = $v;
              }
          }
          usort($versions, function (Package\Version $a, Package\Version $b) use ($descending) {
              return version_compare($a->getVersion(), $b->getVersion()) * ($descending ? -1 : 1);
          });
  
          return $versions;
      }
code_tokens: public function getSortedProductionVersions ( $ descending = false ) { $ versions = [ ] ; foreach ( $ this -> getVersions ( ) as $ v ) { if ( strpos ( $ v -> getVersion ( ) , Package \ Version :: DEV_PREFIX ) !== 0 ) { $ versions [ ] = $ v ; } } usort ( $ versions , function ( Package \ Version $ a , Package \ Version $ b ) use ( $ descending ) { return version_compare ( $ a -> getVersion ( ) , $ b -> getVersion ( ) ) * ( $ descending ? - 1 : 1 ) ; } ) ; return $ versions ; }
docstring: Get the production versions, sorted in ascending or descending order.
  
  @param bool $descending
  
  @return \CommunityTranslation\Entity\Package\Version[]
docstring_tokens: Get the production versions sorted in ascending or descending order .