Completed
Push — master ( 8b59f7...62ee86 )
by Arjay
01:32
created

Aria   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 114
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 0
dl 0
loc 114
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A languageAria() 0 6 1
A languageAriaPaginate() 0 6 1
A languageAriaPaginateFirst() 0 6 1
A languageAriaPaginateLast() 0 6 1
A languageAriaPaginateNext() 0 6 1
A languageAriaPaginatePrevious() 0 6 1
A languageAriaSortAscending() 0 6 1
A languageAriaSortDescending() 0 6 1
1
<?php
2
3
namespace Yajra\DataTables\Html\Options\Languages;
4
5
trait Aria
6
{
7
    /**
8
     * Set language aria option value.
9
     *
10
     * @param array $value
11
     * @return $this
12
     * @see https://datatables.net/reference/option/language.aria
13
     */
14
    public function languageAria(array $value)
15
    {
16
        $this->attributes['language']['aria'] = $value;
0 ignored issues
show
Bug introduced by
The property attributes does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
17
18
        return $this;
19
    }
20
21
    /**
22
     * Set language aria paginate option value.
23
     *
24
     * @param array $value
25
     * @return $this
26
     * @see https://datatables.net/reference/option/language.aria.paginate
27
     */
28
    public function languageAriaPaginate(array $value)
29
    {
30
        $this->attributes['language']['aria']['paginate'] = $value;
31
32
        return $this;
33
    }
34
35
    /**
36
     * Set language aria paginate first option value.
37
     *
38
     * @param string $value
39
     * @return $this
40
     * @see https://datatables.net/reference/option/language.aria.paginate.first
41
     */
42
    public function languageAriaPaginateFirst($value)
43
    {
44
        $this->attributes['language']['aria']['paginate']['first'] = $value;
45
46
        return $this;
47
    }
48
49
    /**
50
     * Set language aria paginate last option value.
51
     *
52
     * @param string $value
53
     * @return $this
54
     * @see https://datatables.net/reference/option/language.aria.paginate.last
55
     */
56
    public function languageAriaPaginateLast($value)
57
    {
58
        $this->attributes['language']['aria']['paginate']['last'] = $value;
59
60
        return $this;
61
    }
62
63
    /**
64
     * Set language aria paginate next option value.
65
     *
66
     * @param string $value
67
     * @return $this
68
     * @see https://datatables.net/reference/option/language.aria.paginate.next
69
     */
70
    public function languageAriaPaginateNext($value)
71
    {
72
        $this->attributes['language']['aria']['paginate']['next'] = $value;
73
74
        return $this;
75
    }
76
77
    /**
78
     * Set language aria paginate previous option value.
79
     *
80
     * @param string $value
81
     * @return $this
82
     * @see https://datatables.net/reference/option/language.aria.paginate.previous
83
     */
84
    public function languageAriaPaginatePrevious($value)
85
    {
86
        $this->attributes['language']['aria']['paginate']['previous'] = $value;
87
88
        return $this;
89
    }
90
91
    /**
92
     * Set language aria sortAscending option value.
93
     *
94
     * @param string $value
95
     * @return $this
96
     * @see https://datatables.net/reference/option/language.aria.sortAscending
97
     */
98
    public function languageAriaSortAscending($value)
99
    {
100
        $this->attributes['language']['aria']['sortAscending'] = $value;
101
102
        return $this;
103
    }
104
105
    /**
106
     * Set language aria sortDescending option value.
107
     *
108
     * @param string $value
109
     * @return $this
110
     * @see https://datatables.net/reference/option/language.aria.sortDescending
111
     */
112
    public function languageAriaSortDescending($value)
113
    {
114
        $this->attributes['language']['aria']['sortDescending'] = $value;
115
116
        return $this;
117
    }
118
}
119