Code Duplication    Length = 5-9 lines in 4 locations

src/Visitor/Php/Symfony/FormTypeChoices.php 1 location

@@ 85-93 (lines=9) @@
82
                continue;
83
            }
84
85
            if ('choice_translation_domain' === $item->key->value) {
86
                if ($item->value instanceof Node\Scalar\String_) {
87
                    $domain = $item->value->value;
88
                } elseif ($item->value instanceof Node\Expr\ConstFetch && 'false' === $item->value->name->toString()) {
89
                    $domain = false;
90
                }
91
92
                continue;
93
            }
94
95
            if ('choices' !== $item->key->value) {
96
                continue;

src/Visitor/Php/Symfony/FormTypeLabelImplicit.php 1 location

@@ 55-61 (lines=7) @@
52
                            $skipLabel = true;
53
                        }
54
55
                        if (isset($item->key) && 'translation_domain' === $item->key->value) {
56
                            if ($item->value instanceof Node\Scalar\String_) {
57
                                $domain = $item->value->value;
58
                            } elseif ($item->value instanceof Node\Expr\ConstFetch && 'false' === $item->value->name->toString()) {
59
                                $domain = false;
60
                            }
61
                        }
62
                    }
63
                }
64
                /*

src/Visitor/Php/Symfony/FormTypeLabelExplicit.php 1 location

@@ 50-56 (lines=7) @@
47
                continue;
48
            }
49
50
            if ('translation_domain' === $item->key->value) {
51
                if ($item->value instanceof Node\Scalar\String_) {
52
                    $domain = $item->value->value;
53
                } elseif ($item->value instanceof Node\Expr\ConstFetch && 'false' === $item->value->name->toString()) {
54
                    $domain = false;
55
                }
56
            }
57
58
            if ('label' !== $item->key->value) {
59
                continue;

src/Visitor/Php/Symfony/FormTypePlaceholder.php 1 location

@@ 45-49 (lines=5) @@
42
            }
43
            if ('translation_domain' === $item->key->value) {
44
                // Try to find translation domain
45
                if ($item->value instanceof Node\Scalar\String_) {
46
                    $domain = $item->value->value;
47
                } elseif ($item->value instanceof Node\Expr\ConstFetch && 'false' === $item->value->name->toString()) {
48
                    $domain = false;
49
                }
50
            } elseif ('placeholder' === $item->key->value) {
51
                $placeholderNode = $item;
52
            } elseif ('attr' === $item->key->value) {