Completed
Push — master ( a5f7c5...d8a3e8 )
by Yann
01:58
created
src/Converters/HTML/GenericHTMLConverter.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -114,21 +114,20 @@  discard block
 block discarded – undo
114 114
 			]);
115 115
 		$domElementB = $this->buildElement($document, $options[self::MAIN_TAG_KEY][1]);
116 116
 		
117
-		if(!empty($node->getIcon()) && $options[self::MAIN_ICON_KEY][self::DISPLAY_ICON_KEY]) {
117
+		if (!empty($node->getIcon()) && $options[self::MAIN_ICON_KEY][self::DISPLAY_ICON_KEY]) {
118 118
 			$icon = $node->getIcon();
119 119
 			$domElementImg = $document->createElement('img');
120 120
 			$domElementImg->setAttribute(
121 121
 				'src', 
122 122
 				array_key_exists(self::PATH_ICON_KEY, $options[self::MAIN_ICON_KEY]) ? 
123
-					$options[self::MAIN_ICON_KEY][self::PATH_ICON_KEY].$icon->getFullName() :
124
-					$icon->getShortUri()
123
+					$options[self::MAIN_ICON_KEY][self::PATH_ICON_KEY].$icon->getFullName() : $icon->getShortUri()
125 124
 			);
126 125
 			$domElementImg->setAttribute('alt', $icon->getName());
127 126
 			$domElementB->appendChild($domElementImg);
128 127
 		}
129 128
 		
130 129
 		$text = $document->createTextNode($node->getText());
131
-		if(isset($options[self::MAIN_TAG_KEY][2])) {
130
+		if (isset($options[self::MAIN_TAG_KEY][2])) {
132 131
 			$domElementC = $this->buildElement($document, $options[self::MAIN_TAG_KEY][2]);
133 132
 			$domElementC->appendChild($text);
134 133
 			$domElementB->appendChild($domElementC);
@@ -139,7 +138,7 @@  discard block
 block discarded – undo
139 138
 		
140 139
 		$domElementA->appendChild($domElementB);
141 140
 		
142
-		foreach($node->getChildren() as $child) {
141
+		foreach ($node->getChildren() as $child) {
143 142
 			$domElementB->appendChild($this->buildHTMLTreeFromNode($document, $child, $options));
144 143
 		}
145 144
 		
@@ -156,7 +155,7 @@  discard block
 block discarded – undo
156 155
 	 */
157 156
 	private function buildElement(DOMDocument $document, array $description) {
158 157
 		$domElement = $document->createElement($description[self::TAG_KEY]);
159
-		foreach($description[self::ATTRIBUTES_KEY] as $name => $attribute) {
158
+		foreach ($description[self::ATTRIBUTES_KEY] as $name => $attribute) {
160 159
 			$domElement->setAttribute($name, $attribute);
161 160
 		}
162 161
 		
Please login to merge, or discard this patch.
src/Models/Icon.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 * @param String $extension : The extension of the icon file without the leading dot. If it is a builtin icon, then it is 'png'.
43 43
 	 */ 
44 44
 	public function __construct($name = null, $extension = null, $path = null, $shortUri = null, $size = null) {
45
-		if(!empty($name)) {
45
+		if (!empty($name)) {
46 46
 			$this->setIcon($name, $extension, $path, $shortUri, $size);
47 47
 		}
48 48
 	}
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		$this->shortUri = $shortUri ?: '/img/'.$this->fullName;
65 65
 		$this->path = $path ?: realpath(__DIR__.'/../../img/'.$this->fullName);
66 66
 		
67
-		if(!file_exists($this->path)) {
67
+		if (!file_exists($this->path)) {
68 68
 			throw new UnexistentFileException('The file '.$this->path.' does not exist !');
69 69
 		}
70 70
 		
Please login to merge, or discard this patch.