| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 21 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 40 | public function handle() | ||
| 41 |     { | ||
| 42 | $organizerResult = Organizer::getOrganizerServiceForUser($this->user, $this->companyToken)->foundOrganizerDataByToken(); | ||
| 43 |         if (empty($organizerResult)) { | ||
| 44 | return false; | ||
| 45 | } | ||
| 46 | |||
| 47 |         DB::table('users')->firstOrCreate( | ||
| 48 | [ | ||
| 49 | 'name' => $organizerResult['name'], | ||
| 50 | 'cpf' => $organizerResult['cpf'], | ||
| 51 | 'email' => $organizerResult['email'], | ||
| 52 |             'password'          => bcrypt('q1w2e3r4'.rand()), | ||
| 53 | 'token' => \SiUtils\Helper\General::generateToken(), | ||
| 54 | 'token_public' => $this->companyToken, | ||
| 55 | 'role_id' => Role::$CLIENT | ||
| 56 | ] | ||
| 57 | ); | ||
| 58 | |||
| 59 | return true; | ||
| 60 | } | ||
| 61 | } | ||
| 62 | 
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.