Code Duplication    Length = 6-7 lines in 2 locations

lib/private/Files/Storage/Wrapper/Encryption.php 2 locations

@@ 909-914 (lines=6) @@
906
	 */
907
	protected function getHeaderSize($path) {
908
		$headerSize = 0;
909
		if (!\is_resource($path)) {
910
			$realFile = $this->util->stripPartialFileExtension($path);
911
			if ($this->storage->file_exists($realFile)) {
912
				$path = $realFile;
913
			}
914
		}
915
		$firstBlock = $this->readFirstBlock($path);
916
917
		if (\substr($firstBlock, 0, \strlen(Util::HEADER_START)) === Util::HEADER_START) {
@@ 961-967 (lines=7) @@
958
	protected function getHeader($path) {
959
		if (\is_resource($path)) {
960
			$exists = false;
961
		} else {
962
			$realFile = $this->util->stripPartialFileExtension($path);
963
			$exists = $this->storage->file_exists($realFile);
964
			if ($exists) {
965
				$path = $realFile;
966
			}
967
		}
968
969
		$firstBlock = $this->readFirstBlock($path);
970
		$result = $this->parseRawHeader($firstBlock);