| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 12 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 28 | public function isValid($value)  | 
            ||
| 29 |     { | 
            ||
| 30 | $this->value = $this->standardValue = $value;  | 
            ||
| 31 | |||
| 32 |         if (!is_string($value)) { | 
            ||
| 33 | $this->setError(self::NOT_STRING);  | 
            ||
| 34 | return false;  | 
            ||
| 35 | }  | 
            ||
| 36 | |||
| 37 |         if (!preg_match($this->options['regex'], $value)) { | 
            ||
| 38 | $this->setError($this->notMatchCode);  | 
            ||
| 39 | return false;  | 
            ||
| 40 | }  | 
            ||
| 41 | }  | 
            ||
| 42 | }  | 
            ||
| 43 |