src/Composer/Util/SpdxLicense.php
public function getIdentifierByName($name)
    {
        foreach ($this->licenses as $identifier => $licenseData) {
            if ($licenseData[0] === $name) { // key 0 = fullname
                return $identifier;
            }
        }
    }
public function getIdentifierByName($name)
    {
        foreach ($this->licenses as $identifier => $licenseData) {
            if ($licenseData[0] === $name) { // key 0 = fullname
                return $identifier;
            }
        }
    }
public function getIdentifierByName ( $ name ) { foreach ( $ this -> licenses as $ identifier => $ licenseData ) { if ( $ licenseData [ 0 ] === $ name ) { // key 0 = fullname return $ identifier ; } } }
Returns the short identifier of a license by full name.

@param string $identifier

@return string
Returns the short identifier of a license by full name .