Code Duplication    Length = 9-11 lines in 2 locations

src/svg/filter/ComponentTransfer.php 2 locations

@@ 129-139 (lines=11) @@
126
        return $val;
127
    }
128
129
    public static function linear(ContainerInterface $container, $slope, $intercept, $filterId = null)
130
    {
131
        $config = ['id' => $filterId, 'type' => __FUNCTION__];
132
133
        self::buildConfig($config, [
134
            'slope'     => $slope,
135
            'intercept' => $intercept,
136
        ]);
137
138
        return self::createAndAppend($container, $config);
139
    }
140
141
    private static function buildConfig(array &$config, array $attributes)
142
    {
@@ 169-177 (lines=9) @@
166
        return self::createAndAppend($container, $config);
167
    }
168
169
    public static function brightness(ContainerInterface $container, $amount, $filterId = null)
170
    {
171
        $config = ['id' => $filterId, 'type' => 'linear'];
172
        self::buildConfig($config, [
173
            'slope' => $amount,
174
        ]);
175
176
        return self::createAndAppend($container, $config);
177
    }
178
179
    public static function contrast(ContainerInterface $container, $amount, $filterId = null)
180
    {