1 | <?php |
||
13 | class UsersMigrationController extends Controller |
||
14 | { |
||
15 | /** |
||
16 | * Show users migration. |
||
17 | * |
||
18 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
19 | */ |
||
20 | public function index() |
||
26 | |||
27 | /** |
||
28 | * Get total number of users in source migration database. |
||
29 | */ |
||
30 | public function totalNumberOfUsers() |
||
35 | |||
36 | /** |
||
37 | * Migrate multiple users. |
||
38 | * |
||
39 | */ |
||
40 | public function migrate(UsersMigrationRequest $request) |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Get users to migrate. |
||
57 | * |
||
58 | * @param $request |
||
59 | */ |
||
60 | protected function usersToMigrateByRequest($request) |
||
66 | |||
67 | /** |
||
68 | * Users to migrate by user id list. |
||
69 | * |
||
70 | * @param $users |
||
71 | */ |
||
72 | protected function usersToMigrate($users, $request) |
||
76 | |||
77 | /** |
||
78 | * Users to migrate by filter. |
||
79 | * |
||
80 | * @param $filter |
||
81 | */ |
||
82 | protected function usersToMigrateByFilter($filter, $request) |
||
86 | |||
87 | /** |
||
88 | * Get all valid users. |
||
89 | * |
||
90 | * @param $request |
||
91 | * @return \Illuminate\Database\Eloquent\Collection|static[] |
||
92 | */ |
||
93 | protected function allUsers($request) |
||
97 | } |
||
98 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.