Code Duplication    Length = 16-16 lines in 2 locations

source/Spiral/Validation/Checkers/ImageChecker.php 2 locations

@@ 119-134 (lines=16) @@
116
     *
117
     * @return bool
118
     */
119
    public function smaller($filename, int $width, int $height = null): bool
120
    {
121
        if (empty($image = $this->imageData($filename))) {
122
            return false;
123
        }
124
125
        if ($image[self::WIDTH] >= $width) {
126
            return false;
127
        }
128
129
        if (!empty($height) && $image[self::HEIGHT] >= $height) {
130
            return false;
131
        }
132
133
        return true;
134
    }
135
136
    /**
137
     * Check if image is bigger that specified rectangle (height check is optional).
@@ 145-160 (lines=16) @@
142
     *
143
     * @return bool
144
     */
145
    public function bigger($filename, int $width, int $height = null): bool
146
    {
147
        if (empty($image = $this->imageData($filename))) {
148
            return false;
149
        }
150
151
        if ($image[self::WIDTH] < $width) {
152
            return false;
153
        }
154
155
        if (!empty($height) && $image[self::HEIGHT] < $height) {
156
            return false;
157
        }
158
159
        return true;
160
    }
161
162
    /**
163
     * Internal method, return image details fetched by getimagesize() or false.