protected function isFormattingSpan(DOMElement $node)
	{
		if ($node->nodeName !== 'span')
		{
			return false;
		}

		if ($node->getAttribute('class') === '' && $node->getAttribute('style') === '')
		{
			return false;
		}

		foreach ($node->attributes as $attrName => $attribute)
		{
			if ($attrName !== 'class' && $attrName !== 'style')
			{
				return false;
			}
		}

		return true;
	}
protected function isFormattingSpan(DOMElement $node)
	{
		if ($node->nodeName !== 'span')
		{
			return false;
		}

		if ($node->getAttribute('class') === '' && $node->getAttribute('style') === '')
		{
			return false;
		}

		foreach ($node->attributes as $attrName => $attribute)
		{
			if ($attrName !== 'class' && $attrName !== 'style')
			{
				return false;
			}
		}

		return true;
	}
protected function isFormattingSpan ( DOMElement $ node ) { if ( $ node -> nodeName !== 'span' ) { return false ; } if ( $ node -> getAttribute ( 'class' ) === '' && $ node -> getAttribute ( 'style' ) === '' ) { return false ; } foreach ( $ node -> attributes as $ attrName => $ attribute ) { if ( $ attrName !== 'class' && $ attrName !== 'style' ) { return false ; } } return true ; }
Test whether given node is a span element used for formatting

Will return TRUE if the node is a span element with a class attribute and/or a style attribute
and no other attributes

@param  DOMElement $node
@return boolean
Test whether given node is a span element used for formatting