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

FixedColumns::fixedColumns()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Yajra\DataTables\Html\Options\Plugins;
4
5
/**
6
 * DataTables - FixedColumns plugin option builder.
7
 *
8
 * @see https://datatables.net/extensions/fixedcolumns/
9
 * @see https://datatables.net/reference/option/fixedColumns
10
 */
11
trait FixedColumns
12
{
13
    /**
14
     * Set fixedColumns option value.
15
     *
16
     * @param bool|array $value
17
     * @return $this
18
     * @see https://datatables.net/reference/option/fixedColumns
19
     */
20
    public function fixedColumns($value = true)
21
    {
22
        $this->attributes['fixedColumns'] = $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...
23
24
        return $this;
25
    }
26
}
27