src/Readability.php
public function _cleanClasses($node)
    {
        if ($node->getAttribute('class') !== '') {
            $node->removeAttribute('class');
        }

        for ($node = $node->firstChild; $node !== null; $node = $node->nextSibling) {
            $this->_cleanClasses($node);
        }
    }
public function _cleanClasses($node)
    {
        if ($node->getAttribute('class') !== '') {
            $node->removeAttribute('class');
        }

        for ($node = $node->firstChild; $node !== null; $node = $node->nextSibling) {
            $this->_cleanClasses($node);
        }
    }
public function _cleanClasses ( $ node ) { if ( $ node -> getAttribute ( 'class' ) !== '' ) { $ node -> removeAttribute ( 'class' ) ; } for ( $ node = $ node -> firstChild ; $ node !== null ; $ node = $ node -> nextSibling ) { $ this -> _cleanClasses ( $ node ) ; } }
Removes the class="" attribute from every element in the given
subtree.

Readability.js has a special filter to avoid cleaning the classes that the algorithm adds. We don't add classes
here so no need to filter those.

@param DOMDocument|DOMNode $node

@return void
Removes the class = attribute from every element in the given subtree .