Code Duplication    Length = 6-6 lines in 2 locations

lib/utils/properties.php 2 locations

@@ 356-361 (lines=6) @@
353
			}
354
		}
355
356
		if (!$image->centerCrop()) {
357
			\OCP\Util::writeLog('contacts',
358
				__METHOD__ .'. Couldn\'t crop thumbnail for ID ' . $key,
359
				\OCP\Util::ERROR);
360
			return false;
361
		}
362
363
		if (!$image->resize(self::THUMBNAIL_SIZE)) {
364
			\OCP\Util::writeLog('contacts',
@@ 363-368 (lines=6) @@
360
			return false;
361
		}
362
363
		if (!$image->resize(self::THUMBNAIL_SIZE)) {
364
			\OCP\Util::writeLog('contacts',
365
				__METHOD__ . '. Couldn\'t resize thumbnail for ID ' . $key,
366
				\OCP\Util::ERROR);
367
			return false;
368
		}
369
370
		 // Cache as base64 for around a month
371
		$cache->set($key, strval($image), 3000000);