Completed
Push — master ( dfc8a8...b88b69 )
by Yann
02:12
created
src/Converters/HTML/GenericHTMLConverter.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use OpenMindParser\Converters\Model\AbstractConverter;
6 6
 use OpenMindParser\Models\Document;
7 7
 use OpenMindParser\Models\Node;
8
-use OpenMindParser\Parser;
9 8
 use \DOMDocument;
10 9
 
11 10
 /*A singleton to convert a document tree (object Document) in a HTML tree following few options.*/
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,7 @@
 block discarded – undo
97 97
 			$domElementC = $this->buildElement($document, $options[HTML_CONVERTER_MAIN_TAG_KEY][2]);
98 98
 			$domElementC->appendChild($text);
99 99
 			$domElementB->appendChild($domElementC);
100
-		}
101
-		else {
100
+		} else {
102 101
 			$domElementB->appendChild($text);
103 102
 		}
104 103
 		
Please login to merge, or discard this patch.
src/Models/Node.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use \DOMNode;
6 6
 use \DOMElement;
7 7
 use \DOMNamedNodeMap;
8
-use OpenMindParser\Exceptions\InvalidNodeNameException;
9 8
 
10 9
 /*Object that represent a Node as the tag element in the openMind file.*/
11 10
 class Node 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -363,11 +363,9 @@
 block discarded – undo
363 363
 					$newValue[] = $node->toArray();
364 364
 				}
365 365
 				$value = $newValue;
366
-			}
367
-			elseif($value instanceof Icon) {
366
+			} elseif($value instanceof Icon) {
368 367
 				$value = $value->getFilePath();
369
-			}
370
-			elseif($value instanceof DOMElement) {
368
+			} elseif($value instanceof DOMElement) {
371 369
 				return;
372 370
 			}
373 371
 			$array[$key] = $value;
Please login to merge, or discard this patch.
src/Converters/Model/AbstractConverter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
 	public function convert($data, $options = []) {
23 23
 		if(!is_string($data) && !($data instanceof Document)) {
24 24
 			throw new InvalidArgumentException('The $data variable must be of type "string" (the file path), or an instance of "Document".');
25
-		}
26
-		elseif(!is_array($options)) {
25
+		} elseif(!is_array($options)) {
27 26
 			throw new InvalidArgumentException('The $options variable must be and array.');
28 27
 		}
29 28
 		
Please login to merge, or discard this patch.
src/Parser.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,11 +97,9 @@
 block discarded – undo
97 97
 		foreach($domNode->childNodes as $childNode) {
98 98
 			if($childNode->nodeName === self::NODE_NODENAME) {
99 99
 				$children->add($this->fillNode($childNode));
100
-			}
101
-			elseif($childNode->nodeName === self::FONT_NODENAME) {
100
+			} elseif($childNode->nodeName === self::FONT_NODENAME) {
102 101
 				$this->fillNodeAttributes($childNode->attributes, self::$fontAvailableAttributes, $node);
103
-			}
104
-			elseif($childNode->nodeName === self::ICON_NODENAME) {
102
+			} elseif($childNode->nodeName === self::ICON_NODENAME) {
105 103
 				foreach($childNode->attributes as $attribute) {
106 104
 					if(array_key_exists($attribute->nodeName, self::$iconAvailableAttributes)) {
107 105
 						$node->setIcon(new Icon($attribute->nodeValue));
Please login to merge, or discard this patch.
src/Models/Document.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,8 +150,7 @@
 block discarded – undo
150 150
 		$sorter = function($value, $key) use(&$array) {
151 151
 			if($value instanceof Node) {
152 152
 				$value = $value->toArray();
153
-			}
154
-			elseif($value instanceof DOMDocument) {
153
+			} elseif($value instanceof DOMDocument) {
155 154
 				return;
156 155
 			}
157 156
 			$array[$key] = $value;
Please login to merge, or discard this patch.
usage/SampleGenericHTMLConverter.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use OpenMindParser\Converters\Model\AbstractConverter;
6 6
 use OpenMindParser\Models\Document;
7 7
 use OpenMindParser\Models\Node;
8
-use OpenMindParser\Parser;
9 8
 use \DOMDocument;
10 9
 
11 10
 /*A singleton to convert a document tree (object Document) in a HTML tree following few options.*/
Please login to merge, or discard this patch.