Code Duplication    Length = 11-12 lines in 2 locations

src/Toolbar/ToolbarHelper.php 2 locations

@@ 65-75 (lines=11) @@
62
     * @param null|string $title
63
     * @return void
64
     */
65
    public static function apply($title = null)
66
    {
67
        $toolbar = Toolbar::getInstance(self::$_toolbar);
68
        $title   = (empty($title)) ? __d('core', 'Apply') : $title;
69
70
        $toolbar->appendButton('Core.action', $title, self::ACTION_APPLY, [
71
            'class'  => 'jsFormButton',
72
            'icon'   => 'check-square-o',
73
            'button' => 'green lighten-2',
74
        ]);
75
    }
76
77
    /**
78
     * Cancel form button.
@@ 141-152 (lines=12) @@
138
     * @param null|string $title
139
     * @return void
140
     */
141
    public static function save($title = null)
142
    {
143
        $toolbar = Toolbar::getInstance(self::$_toolbar);
144
        $title   = (empty($title)) ? __d('core', 'Save') : $title;
145
146
        $toolbar->appendButton('Core.action', $title, self::ACTION_SAVE, [
147
            'icon'      => 'check',
148
            'class'     => 'jsFormButton',
149
            'iconClass' => 'ckTextGreen',
150
            'button'    => 'grey lighten-3',
151
        ]);
152
    }
153
154
    /**
155
     * Setup toolbar instance name.