Code Duplication    Length = 7-8 lines in 3 locations

src/Service/CfpFactory.php 3 locations

@@ 85-91 (lines=7) @@
82
        return $cfp;
83
    }
84
85
    public static function setName(Cfp $cfp, array $array)
86
    {
87
        if (! isset($array['name'])) {
88
            throw new \InvalidArgumentException('Name has to be specified');
89
        }
90
        $cfp->setName(filter_var($array['name'], FILTER_SANITIZE_STRING));
91
    }
92
93
    public static function setDateCfpStart(Cfp $cfp, array $array)
94
    {
@@ 184-191 (lines=8) @@
181
        $cfp->setIconUri(filter_var($array['iconUri'], FILTER_VALIDATE_URL));
182
    }
183
184
    public static function setDescription(Cfp $cfp, array $array)
185
    {
186
        if (! isset($array['description'])) {
187
            return;
188
        }
189
190
        $cfp->setDescription(filter_var($array['description'], FILTER_SANITIZE_STRING));
191
    }
192
193
    public static function setLocation(Cfp $cfp, array $array)
194
    {
@@ 193-200 (lines=8) @@
190
        $cfp->setDescription(filter_var($array['description'], FILTER_SANITIZE_STRING));
191
    }
192
193
    public static function setLocation(Cfp $cfp, array $array)
194
    {
195
        if (! isset($array['location'])) {
196
            return;
197
        }
198
199
        $cfp->setLocation(filter_var($array['location'], FILTER_SANITIZE_STRING));
200
    }
201
202
    public static function setGeolocation(Cfp $cfp, array $array)
203
    {