Completed
Push — master ( 008aa0...00b67b )
by Christopher
13:47 queued 06:29
created
src/routes.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -21,35 +21,35 @@  discard block
 block discarded – undo
21 21
 // USER
22 22
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 23
 
24
-$app->group('/user', function () {
25
-    $this->get('s', UserController::class.':getAllUsers')->setName('users');
24
+$app->group('/user', function() {
25
+    $this->get('s', UserController::class . ':getAllUsers')->setName('users');
26 26
 
27
-    $this->get('/{id}/widget-only', UserController::class.':getUserWidgetOnly')->setName('user-widget-only');
27
+    $this->get('/{id}/widget-only', UserController::class . ':getUserWidgetOnly')->setName('user-widget-only');
28 28
 
29
-    $this->get('/new', UserController::class.':getNewUserForm')->setName('user-new');
30
-    $this->get('/{id}/edit', UserController::class.':getUserEditForm')->setName('user-edit');
31
-    $this->get('/{id}/password', UserController::class.':getUserPasswordForm')->setName('user-password');
29
+    $this->get('/new', UserController::class . ':getNewUserForm')->setName('user-new');
30
+    $this->get('/{id}/edit', UserController::class . ':getUserEditForm')->setName('user-edit');
31
+    $this->get('/{id}/password', UserController::class . ':getUserPasswordForm')->setName('user-password');
32 32
 
33
-    $this->get('/me', UserController::class.':getCurrentUser')->setName('user-me');
34
-    $this->get('/{id}', UserController::class.':getUser')->setName('user');
33
+    $this->get('/me', UserController::class . ':getCurrentUser')->setName('user-me');
34
+    $this->get('/{id}', UserController::class . ':getUser')->setName('user');
35 35
 
36
-    $this->post('[/{id}]', UserController::class.':postUser')->setName('user-post');
37
-    $this->post('/{id}/password', UserController::class.':postUserPasswordChange')->setName('user-password-post');
36
+    $this->post('[/{id}]', UserController::class . ':postUser')->setName('user-post');
37
+    $this->post('/{id}/password', UserController::class . ':postUserPasswordChange')->setName('user-password-post');
38 38
 
39 39
     // roles
40
-    $this->get('/{id}/roles', RoleController::class.':getAssignRolesForm')->setName('user-roles');
41
-    $this->post('/{id}/roles', RoleController::class.':postUserAssignRoles')->setName('user-assign-post');
40
+    $this->get('/{id}/roles', RoleController::class . ':getAssignRolesForm')->setName('user-roles');
41
+    $this->post('/{id}/roles', RoleController::class . ':postUserAssignRoles')->setName('user-assign-post');
42 42
 
43 43
     // availability
44
-    $this->get('/{id}/availability', AvailabilityController::class.':getAvailabilityForm')->setName('user-availability');
45
-    $this->post('/{id}/availability', AvailabilityController::class.':postAvailability')->setName('user-availability-post');
44
+    $this->get('/{id}/availability', AvailabilityController::class . ':getAvailabilityForm')->setName('user-availability');
45
+    $this->post('/{id}/availability', AvailabilityController::class . ':postAvailability')->setName('user-availability-post');
46 46
 
47 47
     // calendar
48
-    $this->group('/me/calendar', function () {
49
-        $this->get('s', CalendarController::class.':getCalendarTokens')->setName('user-calendars');
50
-        $this->get('/new', CalendarController::class.':getNewCalendarForm')->setName('user-calendars');
51
-        $this->get('/{id}/revoke', CalendarController::class.':getRevokeCalendar')->setName('user-calendar-revoke');
52
-        $this->post('/new', CalendarController::class.':postNewCalendar')->setName('user-calendar-new-post');
48
+    $this->group('/me/calendar', function() {
49
+        $this->get('s', CalendarController::class . ':getCalendarTokens')->setName('user-calendars');
50
+        $this->get('/new', CalendarController::class . ':getNewCalendarForm')->setName('user-calendars');
51
+        $this->get('/{id}/revoke', CalendarController::class . ':getRevokeCalendar')->setName('user-calendar-revoke');
52
+        $this->post('/new', CalendarController::class . ':postNewCalendar')->setName('user-calendar-new-post');
53 53
     });
54 54
 });
55 55
 
@@ -57,103 +57,103 @@  discard block
 block discarded – undo
57 57
 // EVENT
58 58
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59 59
 
60
-$app->group('/event', function () {
61
-    $this->get('s', EventController::class.':getAllEvents')->setName('events');
62
-    $this->get('s/type/{id}', EventController::class.':getAllEventsWithType')->setName('events-eventtype');
63
-    $this->get('s/subtype/{id}', EventController::class.':getAllEventsWithSubType')->setName('events-eventsubtype');
60
+$app->group('/event', function() {
61
+    $this->get('s', EventController::class . ':getAllEvents')->setName('events');
62
+    $this->get('s/type/{id}', EventController::class . ':getAllEventsWithType')->setName('events-eventtype');
63
+    $this->get('s/subtype/{id}', EventController::class . ':getAllEventsWithSubType')->setName('events-eventsubtype');
64 64
 
65
-    $this->get('s/print/info', EventController::class.':getAllEventInfoToPrint')->setName('events-print-info');
65
+    $this->get('s/print/info', EventController::class . ':getAllEventInfoToPrint')->setName('events-print-info');
66 66
 
67
-    $this->get('/new', EventController::class.':getNewEventForm')->setName('event-new');
68
-    $this->get('/{id}/edit', EventController::class.':getEventEditForm')->setName('event-edit');
69
-    $this->get('/{id}/copy', EventController::class.':getEventCopyForm')->setName('event-copy');
70
-    $this->get('/{id}/assign', EventController::class.':getEventAssignForm')->setName('event-assign');
67
+    $this->get('/new', EventController::class . ':getNewEventForm')->setName('event-new');
68
+    $this->get('/{id}/edit', EventController::class . ':getEventEditForm')->setName('event-edit');
69
+    $this->get('/{id}/copy', EventController::class . ':getEventCopyForm')->setName('event-copy');
70
+    $this->get('/{id}/assign', EventController::class . ':getEventAssignForm')->setName('event-assign');
71 71
 
72
-    $this->get('/{id}', EventController::class.':getEvent')->setName('event');
72
+    $this->get('/{id}', EventController::class . ':getEvent')->setName('event');
73 73
 
74
-    $this->post('[/{id}]', EventController::class.':postEvent')->setName('event-post');
75
-    $this->post('/{id}/assign', EventController::class.':postEventAssign')->setName('event-assign-post');
76
-    $this->post('/{id}/comment', EventController::class.':postEventComment')->setName('event-comment-post');
74
+    $this->post('[/{id}]', EventController::class . ':postEvent')->setName('event-post');
75
+    $this->post('/{id}/assign', EventController::class . ':postEventAssign')->setName('event-assign-post');
76
+    $this->post('/{id}/comment', EventController::class . ':postEventComment')->setName('event-comment-post');
77 77
 });
78 78
 
79 79
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 80
 // RESOURCE
81 81
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82 82
 
83
-$app->group('/resource', function () {
84
-    $this->get('s', ResourceController::class.':getAllResources')->setName('resources');
83
+$app->group('/resource', function() {
84
+    $this->get('s', ResourceController::class . ':getAllResources')->setName('resources');
85 85
 
86
-    $this->get('[/new]', ResourceController::class.':getNewResourceForm')->setName('resource-new');
87
-    $this->get('/{id}/edit', ResourceController::class.':getResourceEditForm')->setName('resource-edit');
86
+    $this->get('[/new]', ResourceController::class . ':getNewResourceForm')->setName('resource-new');
87
+    $this->get('/{id}/edit', ResourceController::class . ':getResourceEditForm')->setName('resource-edit');
88 88
 
89
-    $this->get('/{id}', ResourceController::class.':getResourceFile')->setName('resource');
89
+    $this->get('/{id}', ResourceController::class . ':getResourceFile')->setName('resource');
90 90
 
91
-    $this->post('[/{id}]', ResourceController::class.':postResource')->setName('resource-post');
91
+    $this->post('[/{id}]', ResourceController::class . ':postResource')->setName('resource-post');
92 92
 });
93 93
 
94 94
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95 95
 // ROLES & GROUPS
96 96
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 97
 
98
-$app->group('/group', function () {
99
-    $this->get('/{id}', GroupController::class.':getGroup')->setName('group');
100
-    $this->get('/{id}/roles', GroupController::class.':getGroupRoles')->setName('group-roles');
98
+$app->group('/group', function() {
99
+    $this->get('/{id}', GroupController::class . ':getGroup')->setName('group');
100
+    $this->get('/{id}/roles', GroupController::class . ':getGroupRoles')->setName('group-roles');
101 101
 
102
-    $this->get('/{id}/events', EventController::class.':getAllEventsToPrintForGroup')->setName('group-events-print');
102
+    $this->get('/{id}/events', EventController::class . ':getAllEventsToPrintForGroup')->setName('group-events-print');
103 103
 
104
-    $this->post('[/{id}]', GroupController::class.':postGroup')->setName('group-post');
104
+    $this->post('[/{id}]', GroupController::class . ':postGroup')->setName('group-post');
105 105
 });
106 106
 
107 107
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108 108
 // AUTH
109 109
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110 110
 
111
-$app->get('/login', AuthController::class.':getLoginForm')->setName('login');
111
+$app->get('/login', AuthController::class . ':getLoginForm')->setName('login');
112 112
 
113
-$app->get('/login/{provider}', AuthController::class.':getLoginAuth')->setName('login-auth');
114
-$app->get('/login/{provider}/callback', AuthController::class.':getLoginCallback')->setName('login-callback');
115
-$app->get('/signup', PendingUserController::class.':getSignUpForm')->setName('sign-up');
116
-$app->get('/signup/cancel', PendingUserController::class.':getSignUpCancel')->setName('sign-up-cancel');
113
+$app->get('/login/{provider}', AuthController::class . ':getLoginAuth')->setName('login-auth');
114
+$app->get('/login/{provider}/callback', AuthController::class . ':getLoginCallback')->setName('login-callback');
115
+$app->get('/signup', PendingUserController::class . ':getSignUpForm')->setName('sign-up');
116
+$app->get('/signup/cancel', PendingUserController::class . ':getSignUpCancel')->setName('sign-up-cancel');
117 117
 
118
-$app->get('/logout', AuthController::class.':getLogout')->setName('logout');
118
+$app->get('/logout', AuthController::class . ':getLogout')->setName('logout');
119 119
 
120
-$app->post('/login', AuthController::class.':postLogin')->setName('login-post');
121
-$app->post('/signup', PendingUserController::class.':postSignUp')->setName('sign-up-post');
120
+$app->post('/login', AuthController::class . ':postLogin')->setName('login-post');
121
+$app->post('/signup', PendingUserController::class . ':postSignUp')->setName('sign-up-post');
122 122
 
123 123
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124 124
 // NOTIFICATIONS
125 125
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126 126
 
127
-$app->get('/notification/{id}[/{referrer}]', NotificationController::class.':getNotificationClick')->setName('notification');
127
+$app->get('/notification/{id}[/{referrer}]', NotificationController::class . ':getNotificationClick')->setName('notification');
128 128
 
129 129
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130 130
 // CALENDAR
131 131
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132 132
 
133
-$app->get('/calendar/{token}.{format}', CalendarController::class.':getRenderedCalendar')->setName('user-calendar');
133
+$app->get('/calendar/{token}.{format}', CalendarController::class . ':getRenderedCalendar')->setName('user-calendar');
134 134
 
135 135
 // legacy
136
-$app->get('/calendar.php', CalendarController::class.':getLegacyRenderedCalendar')->setName('user-calendar');
136
+$app->get('/calendar.php', CalendarController::class . ':getLegacyRenderedCalendar')->setName('user-calendar');
137 137
 
138 138
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
139 139
 // OTHER
140 140
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141 141
 
142
-$app->get('/settings', function ($request, $response, $args) {
142
+$app->get('/settings', function($request, $response, $args) {
143 143
     // Sample log message
144 144
     $this->logger->info("Fetch settings GET '/settings'");
145 145
 
146
-    $url = $this->router->pathFor('home').'old/settings.php';
146
+    $url = $this->router->pathFor('home') . 'old/settings.php';
147 147
 
148 148
     return $response->withStatus(303)->withHeader('Location', $url);
149 149
     //return $this->view->render($response, 'settings.twig', []);
150 150
 })->setName('settings');
151 151
 
152
-$app->get('/token', function ($request, $response, $args) {
152
+$app->get('/token', function($request, $response, $args) {
153 153
     return $response->getBody()->write(Crypt::generateToken(30));
154 154
 })->setName('token');
155 155
 
156
-$app->get('/', function ($request, $response, $args) {
156
+$app->get('/', function($request, $response, $args) {
157 157
     // Sample log message
158 158
     $this->logger->info("Fetch home GET '/'");
159 159
 
@@ -173,6 +173,6 @@  discard block
 block discarded – undo
173 173
 // JOBS
174 174
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175 175
 
176
-$app->group('/job', function () {
177
-    $this->get('/daily/{token}', JobController::class.':getDaily')->setName('job-daily');
176
+$app->group('/job', function() {
177
+    $this->get('/daily/{token}', JobController::class . ':getDaily')->setName('job-daily');
178 178
 });
Please login to merge, or discard this patch.
src/classes/Controller/JobController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         }
20 20
 
21 21
         $client = new Client();
22
-        $url = $site->getUrl()['base'].$this->router->pathFor('home').'old/cr_daily.php';
22
+        $url = $site->getUrl()['base'] . $this->router->pathFor('home') . 'old/cr_daily.php';
23 23
         $response = $client->get($url, [
24 24
             'query' => [
25 25
                 'token' => $args['token'],
Please login to merge, or discard this patch.