Code Duplication    Length = 11-11 lines in 2 locations

src/Adapters/Cloudinary/CloudinaryImageTransformation.php 1 location

@@ 193-203 (lines=11) @@
190
     *
191
     * @param array $properties
192
     */
193
    public function __construct(array $properties)
194
    {
195
        foreach ($properties as $property => $value) {
196
            $setter = 'set' . ucfirst($properties);
197
            if (method_exists($this, $setter)) {
198
                $this->$property = $this->$setter($value);
199
            } else {
200
                $this->$property = $value;
201
            }
202
        }
203
    }
204
205
206
    /**

src/Adapters/Cloudinary/CloudinaryUploadParameters.php 1 location

@@ 208-218 (lines=11) @@
205
     *
206
     * @param array $properties
207
     */
208
    public function __construct(array $properties)
209
    {
210
        foreach ($properties as $property => $value) {
211
            $setter = 'set' . ucfirst($properties);
212
            if (method_exists($this, $setter)) {
213
                $this->$property = $this->$setter($value);
214
            } else {
215
                $this->$property = $value;
216
            }
217
        }
218
    }
219
220
221
    /**