Completed
Push — api/develop ( ceb0fc...52cb6e )
by Bertrand
25:03
created
app/Api/Controllers/Presence/TimelogController.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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]>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
app/Api/Repositories/Time/TimelogRepository.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @param Employee $employee
54 54
      *
55
-     * @return \Illuminate\Database\Eloquent\Model
55
+     * @return boolean
56 56
      *
57 57
      * @author Harlequin Doyon
58 58
      */
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Returns timelog in a given range.
106 106
      *
107
-     * @param $start
108
-     * @param $end
107
+     * @param \Carbon\Carbon $start
108
+     * @param \Carbon\Carbon $end
109 109
      * @param $employee_id
110
-     * @param $rows_per_page
110
+     * @param integer $rows_per_page
111 111
      *
112 112
      * @return mixed
113 113
      */
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $api = app(Router::class);
14 14
 $response = app(Dingo\Api\Http\Response\Factory::class);
15 15
 
16
-app(Dingo\Api\Exception\Handler::class)->register(function (ModelNotFoundException $e) use ($response) {
16
+app(Dingo\Api\Exception\Handler::class)->register(function(ModelNotFoundException $e) use ($response) {
17 17
 
18 18
     $response_array = [
19 19
         'message'     => '422 Unprocessable Entity',
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 });
25 25
 
26 26
 // Version 1 of our API
27
-$api->version('v1', function (Router $api) {
27
+$api->version('v1', function(Router $api) {
28 28
 
29 29
     // Set our namespace for the underlying routes
30 30
     $api->group([
@@ -35,21 +35,21 @@  discard block
 block discarded – undo
35 35
         ],
36 36
         'limit'      => 200,
37 37
         'expires'    => 5,
38
-    ], function (Router $api) {
38
+    ], function(Router $api) {
39 39
 
40 40
         $api->get('/', 'BaseController@apiInformation');
41 41
 
42 42
         // Login route
43
-        $api->post('login', 'Auth\AuthController@authenticate');                                                      // docs done
43
+        $api->post('login', 'Auth\AuthController@authenticate'); // docs done
44 44
         $api->post('register', 'Auth\AuthController@register');
45 45
 
46 46
         $api->get('auth/refresh', 'Auth\AuthController@token');
47 47
 
48 48
         // All routes in here are protected and thus need a valid token
49
-        $api->group(['protected' => true, 'middleware' => 'jwt.auth'], function (Router $api) {
49
+        $api->group(['protected' => true, 'middleware' => 'jwt.auth'], function(Router $api) {
50 50
 
51 51
             // Authentication
52
-            $api->get('logout', 'Auth\AuthController@logout');                                                        // docs done
52
+            $api->get('logout', 'Auth\AuthController@logout'); // docs done
53 53
             $api->get('users/me', 'Auth\AuthController@me');
54 54
             $api->post('sidebar', 'Auth\AuthController@sidebar');
55 55
 
@@ -57,27 +57,27 @@  discard block
 block discarded – undo
57 57
             $api->get('employee/{employee}', 'EmployeeController@show');
58 58
 
59 59
             // Profile
60
-            $api->group(['prefix' => 'profile', 'namespace' => 'Profile'], function (Router $api) {
61
-                $api->patch('personal-details', 'PersonalDetailsController@update');                                  // docs done
60
+            $api->group(['prefix' => 'profile', 'namespace' => 'Profile'], function(Router $api) {
61
+                $api->patch('personal-details', 'PersonalDetailsController@update'); // docs done
62 62
 
63
-                $api->patch('contact-details', 'PersonalDetailsController@update');                                   // docs done
63
+                $api->patch('contact-details', 'PersonalDetailsController@update'); // docs done
64 64
 
65
-                $api->post('emergency-contacts', 'EmergencyContactsController@store');                                // docs done
66
-                $api->patch('emergency-contacts', 'EmergencyContactsController@update');                              // docs done
67
-                $api->delete('emergency-contacts/{emergency_contact}', 'EmergencyContactsController@destroy');        // docs done
65
+                $api->post('emergency-contacts', 'EmergencyContactsController@store'); // docs done
66
+                $api->patch('emergency-contacts', 'EmergencyContactsController@update'); // docs done
67
+                $api->delete('emergency-contacts/{emergency_contact}', 'EmergencyContactsController@destroy'); // docs done
68 68
 
69
-                $api->post('dependents', 'DependentsController@store');                                               // docs done
70
-                $api->patch('dependents', 'DependentsController@update');                                             // docs done
71
-                $api->delete('dependents/{dependent}', 'DependentsController@destroy');                               // docs done
69
+                $api->post('dependents', 'DependentsController@store'); // docs done
70
+                $api->patch('dependents', 'DependentsController@update'); // docs done
71
+                $api->delete('dependents/{dependent}', 'DependentsController@destroy'); // docs done
72 72
 
73
-                $api->post('reports-to', 'ReportsToController@store');                                                // docs done
74
-                $api->patch('reports-to', 'ReportsToController@update');                                              // docs done
75
-                $api->delete('reports-to/{employee_supervisor}', 'ReportsToController@destroy');                      // docs done
73
+                $api->post('reports-to', 'ReportsToController@store'); // docs done
74
+                $api->patch('reports-to', 'ReportsToController@update'); // docs done
75
+                $api->delete('reports-to/{employee_supervisor}', 'ReportsToController@destroy'); // docs done
76 76
 
77 77
                 $api->patch('job', 'JobController@update');
78 78
                 $api->delete('job/{job_history}', 'JobController@destroy');
79 79
 
80
-                $api->group(['prefix' => 'qualifications'], function (Router $api) {
80
+                $api->group(['prefix' => 'qualifications'], function(Router $api) {
81 81
                     $api->post('work-experiences', 'QualificationsController@storeWorkExperience');
82 82
                     $api->delete('work-experiences/{work_experience}', 'QualificationsController@destroyWorkExperience');
83 83
                     $api->patch('work-experiences', 'QualificationsController@updateWorkExperience');
@@ -93,16 +93,16 @@  discard block
 block discarded – undo
93 93
             });
94 94
 
95 95
             // PIM
96
-            $api->group(['prefix' => 'pim', 'namespace' => 'PIM'], function (Router $api) {
96
+            $api->group(['prefix' => 'pim', 'namespace' => 'PIM'], function(Router $api) {
97 97
                 $api->get('employee-list', 'EmployeeListController@index');
98 98
 
99 99
                 // Configuration
100
-                $api->group(['prefix' => 'configuration', 'namespace' => 'Configuration'], function (Router $api) {
100
+                $api->group(['prefix' => 'configuration', 'namespace' => 'Configuration'], function(Router $api) {
101 101
 
102
-                    $api->get('termination-reasons', 'TerminationReasonsController@index');                           // docs done
103
-                    $api->get('termination-reasons/{termination_reason}', 'TerminationReasonsController@show');       // docs done
104
-                    $api->post('termination-reasons', 'TerminationReasonsController@store');                          // docs done
105
-                    $api->patch('termination-reasons', 'TerminationReasonsController@update');                        // docs done
102
+                    $api->get('termination-reasons', 'TerminationReasonsController@index'); // docs done
103
+                    $api->get('termination-reasons/{termination_reason}', 'TerminationReasonsController@show'); // docs done
104
+                    $api->post('termination-reasons', 'TerminationReasonsController@store'); // docs done
105
+                    $api->patch('termination-reasons', 'TerminationReasonsController@update'); // docs done
106 106
                     $api->delete('termination-reasons/{termination_reason}', 'TerminationReasonsController@destroy'); // docs done
107 107
 
108 108
                     $api->get('custom-field-sections', 'CustomFieldsController@index');
@@ -119,41 +119,41 @@  discard block
 block discarded – undo
119 119
             });
120 120
 
121 121
             // Admin
122
-            $api->group(['prefix' => 'admin', 'namespace' => 'Admin'], function (Router $api) {
122
+            $api->group(['prefix' => 'admin', 'namespace' => 'Admin'], function(Router $api) {
123 123
 
124 124
                 // Job
125
-                $api->group(['prefix' => 'job', 'namespace' => 'Job'], function (Router $api) {
126
-                    $api->get('titles', 'JobTitlesController@index');                                                 // docs done
127
-                    $api->get('titles/{job_title}', 'JobTitlesController@show');                                      // docs done
128
-                    $api->post('titles', 'JobTitlesController@store');                                                // docs done
129
-                    $api->patch('titles', 'JobTitlesController@update');                                              // docs done
130
-                    $api->delete('titles/{job_title}', 'JobTitlesController@destroy');                                // docs done
131
-
132
-                    $api->get('employment-status', 'EmploymentStatusController@index');                               // docs done
133
-                    $api->get('employment-status/{employment_status}', 'EmploymentStatusController@show');            // docs done
134
-                    $api->post('employment-status', 'EmploymentStatusController@store');                              // docs done
135
-                    $api->patch('employment-status', 'EmploymentStatusController@update');                            // docs done
136
-                    $api->delete('employment-status/{employment_status}', 'EmploymentStatusController@destroy');      // docs done
137
-
138
-                    $api->get('pay-grades', 'PayGradesController@index');                                             // docs done
139
-                    $api->get('pay-grades/{pay_grade}', 'PayGradesController@show');                                  // docs done
140
-                    $api->post('pay-grades', 'PayGradesController@store');                                            // docs done
141
-                    $api->patch('pay-grades', 'PayGradesController@update');                                          // docs done
142
-                    $api->delete('pay-grades/{pay_grade}', 'PayGradesController@destroy');                            // docs done
125
+                $api->group(['prefix' => 'job', 'namespace' => 'Job'], function(Router $api) {
126
+                    $api->get('titles', 'JobTitlesController@index'); // docs done
127
+                    $api->get('titles/{job_title}', 'JobTitlesController@show'); // docs done
128
+                    $api->post('titles', 'JobTitlesController@store'); // docs done
129
+                    $api->patch('titles', 'JobTitlesController@update'); // docs done
130
+                    $api->delete('titles/{job_title}', 'JobTitlesController@destroy'); // docs done
131
+
132
+                    $api->get('employment-status', 'EmploymentStatusController@index'); // docs done
133
+                    $api->get('employment-status/{employment_status}', 'EmploymentStatusController@show'); // docs done
134
+                    $api->post('employment-status', 'EmploymentStatusController@store'); // docs done
135
+                    $api->patch('employment-status', 'EmploymentStatusController@update'); // docs done
136
+                    $api->delete('employment-status/{employment_status}', 'EmploymentStatusController@destroy'); // docs done
137
+
138
+                    $api->get('pay-grades', 'PayGradesController@index'); // docs done
139
+                    $api->get('pay-grades/{pay_grade}', 'PayGradesController@show'); // docs done
140
+                    $api->post('pay-grades', 'PayGradesController@store'); // docs done
141
+                    $api->patch('pay-grades', 'PayGradesController@update'); // docs done
142
+                    $api->delete('pay-grades/{pay_grade}', 'PayGradesController@destroy'); // docs done
143 143
                 });
144 144
 
145 145
                 // Qualification
146
-                $api->group(['prefix' => 'qualifications', 'namespace' => 'Qualifications'], function (Router $api) {
147
-                    $api->get('educations', 'EducationsController@index');                                            // docs done
148
-                    $api->get('educations/{education_level}', 'EducationsController@show');                           // docs done
149
-                    $api->post('educations', 'EducationsController@store');                                           // docs done
150
-                    $api->patch('educations', 'EducationsController@update');                                         // docs done
151
-                    $api->delete('educations/{education_level}', 'EducationsController@destroy');                     // docs done
146
+                $api->group(['prefix' => 'qualifications', 'namespace' => 'Qualifications'], function(Router $api) {
147
+                    $api->get('educations', 'EducationsController@index'); // docs done
148
+                    $api->get('educations/{education_level}', 'EducationsController@show'); // docs done
149
+                    $api->post('educations', 'EducationsController@store'); // docs done
150
+                    $api->patch('educations', 'EducationsController@update'); // docs done
151
+                    $api->delete('educations/{education_level}', 'EducationsController@destroy'); // docs done
152 152
                 });
153 153
             });
154 154
 
155 155
             // Presence
156
-            $api->group(['prefix' => 'presence', 'namespace' => 'Presence'], function (Router $api) {
156
+            $api->group(['prefix' => 'presence', 'namespace' => 'Presence'], function(Router $api) {
157 157
                 $api->get('timelogs', 'TimelogController@index');
158 158
                 $api->get('alert/time-in', 'TimelogController@attemptTimeIn');
159 159
                 $api->get('alert/time-out', 'TimelogController@attemptTimeOut');
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
             });
164 164
 
165 165
             // Chosen
166
-            $api->get('cities', 'LookupTableController@cities');                                                      // docs done
167
-            $api->get('countries', 'LookupTableController@countries');                                                // docs done
168
-            $api->get('departments', 'LookupTableController@departments');                                            // docs done
169
-            $api->get('education-levels', 'LookupTableController@educationLevels');                                   // docs done
170
-            $api->get('employment-statuses', 'LookupTableController@employmentStatuses');                             // docs done
171
-            $api->get('job-titles', 'LookupTableController@jobTitles');                                               // docs done
172
-            $api->get('locations', 'LookupTableController@locations');                                                // docs done
173
-            $api->get('marital-statuses', 'LookupTableController@maritalStatuses');                                   // docs done
174
-            $api->get('screens', 'LookupTableController@screens');                                                    // docs done
175
-            $api->get('types', 'LookupTableController@types');                                                        // docs done
176
-            $api->get('nationalities', 'LookupTableController@nationalities');                                        // docs done
177
-            $api->get('provinces', 'LookupTableController@provinces');                                                // docs done
178
-            $api->get('relationships', 'LookupTableController@relationships');                                        // docs done
179
-            $api->get('skills', 'LookupTableController@skills');                                                      // docs done
166
+            $api->get('cities', 'LookupTableController@cities'); // docs done
167
+            $api->get('countries', 'LookupTableController@countries'); // docs done
168
+            $api->get('departments', 'LookupTableController@departments'); // docs done
169
+            $api->get('education-levels', 'LookupTableController@educationLevels'); // docs done
170
+            $api->get('employment-statuses', 'LookupTableController@employmentStatuses'); // docs done
171
+            $api->get('job-titles', 'LookupTableController@jobTitles'); // docs done
172
+            $api->get('locations', 'LookupTableController@locations'); // docs done
173
+            $api->get('marital-statuses', 'LookupTableController@maritalStatuses'); // docs done
174
+            $api->get('screens', 'LookupTableController@screens'); // docs done
175
+            $api->get('types', 'LookupTableController@types'); // docs done
176
+            $api->get('nationalities', 'LookupTableController@nationalities'); // docs done
177
+            $api->get('provinces', 'LookupTableController@provinces'); // docs done
178
+            $api->get('relationships', 'LookupTableController@relationships'); // docs done
179
+            $api->get('skills', 'LookupTableController@skills'); // docs done
180 180
         });
181 181
 
182 182
         $api->get('playground', 'PlaygroundController@index');
Please login to merge, or discard this patch.
app/Api/Controllers/Admin/Qualifications/EducationsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
     {
177 177
         $education_levels = $this->education_level->paginate(ROWS_PER_PAGE);
178 178
 
179
-        $data =  ['data' => $education_levels, 'table' => $this->setupDataTable($education_levels)];
179
+        $data = ['data' => $education_levels, 'table' => $this->setupDataTable($education_levels)];
180 180
 
181 181
         return $this->responseAPI(200, SUCCESS_RETRIEVE_MESSAGE, $data);
182 182
     }
Please login to merge, or discard this patch.