src/Composer/Package/BasePackage.php
public function getFullPrettyVersion($truncate = true)
    {
        if (!$this->isDev() || !in_array($this->getSourceType(), array('hg', 'git'))) {
            return $this->getPrettyVersion();
        }

        // if source reference is a sha1 hash -- truncate
        if ($truncate && strlen($this->getSourceReference()) === 40) {
            return $this->getPrettyVersion() . ' ' . substr($this->getSourceReference(), 0, 7);
        }

        return $this->getPrettyVersion() . ' ' . $this->getSourceReference();
    }
public function getFullPrettyVersion($truncate = true)
    {
        if (!$this->isDev() || !in_array($this->getSourceType(), array('hg', 'git'))) {
            return $this->getPrettyVersion();
        }

        // if source reference is a sha1 hash -- truncate
        if ($truncate && strlen($this->getSourceReference()) === 40) {
            return $this->getPrettyVersion() . ' ' . substr($this->getSourceReference(), 0, 7);
        }

        return $this->getPrettyVersion() . ' ' . $this->getSourceReference();
    }
public function getFullPrettyVersion ( $ truncate = true ) { if ( ! $ this -> isDev ( ) || ! in_array ( $ this -> getSourceType ( ) , array ( 'hg' , 'git' ) ) ) { return $ this -> getPrettyVersion ( ) ; } // if source reference is a sha1 hash -- truncate if ( $ truncate && strlen ( $ this -> getSourceReference ( ) ) === 40 ) { return $ this -> getPrettyVersion ( ) . ' ' . substr ( $ this -> getSourceReference ( ) , 0 , 7 ) ; } return $ this -> getPrettyVersion ( ) . ' ' . $ this -> getSourceReference ( ) ; }
{@inheritDoc}
{