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

Paginate   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 72
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A languagePaginate() 0 6 1
A languagePaginateFirst() 0 6 1
A languagePaginateLast() 0 6 1
A languagePaginateNext() 0 6 1
A languagePaginatePrevious() 0 6 1
1
<?php
2
3
namespace Yajra\DataTables\Html\Options\Languages;
4
5
trait Paginate
6
{
7
    /**
8
     * Set language aria paginate option value.
9
     *
10
     * @param array $value
11
     * @return $this
12
     * @see https://datatables.net/reference/option/language.paginate
13
     */
14
    public function languagePaginate(array $value)
15
    {
16
        $this->attributes['language']['paginate'] = $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 first option value.
23
     *
24
     * @param string $value
25
     * @return $this
26
     * @see https://datatables.net/reference/option/language.paginate.first
27
     */
28
    public function languagePaginateFirst($value)
29
    {
30
        $this->attributes['language']['paginate']['first'] = $value;
31
32
        return $this;
33
    }
34
35
    /**
36
     * Set language aria paginate last option value.
37
     *
38
     * @param string $value
39
     * @return $this
40
     * @see https://datatables.net/reference/option/language.paginate.last
41
     */
42
    public function languagePaginateLast($value)
43
    {
44
        $this->attributes['language']['paginate']['last'] = $value;
45
46
        return $this;
47
    }
48
49
    /**
50
     * Set language aria paginate next option value.
51
     *
52
     * @param string $value
53
     * @return $this
54
     * @see https://datatables.net/reference/option/language.paginate.next
55
     */
56
    public function languagePaginateNext($value)
57
    {
58
        $this->attributes['language']['paginate']['next'] = $value;
59
60
        return $this;
61
    }
62
63
    /**
64
     * Set language aria paginate previous option value.
65
     *
66
     * @param string $value
67
     * @return $this
68
     * @see https://datatables.net/reference/option/language.paginate.previous
69
     */
70
    public function languagePaginatePrevious($value)
71
    {
72
        $this->attributes['language']['paginate']['previous'] = $value;
73
74
        return $this;
75
    }
76
}
77