Code Duplication    Length = 18-18 lines in 2 locations

lib/private/legacy/image.php 2 locations

@@ 146-163 (lines=18) @@
143
	 *
144
	 * @return int
145
	 */
146
	public function widthTopLeft() {
147
		$o = $this->getOrientation();
148
		$this->logger->debug('OC_Image->widthTopLeft() Orientation: ' . $o, array('app' => 'core'));
149
		switch ($o) {
150
			case -1:
151
			case 1:
152
			case 2: // Not tested
153
			case 3:
154
			case 4: // Not tested
155
				return $this->width();
156
			case 5: // Not tested
157
			case 6:
158
			case 7: // Not tested
159
			case 8:
160
				return $this->height();
161
		}
162
		return $this->width();
163
	}
164
165
	/**
166
	 * Returns the height when the image orientation is top-left.
@@ 170-187 (lines=18) @@
167
	 *
168
	 * @return int
169
	 */
170
	public function heightTopLeft() {
171
		$o = $this->getOrientation();
172
		$this->logger->debug('OC_Image->heightTopLeft() Orientation: ' . $o, array('app' => 'core'));
173
		switch ($o) {
174
			case -1:
175
			case 1:
176
			case 2: // Not tested
177
			case 3:
178
			case 4: // Not tested
179
				return $this->height();
180
			case 5: // Not tested
181
			case 6:
182
			case 7: // Not tested
183
			case 8:
184
				return $this->width();
185
		}
186
		return $this->height();
187
	}
188
189
	/**
190
	 * Outputs the image.