@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | 209 | * @param $model |
| 210 | - * @param null $custom_attribute |
|
| 210 | + * @param string $custom_attribute |
|
| 211 | 211 | * |
| 212 | 212 | * @return \Illuminate\Http\JsonResponse |
| 213 | 213 | * |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | /** |
| 226 | 226 | * @param $model |
| 227 | - * @param null $custom_attribute |
|
| 227 | + * @param string[] $custom_attribute |
|
| 228 | 228 | * |
| 229 | 229 | * @return \Illuminate\Http\JsonResponse |
| 230 | 230 | * |
@@ -353,7 +353,7 @@ |
||
| 353 | 353 | |
| 354 | 354 | $custom_field_sections = $this->custom_field_section->with('customFields.options')->whereScreenId($screen_id)->get(); |
| 355 | 355 | |
| 356 | - $custom_field_sections->each(function ($custom_field_section) { |
|
| 356 | + $custom_field_sections->each(function($custom_field_section) { |
|
| 357 | 357 | $custom_fields = $custom_field_section->customFields; |
| 358 | 358 | |
| 359 | 359 | $custom_field_section->fields = array_chunk($custom_fields->toArray(), 2); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function map(Router $router) |
| 40 | 40 | { |
| 41 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 41 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
| 42 | 42 | require app_path('Http/routes.php'); |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function register() |
| 34 | 34 | { |
| 35 | - $this->app->bind(Elastic::class, function () { |
|
| 35 | + $this->app->bind(Elastic::class, function() { |
|
| 36 | 36 | return new Elastic( |
| 37 | 37 | ClientBuilder::create() |
| 38 | 38 | ->build() |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @param $input |
| 95 | 95 | * @param string $format |
| 96 | 96 | * |
| 97 | - * @return static |
|
| 97 | + * @return Carbon |
|
| 98 | 98 | * |
| 99 | 99 | * @author Bertrand Kintanar <[email protected]> |
| 100 | 100 | */ |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @param $input |
| 110 | 110 | * @param string $format |
| 111 | 111 | * |
| 112 | - * @return static |
|
| 112 | + * @return Carbon |
|
| 113 | 113 | * |
| 114 | 114 | * @author Bertrand Kintanar <[email protected]> |
| 115 | 115 | */ |
@@ -121,8 +121,8 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | - * @param $start |
|
| 125 | - * @param $end |
|
| 124 | + * @param Carbon $start |
|
| 125 | + * @param Carbon $end |
|
| 126 | 126 | * |
| 127 | 127 | * @return string |
| 128 | 128 | * |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | /** |
| 202 | 202 | * Alert configuration of time in. |
| 203 | 203 | * |
| 204 | - * @return string |
|
| 204 | + * @return \Dingo\Api\Http\Response |
|
| 205 | 205 | * |
| 206 | 206 | * @author Harlequin Doyon <[email protected]> |
| 207 | 207 | * @author Bertrand Kintanar <[email protected]> |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | /** |
| 254 | 254 | * Alert configuration of time out. |
| 255 | 255 | * |
| 256 | - * @return string |
|
| 256 | + * @return \Dingo\Api\Http\Response |
|
| 257 | 257 | * |
| 258 | 258 | * @author Harlequin Doyon <[email protected]> |
| 259 | 259 | * @author Bertrand Kintanar <[email protected]> |
@@ -101,8 +101,7 @@ discard block |
||
| 101 | 101 | private function startOfMonth($input, $format = 'Y-m-d H:i:s') |
| 102 | 102 | { |
| 103 | 103 | return isset($input['start']) ? |
| 104 | - Carbon::createFromFormat($format, $input['start'].' 00:00:00') : |
|
| 105 | - Carbon::now()->startOfMonth(); |
|
| 104 | + Carbon::createFromFormat($format, $input['start'].' 00:00:00') : Carbon::now()->startOfMonth(); |
|
| 106 | 105 | } |
| 107 | 106 | |
| 108 | 107 | /** |
@@ -116,8 +115,7 @@ discard block |
||
| 116 | 115 | private function endOfMonth($input, $format = 'Y-m-d H:i:s') |
| 117 | 116 | { |
| 118 | 117 | return isset($input['end']) ? |
| 119 | - Carbon::createFromFormat($format, $input['end'].' 23:59:59') : |
|
| 120 | - Carbon::now()->endOfMonth(); |
|
| 118 | + Carbon::createFromFormat($format, $input['end'].' 23:59:59') : Carbon::now()->endOfMonth(); |
|
| 121 | 119 | } |
| 122 | 120 | |
| 123 | 121 | /** |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $api = app(Router::class); |
| 26 | 26 | $response = app(Dingo\Api\Http\Response\Factory::class); |
| 27 | 27 | |
| 28 | -app(Dingo\Api\Exception\Handler::class)->register(function (ModelNotFoundException $e) use ($response) { |
|
| 28 | +app(Dingo\Api\Exception\Handler::class)->register(function(ModelNotFoundException $e) use ($response) { |
|
| 29 | 29 | $response_array = [ |
| 30 | 30 | 'message' => '422 Unprocessable Entity', |
| 31 | 31 | 'status_code' => 422, |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | }); |
| 36 | 36 | |
| 37 | 37 | // Version 1 of our API |
| 38 | -$api->version('v1', function (Router $api) { |
|
| 38 | +$api->version('v1', function(Router $api) { |
|
| 39 | 39 | |
| 40 | 40 | // Set our namespace for the underlying routes |
| 41 | 41 | $api->group([ |
@@ -46,20 +46,20 @@ discard block |
||
| 46 | 46 | ], |
| 47 | 47 | 'limit' => 200, |
| 48 | 48 | 'expires' => 5, |
| 49 | - ], function (Router $api) { |
|
| 49 | + ], function(Router $api) { |
|
| 50 | 50 | $api->get('/', 'BaseController@apiInformation'); |
| 51 | 51 | |
| 52 | 52 | // Login route |
| 53 | - $api->post('login', 'Auth\AuthController@authenticate'); // docs done |
|
| 53 | + $api->post('login', 'Auth\AuthController@authenticate'); // docs done |
|
| 54 | 54 | $api->post('register', 'Auth\AuthController@register'); |
| 55 | 55 | |
| 56 | 56 | $api->get('auth/refresh', 'Auth\AuthController@token'); |
| 57 | 57 | |
| 58 | 58 | // All routes in here are protected and thus need a valid token |
| 59 | - $api->group(['protected' => true, 'middleware' => 'api.auth'], function (Router $api) { |
|
| 59 | + $api->group(['protected' => true, 'middleware' => 'api.auth'], function(Router $api) { |
|
| 60 | 60 | |
| 61 | 61 | // Authentication |
| 62 | - $api->get('logout', 'Auth\AuthController@logout'); // docs done |
|
| 62 | + $api->get('logout', 'Auth\AuthController@logout'); // docs done |
|
| 63 | 63 | $api->get('users/me', 'Auth\AuthController@me'); |
| 64 | 64 | $api->post('sidebar', 'Auth\AuthController@sidebar'); |
| 65 | 65 | |
@@ -67,27 +67,27 @@ discard block |
||
| 67 | 67 | $api->get('employee/{employee}', 'EmployeeController@show'); |
| 68 | 68 | |
| 69 | 69 | // Profile |
| 70 | - $api->group(['prefix' => 'profile', 'namespace' => 'Profile'], function (Router $api) { |
|
| 71 | - $api->patch('personal-details', 'PersonalDetailsController@update'); // docs done |
|
| 70 | + $api->group(['prefix' => 'profile', 'namespace' => 'Profile'], function(Router $api) { |
|
| 71 | + $api->patch('personal-details', 'PersonalDetailsController@update'); // docs done |
|
| 72 | 72 | |
| 73 | - $api->patch('contact-details', 'PersonalDetailsController@update'); // docs done |
|
| 73 | + $api->patch('contact-details', 'PersonalDetailsController@update'); // docs done |
|
| 74 | 74 | |
| 75 | - $api->post('emergency-contacts', 'EmergencyContactsController@store'); // docs done |
|
| 76 | - $api->patch('emergency-contacts', 'EmergencyContactsController@update'); // docs done |
|
| 77 | - $api->delete('emergency-contacts/{emergency_contact}', 'EmergencyContactsController@destroy'); // docs done |
|
| 75 | + $api->post('emergency-contacts', 'EmergencyContactsController@store'); // docs done |
|
| 76 | + $api->patch('emergency-contacts', 'EmergencyContactsController@update'); // docs done |
|
| 77 | + $api->delete('emergency-contacts/{emergency_contact}', 'EmergencyContactsController@destroy'); // docs done |
|
| 78 | 78 | |
| 79 | - $api->post('dependents', 'DependentsController@store'); // docs done |
|
| 80 | - $api->patch('dependents', 'DependentsController@update'); // docs done |
|
| 81 | - $api->delete('dependents/{dependent}', 'DependentsController@destroy'); // docs done |
|
| 79 | + $api->post('dependents', 'DependentsController@store'); // docs done |
|
| 80 | + $api->patch('dependents', 'DependentsController@update'); // docs done |
|
| 81 | + $api->delete('dependents/{dependent}', 'DependentsController@destroy'); // docs done |
|
| 82 | 82 | |
| 83 | - $api->post('reports-to', 'ReportsToController@store'); // docs done |
|
| 84 | - $api->patch('reports-to', 'ReportsToController@update'); // docs done |
|
| 85 | - $api->delete('reports-to/{employee_supervisor}', 'ReportsToController@destroy'); // docs done |
|
| 83 | + $api->post('reports-to', 'ReportsToController@store'); // docs done |
|
| 84 | + $api->patch('reports-to', 'ReportsToController@update'); // docs done |
|
| 85 | + $api->delete('reports-to/{employee_supervisor}', 'ReportsToController@destroy'); // docs done |
|
| 86 | 86 | |
| 87 | 87 | $api->patch('job', 'JobController@update'); |
| 88 | 88 | $api->delete('job/{job_history}', 'JobController@destroy'); |
| 89 | 89 | |
| 90 | - $api->group(['prefix' => 'qualifications'], function (Router $api) { |
|
| 90 | + $api->group(['prefix' => 'qualifications'], function(Router $api) { |
|
| 91 | 91 | $api->post('work-experiences', 'QualificationsController@storeWorkExperience'); |
| 92 | 92 | $api->delete('work-experiences/{work_experience}', 'QualificationsController@destroyWorkExperience'); |
| 93 | 93 | $api->patch('work-experiences', 'QualificationsController@updateWorkExperience'); |
@@ -103,15 +103,15 @@ discard block |
||
| 103 | 103 | }); |
| 104 | 104 | |
| 105 | 105 | // PIM |
| 106 | - $api->group(['prefix' => 'pim', 'namespace' => 'PIM'], function (Router $api) { |
|
| 106 | + $api->group(['prefix' => 'pim', 'namespace' => 'PIM'], function(Router $api) { |
|
| 107 | 107 | $api->get('employee-list', 'EmployeeListController@index'); |
| 108 | 108 | |
| 109 | 109 | // Configuration |
| 110 | - $api->group(['prefix' => 'configuration', 'namespace' => 'Configuration'], function (Router $api) { |
|
| 111 | - $api->get('termination-reasons', 'TerminationReasonsController@index'); // docs done |
|
| 112 | - $api->get('termination-reasons/{termination_reason}', 'TerminationReasonsController@show'); // docs done |
|
| 113 | - $api->post('termination-reasons', 'TerminationReasonsController@store'); // docs done |
|
| 114 | - $api->patch('termination-reasons', 'TerminationReasonsController@update'); // docs done |
|
| 110 | + $api->group(['prefix' => 'configuration', 'namespace' => 'Configuration'], function(Router $api) { |
|
| 111 | + $api->get('termination-reasons', 'TerminationReasonsController@index'); // docs done |
|
| 112 | + $api->get('termination-reasons/{termination_reason}', 'TerminationReasonsController@show'); // docs done |
|
| 113 | + $api->post('termination-reasons', 'TerminationReasonsController@store'); // docs done |
|
| 114 | + $api->patch('termination-reasons', 'TerminationReasonsController@update'); // docs done |
|
| 115 | 115 | $api->delete('termination-reasons/{termination_reason}', 'TerminationReasonsController@destroy'); // docs done |
| 116 | 116 | |
| 117 | 117 | $api->get('custom-field-sections', 'CustomFieldsController@index'); |
@@ -128,41 +128,41 @@ discard block |
||
| 128 | 128 | }); |
| 129 | 129 | |
| 130 | 130 | // Admin |
| 131 | - $api->group(['prefix' => 'admin', 'namespace' => 'Admin'], function (Router $api) { |
|
| 131 | + $api->group(['prefix' => 'admin', 'namespace' => 'Admin'], function(Router $api) { |
|
| 132 | 132 | |
| 133 | 133 | // Job |
| 134 | - $api->group(['prefix' => 'job', 'namespace' => 'Job'], function (Router $api) { |
|
| 135 | - $api->get('titles', 'JobTitlesController@index'); // docs done |
|
| 136 | - $api->get('titles/{job_title}', 'JobTitlesController@show'); // docs done |
|
| 137 | - $api->post('titles', 'JobTitlesController@store'); // docs done |
|
| 138 | - $api->patch('titles', 'JobTitlesController@update'); // docs done |
|
| 139 | - $api->delete('titles/{job_title}', 'JobTitlesController@destroy'); // docs done |
|
| 140 | - |
|
| 141 | - $api->get('employment-status', 'EmploymentStatusController@index'); // docs done |
|
| 142 | - $api->get('employment-status/{employment_status}', 'EmploymentStatusController@show'); // docs done |
|
| 143 | - $api->post('employment-status', 'EmploymentStatusController@store'); // docs done |
|
| 144 | - $api->patch('employment-status', 'EmploymentStatusController@update'); // docs done |
|
| 145 | - $api->delete('employment-status/{employment_status}', 'EmploymentStatusController@destroy'); // docs done |
|
| 146 | - |
|
| 147 | - $api->get('pay-grades', 'PayGradesController@index'); // docs done |
|
| 148 | - $api->get('pay-grades/{pay_grade}', 'PayGradesController@show'); // docs done |
|
| 149 | - $api->post('pay-grades', 'PayGradesController@store'); // docs done |
|
| 150 | - $api->patch('pay-grades', 'PayGradesController@update'); // docs done |
|
| 151 | - $api->delete('pay-grades/{pay_grade}', 'PayGradesController@destroy'); // docs done |
|
| 134 | + $api->group(['prefix' => 'job', 'namespace' => 'Job'], function(Router $api) { |
|
| 135 | + $api->get('titles', 'JobTitlesController@index'); // docs done |
|
| 136 | + $api->get('titles/{job_title}', 'JobTitlesController@show'); // docs done |
|
| 137 | + $api->post('titles', 'JobTitlesController@store'); // docs done |
|
| 138 | + $api->patch('titles', 'JobTitlesController@update'); // docs done |
|
| 139 | + $api->delete('titles/{job_title}', 'JobTitlesController@destroy'); // docs done |
|
| 140 | + |
|
| 141 | + $api->get('employment-status', 'EmploymentStatusController@index'); // docs done |
|
| 142 | + $api->get('employment-status/{employment_status}', 'EmploymentStatusController@show'); // docs done |
|
| 143 | + $api->post('employment-status', 'EmploymentStatusController@store'); // docs done |
|
| 144 | + $api->patch('employment-status', 'EmploymentStatusController@update'); // docs done |
|
| 145 | + $api->delete('employment-status/{employment_status}', 'EmploymentStatusController@destroy'); // docs done |
|
| 146 | + |
|
| 147 | + $api->get('pay-grades', 'PayGradesController@index'); // docs done |
|
| 148 | + $api->get('pay-grades/{pay_grade}', 'PayGradesController@show'); // docs done |
|
| 149 | + $api->post('pay-grades', 'PayGradesController@store'); // docs done |
|
| 150 | + $api->patch('pay-grades', 'PayGradesController@update'); // docs done |
|
| 151 | + $api->delete('pay-grades/{pay_grade}', 'PayGradesController@destroy'); // docs done |
|
| 152 | 152 | }); |
| 153 | 153 | |
| 154 | 154 | // Qualification |
| 155 | - $api->group(['prefix' => 'qualifications', 'namespace' => 'Qualifications'], function (Router $api) { |
|
| 156 | - $api->get('educations', 'EducationsController@index'); // docs done |
|
| 157 | - $api->get('educations/{education_level}', 'EducationsController@show'); // docs done |
|
| 158 | - $api->post('educations', 'EducationsController@store'); // docs done |
|
| 159 | - $api->patch('educations', 'EducationsController@update'); // docs done |
|
| 160 | - $api->delete('educations/{education_level}', 'EducationsController@destroy'); // docs done |
|
| 155 | + $api->group(['prefix' => 'qualifications', 'namespace' => 'Qualifications'], function(Router $api) { |
|
| 156 | + $api->get('educations', 'EducationsController@index'); // docs done |
|
| 157 | + $api->get('educations/{education_level}', 'EducationsController@show'); // docs done |
|
| 158 | + $api->post('educations', 'EducationsController@store'); // docs done |
|
| 159 | + $api->patch('educations', 'EducationsController@update'); // docs done |
|
| 160 | + $api->delete('educations/{education_level}', 'EducationsController@destroy'); // docs done |
|
| 161 | 161 | }); |
| 162 | 162 | }); |
| 163 | 163 | |
| 164 | 164 | // Presence |
| 165 | - $api->group(['prefix' => 'presence', 'namespace' => 'Presence'], function (Router $api) { |
|
| 165 | + $api->group(['prefix' => 'presence', 'namespace' => 'Presence'], function(Router $api) { |
|
| 166 | 166 | $api->get('timelogs', 'TimelogController@index'); |
| 167 | 167 | $api->get('alert/time-in', 'TimelogController@attemptTimeIn'); |
| 168 | 168 | $api->get('alert/time-out', 'TimelogController@attemptTimeOut'); |
@@ -172,20 +172,20 @@ discard block |
||
| 172 | 172 | }); |
| 173 | 173 | |
| 174 | 174 | // Chosen |
| 175 | - $api->get('cities', 'LookupTableController@cities'); // docs done |
|
| 176 | - $api->get('countries', 'LookupTableController@countries'); // docs done |
|
| 177 | - $api->get('departments', 'LookupTableController@departments'); // docs done |
|
| 178 | - $api->get('education-levels', 'LookupTableController@educationLevels'); // docs done |
|
| 179 | - $api->get('employment-statuses', 'LookupTableController@employmentStatuses'); // docs done |
|
| 180 | - $api->get('job-titles', 'LookupTableController@jobTitles'); // docs done |
|
| 181 | - $api->get('locations', 'LookupTableController@locations'); // docs done |
|
| 182 | - $api->get('marital-statuses', 'LookupTableController@maritalStatuses'); // docs done |
|
| 183 | - $api->get('screens', 'LookupTableController@screens'); // docs done |
|
| 184 | - $api->get('types', 'LookupTableController@types'); // docs done |
|
| 185 | - $api->get('nationalities', 'LookupTableController@nationalities'); // docs done |
|
| 186 | - $api->get('provinces', 'LookupTableController@provinces'); // docs done |
|
| 187 | - $api->get('relationships', 'LookupTableController@relationships'); // docs done |
|
| 188 | - $api->get('skills', 'LookupTableController@skills'); // docs done |
|
| 175 | + $api->get('cities', 'LookupTableController@cities'); // docs done |
|
| 176 | + $api->get('countries', 'LookupTableController@countries'); // docs done |
|
| 177 | + $api->get('departments', 'LookupTableController@departments'); // docs done |
|
| 178 | + $api->get('education-levels', 'LookupTableController@educationLevels'); // docs done |
|
| 179 | + $api->get('employment-statuses', 'LookupTableController@employmentStatuses'); // docs done |
|
| 180 | + $api->get('job-titles', 'LookupTableController@jobTitles'); // docs done |
|
| 181 | + $api->get('locations', 'LookupTableController@locations'); // docs done |
|
| 182 | + $api->get('marital-statuses', 'LookupTableController@maritalStatuses'); // docs done |
|
| 183 | + $api->get('screens', 'LookupTableController@screens'); // docs done |
|
| 184 | + $api->get('types', 'LookupTableController@types'); // docs done |
|
| 185 | + $api->get('nationalities', 'LookupTableController@nationalities'); // docs done |
|
| 186 | + $api->get('provinces', 'LookupTableController@provinces'); // docs done |
|
| 187 | + $api->get('relationships', 'LookupTableController@relationships'); // docs done |
|
| 188 | + $api->get('skills', 'LookupTableController@skills'); // docs done |
|
| 189 | 189 | }); |
| 190 | 190 | |
| 191 | 191 | $api->get('playground', 'PlaygroundController@index'); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function boot() |
| 36 | 36 | { |
| 37 | - $this->app[Auth::class]->extend('jwt', function ($app) { |
|
| 37 | + $this->app[Auth::class]->extend('jwt', function($app) { |
|
| 38 | 38 | return new JWT($app['Tymon\JWTAuth\JWTAuth']); |
| 39 | 39 | }); |
| 40 | 40 | } |
@@ -35,14 +35,14 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function boot() |
| 37 | 37 | { |
| 38 | - $this->app[Auth::class]->extend('oauth', function ($app) { |
|
| 38 | + $this->app[Auth::class]->extend('oauth', function($app) { |
|
| 39 | 39 | $provider = new OAuth2($app['oauth2-server.authorizer']->getChecker()); |
| 40 | 40 | |
| 41 | - $provider->setUserResolver(function ($id) { |
|
| 41 | + $provider->setUserResolver(function($id) { |
|
| 42 | 42 | return User::findOrFail($id); |
| 43 | 43 | }); |
| 44 | 44 | |
| 45 | - $provider->setClientResolver(function ($id) { |
|
| 45 | + $provider->setClientResolver(function($id) { |
|
| 46 | 46 | return User::findOrFail($id); |
| 47 | 47 | }); |
| 48 | 48 | |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | - * @param $name |
|
| 108 | + * @param string $name |
|
| 109 | 109 | * |
| 110 | 110 | * @return bool |
| 111 | 111 | */ |