<commit_before><?php

namespace kevintweber\PhpunitW3CValidators\Connector;

use kevintweber\PhpunitW3CValidators\Connector\HTMLConnector;

class HTMLW3CConnector extends HTMLConnector
{
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->setOutputType("soap12");
        $this->setUrl("http://validator.w3.org/");
    }

    protected function getPostVariables()
    {
        return array(
            'output' => $this->getOutputType(),
            'uploaded_file' => $this->getInput()
            );
    }

	/**
	 * Parses the SOAP 1.2 response.
	 *
	 * @todo Need to parse warnings and errors.
	 *
	 * @param string $result The SOAP 1.2 response.
	 */
    public function processResult($result)
    {
		$dom = new DOMDocument();
        if ($dom->loadXML($result)) {
			$validityElement = $dom->getElementsByTagName('validity');
            if ($validityElement->length && $validityElement->item(0)->nodeValue == 'true') {
				return true;
			}
		}

		return false;
    }
}<commit_msg>Fixed class namespace.<commit_after><?php

namespace kevintweber\PhpunitW3CValidators\Connector;

use kevintweber\PhpunitW3CValidators\Connector\HTMLConnector;

class HTMLW3CConnector extends HTMLConnector
{
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->setOutputType("soap12");
        $this->setUrl("http://validator.w3.org/");
    }

    protected function getPostVariables()
    {
        return array(
            'output' => $this->getOutputType(),
            'uploaded_file' => $this->getInput()
            );
    }

	/**
	 * Parses the SOAP 1.2 response.
	 *
	 * @todo Need to parse warnings and errors.
	 *
	 * @param string $result The SOAP 1.2 response.
	 */
    public function processResult($result)
    {
		$dom = new \DOMDocument();
        if ($dom->loadXML($result)) {
			$validityElement = $dom->getElementsByTagName('validity');
            if ($validityElement->length && $validityElement->item(0)->nodeValue == 'true') {
				return true;
			}
		}

		return false;
    }
}
{'fraction_non_alphanumeric': 0.13843175217812198, 'fraction_numerical': 0.010648596321393998, 'mean_word_length': 2.632688927943761, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6440492', 'n_tokens_mistral': 680, 'n_tokens_neox': 648, 'n_words': 124}