Passed
Push — master ( f4d366...672a66 )
by Thomas
03:42 queued 01:49
created

ValidationRule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValidationRule() 0 10 1
1
<?php
2
3
namespace Webfactor\Laravel\Generators\Traits;
4
5
trait ValidationRule
6
{
7
    protected $validationRuleType;
8
9
    protected $validationRuleOptions = [];
10
11
    public function getValidationRule(): string
12
    {
13
        return 'require|' . $this->validationRuleType;
14
15
        /*if ($this->crudFieldOptions) {
0 ignored issues
show
Unused Code Comprehensibility introduced by
62% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
16
            $this->addCrudFieldOptions();
17
        }
18
19
        return $this->field;*/
20
    }
21
}
22