Code Duplication    Length = 71-71 lines in 2 locations

src/Kunstmaan/LeadGenerationBundle/Entity/Rule/LocaleBlacklistRule.php 1 location

@@ 13-83 (lines=71) @@
10
 * @ORM\Entity
11
 * @ORM\Table(name="kuma_rule_locale_blacklist")
12
 */
13
class LocaleBlacklistRule extends AbstractRule
14
{
15
    /**
16
     * @var string
17
     * @ORM\Column(name="locale", type="text", nullable=true)
18
     * @Assert\NotBlank()
19
     */
20
    private $locale;
21
22
    /**
23
     * @return string
24
     */
25
    public function getLocale()
26
    {
27
        return $this->locale;
28
    }
29
30
    /**
31
     * @param string $locale
32
     *
33
     * @return LocaleWhitelistRule
34
     */
35
    public function setLocale($locale)
36
    {
37
        $this->locale = $locale;
38
39
        return $this;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function getJsObjectClass()
46
    {
47
        return 'LocaleBlacklistRule';
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function getJsProperties()
54
    {
55
        return array(
56
            'locale' => $this->getLocale(),
57
        );
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getService()
64
    {
65
        return 'kunstmaan_lead_generation.rule.service.localeruleservice';
66
    }
67
68
    /**
69
     * {@inheritdoc}
70
     */
71
    public function getJsFilePath()
72
    {
73
        return '/bundles/kunstmaanleadgeneration/js/rule/LocaleBlacklistRule.js';
74
    }
75
76
    /**
77
     * @return string
78
     */
79
    public function getAdminType()
80
    {
81
        return LocaleBlackListAdminType::class;
82
    }
83
}
84

src/Kunstmaan/LeadGenerationBundle/Entity/Rule/LocaleWhitelistRule.php 1 location

@@ 13-83 (lines=71) @@
10
 * @ORM\Entity
11
 * @ORM\Table(name="kuma_rule_locale_whitelist")
12
 */
13
class LocaleWhitelistRule extends AbstractRule
14
{
15
    /**
16
     * @var string
17
     * @ORM\Column(name="locale", type="text", nullable=true)
18
     * @Assert\NotBlank()
19
     */
20
    private $locale;
21
22
    /**
23
     * @return string
24
     */
25
    public function getLocale()
26
    {
27
        return $this->locale;
28
    }
29
30
    /**
31
     * @param string $locale
32
     *
33
     * @return LocaleWhitelistRule
34
     */
35
    public function setLocale($locale)
36
    {
37
        $this->locale = $locale;
38
39
        return $this;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function getJsObjectClass()
46
    {
47
        return 'LocaleWhitelistRule';
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function getJsProperties()
54
    {
55
        return array(
56
            'locale' => $this->getLocale(),
57
        );
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getService()
64
    {
65
        return 'kunstmaan_lead_generation.rule.service.localeruleservice';
66
    }
67
68
    /**
69
     * {@inheritdoc}
70
     */
71
    public function getJsFilePath()
72
    {
73
        return '/bundles/kunstmaanleadgeneration/js/rule/LocaleWhitelistRule.js';
74
    }
75
76
    /**
77
     * @return string
78
     */
79
    public function getAdminType()
80
    {
81
        return LocaleWhiteListAdminType::class;
82
    }
83
}
84