From db627f48c1bc40895bb133fd460c66c0102456cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20HULARD?= Date: Mon, 27 Feb 2017 14:21:51 +0100 Subject: [PATCH] Fix CS --- classes/extension.php | 72 +++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/classes/extension.php b/classes/extension.php index f99d9b8..e98bd84 100644 --- a/classes/extension.php +++ b/classes/extension.php @@ -31,46 +31,46 @@ public function setRunner(runner $runner) public function setTest(test $test) { $asserter = null; - $test->getAssertionManager() - ->setHandler( - 'xml', - function ($xml = null, $depth = null, $options = null) use ($test, & $asserter) { - if ($asserter === null) { - $asserter = new atoum\xml\asserters\node($test->getAsserterGenerator()); - } - if (null === $xml) { - throw new atoum\exceptions\logic("XML is undefined"); - } + $manager = $test->getAssertionManager(); + $manager->setHandler( + 'xml', + function ($xml = null, $depth = null, $options = null) use ($test, & $asserter) { + if ($asserter === null) { + $asserter = new atoum\xml\asserters\node($test->getAsserterGenerator()); + } + if (null === $xml) { + throw new atoum\exceptions\logic("XML is undefined"); + } - return $asserter - ->setWithTest($test) - ->setWith($xml, $depth, $options); + return $asserter + ->setWithTest($test) + ->setWith($xml, $depth, $options); + } + ); + $manager->setHandler( + 'html', + function ($html = null, $depth = null, $options = null) use ($test, & $asserter) { + if ($asserter === null) { + $asserter = new atoum\xml\asserters\node($test->getAsserterGenerator()); + } + if (null === $html) { + throw new atoum\exceptions\logic("HTML is undefined"); } - ) - ->setHandler( - 'html', - function ($html = null, $depth = null, $options = null) use ($test, & $asserter) { - if ($asserter === null) { - $asserter = new atoum\xml\asserters\node($test->getAsserterGenerator()); - } - if (null === $html) { - throw new atoum\exceptions\logic("HTML is undefined"); - } - $internalErrors = libxml_use_internal_errors(true); - $disableEntities = libxml_disable_entity_loader(true); - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->validateOnParse = true; - @$dom->loadHTML($html); - libxml_use_internal_errors($internalErrors); - libxml_disable_entity_loader($disableEntities); + $internalErrors = libxml_use_internal_errors(true); + $disableEntities = libxml_disable_entity_loader(true); + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->validateOnParse = true; + @$dom->loadHTML($html); + libxml_use_internal_errors($internalErrors); + libxml_disable_entity_loader($disableEntities); + + return $asserter + ->setWithTest($test) + ->setWith($dom, $depth, $options); + } + ); - return $asserter - ->setWithTest($test) - ->setWith($dom, $depth, $options); - } - ) - ; return $this; }