Code Duplication    Length = 9-9 lines in 2 locations

includes/media/DjVu.php 1 location

@@ 92-100 (lines=9) @@
89
			// e.g. [[File:Foo.djvu|thumb|Page 3 of the document shows foo]]
90
			return false;
91
		}
92
		if ( in_array( $name, [ 'width', 'height', 'page' ] ) ) {
93
			if ( $value <= 0 ) {
94
				return false;
95
			} else {
96
				return true;
97
			}
98
		} else {
99
			return false;
100
		}
101
	}
102
103
	/**

includes/media/ImageHandler.php 1 location

@@ 43-51 (lines=9) @@
40
	}
41
42
	public function validateParam( $name, $value ) {
43
		if ( in_array( $name, [ 'width', 'height' ] ) ) {
44
			if ( $value <= 0 ) {
45
				return false;
46
			} else {
47
				return true;
48
			}
49
		} else {
50
			return false;
51
		}
52
	}
53
54
	public function makeParamString( $params ) {