Code Duplication    Length = 10-10 lines in 2 locations

lib/private/Encryption/Update.php 2 locations

@@ 85-94 (lines=10) @@
82
	 *
83
	 * @param array $params
84
	 */
85
	public function postShared($params) {
86
		if ($this->encryptionManager->isEnabled()) {
87
			if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
88
				$path = Filesystem::getPath($params['fileSource']);
89
				list($owner, $ownerPath) = $this->getOwnerPath($path);
90
				$absPath = '/' . $owner . '/files/' . $ownerPath;
91
				$this->update($absPath);
92
			}
93
		}
94
	}
95
96
	/**
97
	 * hook after file was unshared
@@ 101-110 (lines=10) @@
98
	 *
99
	 * @param array $params
100
	 */
101
	public function postUnshared($params) {
102
		if ($this->encryptionManager->isEnabled()) {
103
			if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
104
				$path = Filesystem::getPath($params['fileSource']);
105
				list($owner, $ownerPath) = $this->getOwnerPath($path);
106
				$absPath = '/' . $owner . '/files/' . $ownerPath;
107
				$this->update($absPath);
108
			}
109
		}
110
	}
111
112
	/**
113
	 * inform encryption module that a file was restored from the trash bin,