Code Duplication    Length = 3-3 lines in 3 locations

lib/Controller/FileHandlingController.php 3 locations

@@ 86-88 (lines=3) @@
83
				/** @var File $file */
84
				$file = $this->userFolder->get($path);
85
86
				if ($file instanceof Folder) {
87
					return new DataResponse(['message' => $this->l->t('You can not open a folder')], Http::STATUS_BAD_REQUEST);
88
				}
89
90
				// default of 4MB
91
				$maxSize = 4194304;
@@ 92-94 (lines=3) @@
89
90
				// default of 4MB
91
				$maxSize = 4194304;
92
				if ($file->getSize() > $maxSize) {
93
					return new DataResponse(['message' => (string)$this->l->t('This file is too big to be opened. Please download the file instead.')], Http::STATUS_BAD_REQUEST);
94
				}
95
				$fileContents = $file->getContent();
96
				if ($fileContents !== false) {
97
					$writable = $file->isUpdateable();
@@ 153-155 (lines=3) @@
150
				/** @var File $file */
151
				$file = $this->userFolder->get($path);
152
153
				if ($file instanceof Folder) {
154
					return new DataResponse(['message' => $this->l->t('You can not write to a folder')], Http::STATUS_BAD_REQUEST);
155
				}
156
157
				// Get file mtime
158
				$filemtime = $file->getMTime();