| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public static function update(array $data): Account |
||
| 17 | { |
||
| 18 | return Account::updateOrCreate( |
||
| 19 | [ |
||
| 20 | 'user_id' => Auth::user()->id |
||
|
|
|||
| 21 | ], |
||
| 22 | [ |
||
| 23 | 'user_id' => Auth::user()->id, |
||
| 24 | 'first_name' => $data['first_name'], |
||
| 25 | 'last_name' => $data['last_name'], |
||
| 26 | 'facebook' => $data['facebook'], |
||
| 27 | 'twitter' => $data['twitter'], |
||
| 28 | 'biography' => $data['biography'], |
||
| 29 | 'signature' => $data['signature'] |
||
| 30 | ] |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: