Code Duplication    Length = 14-14 lines in 2 locations

src/Grid/Column.php 1 location

@@ 552-565 (lines=14) @@
549
550
        return $this;
551
    }
552
    public function setLabel($label)
553
    {
554
        $trans_key = 'validation.attributes.' . $label;
555
        $trans_key_low = strtolower($trans_key);
556
        if (Lang::has($trans_key)) {
557
            $label = Lang::get($trans_key);
558
        }
559
        if (Lang::has($trans_key_low)) {
560
            $label = Lang::get($trans_key_low);
561
        }else {
562
            $label = ucfirst($label);
563
        }
564
        return $label;
565
    }
566
567
    /**
568
     * Passes through all unknown calls to builtin displayer or supported displayer.

src/Grid/Filter/AbstractFilter.php 1 location

@@ 109-122 (lines=14) @@
106
    {
107
        $this->setPresenter(new Text($this->label));
108
    }
109
    public function setLabel($label)
110
    {
111
        $trans_key = 'validation.attributes.' . $label;
112
        $trans_key_low = strtolower($trans_key);
113
        if (Lang::has($trans_key)) {
114
            $label = Lang::get($trans_key);
115
        }
116
        if (Lang::has($trans_key_low)) {
117
            $label = Lang::get($trans_key_low);
118
        }else {
119
            $label = ucfirst($label);
120
        }
121
        return $label;
122
    }
123
124
    /**
125
     * Format label.