Completed
Push — master ( 4fa96a...ba6212 )
by ARCANEDEV
03:18
created

DeleteLinks   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 35
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A deleteModalIcon() 0 6 1
A deleteModalWithIcon() 0 7 1
1
<?php namespace Arcanesoft\Core\Helpers\UI\LinkTraits;
2
3
/**
4
 * Trait     DeleteLinks
5
 *
6
 * @package  Arcanesoft\Core\Helpers\UI\LinkTraits
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
trait DeleteLinks
10
{
11
    /**
12
     * Generate delete icon link for modals.
13
     *
14
     * @param  string  $url
15
     * @param  array   $attributes
16
     * @param  bool    $disabled
17
     *
18
     * @return self
19
     */
20 9
    public static function deleteModalIcon($url, array $attributes = [], $disabled = false)
21
    {
22 9
        return self::make('delete', $url, $attributes, $disabled)
23 9
                   ->size('xs')
24 9
                   ->withTitle(false);
25
    }
26
27
    /**
28
     * Generate delete link with icon for modals.
29
     *
30
     * @param  string  $url
31
     * @param  array   $attributes
32
     * @param  bool    $disabled
33
     *
34
     * @return self
35
     */
36 3
    public static function deleteModalWithIcon($url, array $attributes = [], $disabled = false)
37
    {
38 3
        return static::make('delete', $url, $attributes, $disabled)
39 3
                     ->size('sm')
40 3
                     ->withTitle(true)
41 3
                     ->tooltip(false);
42
    }
43
}
44