Passed
Push — master ( 06bf02...b3147e )
by Ferry
03:01
created

Wysiwyg::strLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: User
5
 * Date: 1/26/2019
6
 * Time: 6:00 PM
7
 */
8
9
namespace crocodicstudio\crudbooster\types;
10
11
use crocodicstudio\crudbooster\controllers\scaffolding\traits\DefaultOption;
12
use crocodicstudio\crudbooster\controllers\scaffolding\traits\Join;
13
use crocodicstudio\crudbooster\types\wysiwyg\WysiwygModel;
14
15
class Wysiwyg
16
{
17
    use DefaultOption, Join;
18
19
20
    public function strLimit($length = 100) {
21
        $data = columnSingleton()->getColumn($this->index);
22
        /** @var WysiwygModel $data */
23
        $data->setLimit($length);
24
25
        columnSingleton()->setColumn($this->index, $data);
26
27
        return $this;
28
    }
29
30
}