ExtendedValidationService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
c 2
b 1
f 0
lcom 0
cbo 0
dl 0
loc 13
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validatePassword() 0 4 1
A validateName() 0 4 1
1
<?php namespace App\Services;
2
3
class ExtendedValidationService {
4
	
5
	public function validatePassword($field, $value, $params)
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
6
    {
7
		return (bool) preg_match("/^[a-zA-Z0-9\@\!\#\$\%\?]{5,50}$/", $value);
8
	}
9
10
	public function validateName($field, $value, $params)
0 ignored issues
show
Unused Code introduced by
The parameter $field is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $params is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
11
    {
12
		return (bool) preg_match("/^[a-z A-Z0-9\-]{1,50}$/", $value);
13
	}
14
15
}