Code Duplication    Length = 12-12 lines in 2 locations

lib/utils/temporaryphoto/filesystem.php 1 location

@@ 42-53 (lines=12) @@
39
	 */
40
	protected $path;
41
42
	public function __construct(ICache $cache, $path) {
43
		\OCP\Util::writeLog('contacts', __METHOD__.' path: ' . $path, \OCP\Util::DEBUG);
44
		if (!is_string($path)) {
45
			throw new \Exception(
46
				__METHOD__ . ' Second argument must a string'
47
			);
48
		}
49
50
		parent::__construct($cache);
51
		$this->path = $path;
52
		$this->processImage();
53
	}
54
55
	/**
56
	 * Load the image.

lib/utils/temporaryphoto/uploaded.php 1 location

@@ 43-54 (lines=12) @@
40
	 */
41
	protected $request;
42
43
	public function __construct(ICache $cache, IRequest $request) {
44
		\OCP\Util::writeLog('contacts', __METHOD__, \OCP\Util::DEBUG);
45
		if (!$request instanceOf IRequest) {
46
			throw new \Exception(
47
				__METHOD__ . ' Second argument must be an instance of \\OCP\\IRequest'
48
			);
49
		}
50
51
		parent::__construct($cache);
52
		$this->request = $request;
53
		$this->processImage();
54
	}
55
56
	/**
57
	 * Load the image.