Conditions | 8 |
Paths | 7 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | public function passes( $setOfRules ) |
||
47 | { |
||
48 | if ( is_string( $setOfRules ) || is_array( $setOfRules ) ) |
||
49 | { |
||
50 | $validator = NULL; |
||
51 | if ( is_string( $setOfRules ) && method_exists( $this, $setOfRules ) ) $validator = $this->validator->make( $this->data, $this->{$setOfRules}() ); |
||
52 | else if ( is_array( $setOfRules ) ) $validator = $this->validator->make( $this->data, $setOfRules ); |
||
53 | else |
||
54 | { |
||
55 | throw new ValidationFunctionDoesNotExist(); |
||
56 | } |
||
57 | |||
58 | if ( !is_null( $validator ) ) |
||
59 | { |
||
60 | if( !$validator->fails() ) return TRUE; |
||
61 | else $this->errors = $validator->messages()->getMessages(); |
||
|
|||
62 | } |
||
63 | } |
||
64 | |||
65 | return FALSE; |
||
66 | } |
||
88 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.