Code Duplication    Length = 20-20 lines in 2 locations

includes/filerepo/file/LocalFile.php 2 locations

@@ 707-726 (lines=20) @@
704
	 * @param int $page
705
	 * @return int
706
	 */
707
	public function getWidth( $page = 1 ) {
708
		$this->load();
709
710
		if ( $this->isMultipage() ) {
711
			$handler = $this->getHandler();
712
			if ( !$handler ) {
713
				return 0;
714
			}
715
			$dim = $handler->getPageDimensions( $this, $page );
716
			if ( $dim ) {
717
				return $dim['width'];
718
			} else {
719
				// For non-paged media, the false goes through an
720
				// intval, turning failure into 0, so do same here.
721
				return 0;
722
			}
723
		} else {
724
			return $this->width;
725
		}
726
	}
727
728
	/**
729
	 * Return the height of the image
@@ 734-753 (lines=20) @@
731
	 * @param int $page
732
	 * @return int
733
	 */
734
	public function getHeight( $page = 1 ) {
735
		$this->load();
736
737
		if ( $this->isMultipage() ) {
738
			$handler = $this->getHandler();
739
			if ( !$handler ) {
740
				return 0;
741
			}
742
			$dim = $handler->getPageDimensions( $this, $page );
743
			if ( $dim ) {
744
				return $dim['height'];
745
			} else {
746
				// For non-paged media, the false goes through an
747
				// intval, turning failure into 0, so do same here.
748
				return 0;
749
			}
750
		} else {
751
			return $this->height;
752
		}
753
	}
754
755
	/**
756
	 * Returns ID or name of user who uploaded the file