private function validateHash($firstHash, $secondHash)
    {
        // Empty hash will always return false, because they are no validatable
        if (empty($firstHash) || empty($secondHash)) {
            throw new InvalidArgumentException('FlysystemAssetStore::validateHash can not validate empty hashes');
        }
        // Return true if $firstHash start with $secondHash or if $secondHash starts with $firstHash
        return
            strpos($firstHash, $secondHash) === 0 ||
            strpos($secondHash, $firstHash) === 0;
    }
private function validateHash($firstHash, $secondHash)
    {
        // Empty hash will always return false, because they are no validatable
        if (empty($firstHash) || empty($secondHash)) {
            throw new InvalidArgumentException('FlysystemAssetStore::validateHash can not validate empty hashes');
        }
        // Return true if $firstHash start with $secondHash or if $secondHash starts with $firstHash
        return
            strpos($firstHash, $secondHash) === 0 ||
            strpos($secondHash, $firstHash) === 0;
    }
private function validateHash ( $ firstHash , $ secondHash ) { // Empty hash will always return false, because they are no validatable if ( empty ( $ firstHash ) || empty ( $ secondHash ) ) { throw new InvalidArgumentException ( 'FlysystemAssetStore::validateHash can not validate empty hashes' ) ; } // Return true if $firstHash start with $secondHash or if $secondHash starts with $firstHash return strpos ( $ firstHash , $ secondHash ) === 0 || strpos ( $ secondHash , $ firstHash ) === 0 ; }
Validate that the provided hashes are equivalent. Partial hashes can be provided.
@param string $firstHash
@param string $secondHash
@return bool
Validate that the provided hashes are equivalent . Partial hashes can be provided .