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

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