Completed
Push — master ( 1c3c2e...248014 )
by Arjay
10:57
created

AutoFill   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A autoFill() 0 6 1
1
<?php
2
3
namespace Yajra\DataTables\Html\Options\Plugins;
4
5
/**
6
 * DataTables - AutoFill plugin option builder.
7
 *
8
 * @see https://datatables.net/extensions/autofill/
9
 * @see https://datatables.net/reference/option/autoFill
10
 */
11
trait AutoFill
12
{
13
    /**
14
     * Set autoFill option value.
15
     * Enable and configure the AutoFill extension for DataTables.
16
     *
17
     * @param bool|array $value
18
     * @return $this
19
     * @see https://datatables.net/reference/option/autoFill
20
     */
21
    public function autoFill($value = true)
22
    {
23
        $this->attributes['autoFill'] = $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...
24
25
        return $this;
26
    }
27
}
28