Code Duplication    Length = 11-12 lines in 2 locations

src/svg/filter/ComponentTransfer.php 2 locations

@@ 157-167 (lines=11) @@
154
        }
155
    }
156
157
    public static function gamma(ContainerInterface $container, $amplitude, $exponent, $offset = 0, $filterId = null)
158
    {
159
        $config = ['id' => $filterId, 'type' => __FUNCTION__];
160
        self::buildConfig($config, [
161
            'amplitude' => $amplitude,
162
            'exponent'  => $exponent,
163
            'offset'    => $offset,
164
        ]);
165
166
        return self::createAndAppend($container, $config);
167
    }
168
169
    public static function brightness(ContainerInterface $container, $amount, $filterId = null)
170
    {
@@ 179-190 (lines=12) @@
176
        return self::createAndAppend($container, $config);
177
    }
178
179
    public static function contrast(ContainerInterface $container, $amount, $filterId = null)
180
    {
181
        $config = ['id' => $filterId, 'type' => 'linear'];
182
183
        $intercept = 0.5 - (0.5 * $amount);
184
        self::buildConfig($config, [
185
            'slope'     => $amount,
186
            'intercept' => $intercept,
187
        ]);
188
189
        return self::createAndAppend($container, $config);
190
    }
191
}