| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 20 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 40 | protected function getValidatorInstance()  | 
            ||
| 41 |     { | 
            ||
| 42 | /** @var Factory $factory */  | 
            ||
| 43 | $factory = $this->container->make(Factory::class);  | 
            ||
| 44 | |||
| 45 |         if (method_exists($this, 'validator')) { | 
            ||
| 46 |             return $this->container->call([$this, 'validator'], compact('factory')); | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 47 | }  | 
            ||
| 48 | |||
| 49 | $data = $this->json->all();  | 
            ||
| 50 | |||
| 51 |         if (empty($data)) { | 
            ||
| 52 | $data = $this->request->all();  | 
            ||
| 53 | }  | 
            ||
| 54 | |||
| 55 | return $factory->make(  | 
            ||
| 56 | $data,  | 
            ||
| 57 | $this->container->call([$this, 'rules']),  | 
            ||
| 58 | $this->messages(),  | 
            ||
| 59 | $this->attributes()  | 
            ||
| 60 | );  | 
            ||
| 63 |