Code Duplication    Length = 14-14 lines in 2 locations

lib/backend.php 1 location

@@ 84-97 (lines=14) @@
81
			$DOM->loadHTML($html);
82
			$items = $DOM->getElementsByTagName('meta');
83
			$isEvernote = false;
84
			for ($i = 0; $i < $items->length; $i++) {
85
				$item = $items->item($i);
86
				if ($item->hasAttributes()) {
87
					$attrs = $item->attributes;
88
					foreach ($attrs as $a => $attr) {
89
						if ($attr->name == "name") {
90
							if ($attr->value == "exporter-version" || $attr->value == "Generator") {
91
								$isEvernote = true;
92
								continue;
93
							}
94
						}
95
					}
96
				}
97
			}
98
			if ($isEvernote) {
99
				$items = $DOM->getElementsByTagName('img');
100
				$isEvernote = false;

lib/Utility/Evernote.php 1 location

@@ 44-57 (lines=14) @@
41
			$DOM->loadHTML($html);
42
			$items = $DOM->getElementsByTagName('meta');
43
			$isEvernote = false;
44
			for ($i = 0; $i < $items->length; $i++) {
45
				$item = $items->item($i);
46
				if ($item->hasAttributes()) {
47
					$attrs = $item->attributes;
48
					foreach ($attrs as $a => $attr) {
49
						if ($attr->name == "name") {
50
							if ($attr->value == "exporter-version" || $attr->value == "Generator") {
51
								$isEvernote = true;
52
								continue;
53
							}
54
						}
55
					}
56
				}
57
			}
58
			if ($isEvernote) {
59
				$items = $DOM->getElementsByTagName('img');
60
				$isEvernote = false;