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

Wysiwyg   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A strLimit() 0 8 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
}