Code Duplication    Length = 16-16 lines in 2 locations

Classes/Facet/CompositeFacet.php 1 location

@@ 89-104 (lines=16) @@
86
    /**
87
     * @return string
88
     */
89
    public function getLabel(): string
90
    {
91
        if ($this->label === $this->name) {
92
            $label = Tca::table($this->dataType)->field($this->getName())->getLabel();
93
        } else {
94
            try {
95
                $label = LocalizationUtility::translate($this->label, '');
96
            } catch (\InvalidArgumentException $e) {
97
            }
98
            if (empty($label)) {
99
                $label = $this->label;
100
            }
101
        }
102
103
        return $label;
104
    }
105
106
    /**
107
     * @return array

Classes/Facet/StandardFacet.php 1 location

@@ 76-91 (lines=16) @@
73
    /**
74
     * @return string
75
     */
76
    public function getLabel(): string
77
    {
78
        if ($this->label === $this->name) {
79
            $label = Tca::table($this->dataType)->field($this->getName())->getLabel();
80
        } else {
81
            try {
82
                $label = LocalizationUtility::translate($this->label, '');
83
            } catch (\InvalidArgumentException $e) {
84
            }
85
            if (empty($label)) {
86
                $label = $this->label;
87
            }
88
        }
89
90
        return $label;
91
    }
92
93
    /**
94
     * @return array