Crypt/GPG/Key.php
public function canSign()
    {
        $canSign = false;
        foreach ($this->_subKeys as $subKey) {
            if ($subKey->canSign()) {
                $canSign = true;
                break;
            }
        }
        return $canSign;
    }
public function canSign()
    {
        $canSign = false;
        foreach ($this->_subKeys as $subKey) {
            if ($subKey->canSign()) {
                $canSign = true;
                break;
            }
        }
        return $canSign;
    }
Gets whether or not this key can sign data

This key can sign data if any sub-key of this key can sign data.

@return boolean true if this key can sign data and false if this key
cannot sign data.