1 | <?php |
||
17 | class JpasImportHandler implements ToCollection, WithHeadingRow |
||
18 | { |
||
19 | use DateFormat; |
||
20 | |||
21 | private $unique; |
||
22 | private $changes; |
||
23 | |||
24 | /** |
||
25 | * Set our variables as new collections. |
||
26 | */ |
||
27 | public function __construct() |
||
32 | |||
33 | /** |
||
34 | * Initial call from UserController. |
||
35 | * Based on what we get, we will either call an initial import or the resolve import. |
||
36 | * |
||
37 | * @param $import |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | public function collection(Collection $excel) |
||
55 | |||
56 | /** |
||
57 | * Cycle through our excel spreadsheet. |
||
58 | * If we can't figure where data goes, we will push it to a collection so the user can map it. |
||
59 | * Otherwise, we will update the record. |
||
60 | * |
||
61 | * @param $excel |
||
62 | */ |
||
63 | private function initialImport($excel) |
||
80 | |||
81 | /** |
||
82 | * User has mapped some accounts. We need to update those records. |
||
83 | * |
||
84 | * @param $excel |
||
85 | * @param $data |
||
86 | */ |
||
87 | private function resolveImport($excel, $data) |
||
97 | |||
98 | /** |
||
99 | * Place changes so the user can approve/reject them. |
||
100 | * |
||
101 | * @param $user |
||
102 | */ |
||
103 | private function getUserChanges($user) |
||
116 | |||
117 | /** |
||
118 | * Update user. If there are changes, let's log them to an array. |
||
119 | * |
||
120 | * @param $user |
||
121 | */ |
||
122 | private function updateAndLogUser($user) |
||
135 | |||
136 | /** |
||
137 | * Map the data from our JPAS Excel to our User model. |
||
138 | * |
||
139 | * @param $user |
||
140 | * @param $data |
||
141 | */ |
||
142 | private function mapJpasToUser($user, $data) |
||
152 | |||
153 | /** |
||
154 | * @param $excel |
||
155 | * @param $userGroup |
||
156 | * @param $jpasName |
||
157 | * |
||
158 | * @return mixed |
||
159 | */ |
||
160 | private function importNewData($excel, $userGroup, $jpasName) |
||
172 | |||
173 | /** |
||
174 | * @param $userGroup |
||
175 | */ |
||
176 | private function updateUserData($userGroup) |
||
188 | |||
189 | /** |
||
190 | * Transform excel date values into a datetime string. |
||
191 | * |
||
192 | */ |
||
193 | public function transformDateVal($value, $format = 'Y-m-d H:i:s') |
||
201 | } |
||
202 |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.