@@ -47,7 +47,7 @@ |
||
47 | 47 | break; |
48 | 48 | case 'unlink': |
49 | 49 | removeSocialAuthFromUserWithId($id, $platform); |
50 | - createNotificationForUser($id, ucfirst($platform).' account unlinked', 'You have successfully unlinked your Facebook account. Login via Facebook is now disabled for your account. Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php'); |
|
50 | + createNotificationForUser($id, ucfirst($platform) . ' account unlinked', 'You have successfully unlinked your Facebook account. Login via Facebook is now disabled for your account. Feel free to relink your account at any time.', 'account', 'linkSocialAuth.php'); |
|
51 | 51 | break; |
52 | 52 | |
53 | 53 | default: |
@@ -6,31 +6,31 @@ |
||
6 | 6 | // To help the built-in PHP dev server, check if the request was actually for |
7 | 7 | // something which should probably be served as a static file |
8 | 8 | $url = parse_url($_SERVER['REQUEST_URI']); |
9 | - $file = __DIR__.$url['path']; |
|
9 | + $file = __DIR__ . $url['path']; |
|
10 | 10 | if (is_file($file)) { |
11 | 11 | return false; |
12 | 12 | } |
13 | 13 | } |
14 | 14 | |
15 | -require __DIR__.'/../vendor/autoload.php'; |
|
15 | +require __DIR__ . '/../vendor/autoload.php'; |
|
16 | 16 | |
17 | 17 | // setup Propel (autoload configured though composer) |
18 | -require_once __DIR__.'/../generated-conf/config.php'; |
|
18 | +require_once __DIR__ . '/../generated-conf/config.php'; |
|
19 | 19 | |
20 | 20 | session_start(); |
21 | 21 | |
22 | 22 | // Instantiate the app |
23 | -$settings = require __DIR__.'/../src/settings.php'; |
|
23 | +$settings = require __DIR__ . '/../src/settings.php'; |
|
24 | 24 | $app = new \Slim\App($settings); |
25 | 25 | |
26 | 26 | // Set up dependencies |
27 | -require __DIR__.'/../src/dependencies.php'; |
|
27 | +require __DIR__ . '/../src/dependencies.php'; |
|
28 | 28 | |
29 | 29 | // Register middleware |
30 | -require __DIR__.'/../src/middleware.php'; |
|
30 | +require __DIR__ . '/../src/middleware.php'; |
|
31 | 31 | |
32 | 32 | // Register routes |
33 | -require __DIR__.'/../src/routes.php'; |
|
33 | +require __DIR__ . '/../src/routes.php'; |
|
34 | 34 | |
35 | 35 | // Run app |
36 | 36 | $app->run(); |
@@ -22,16 +22,16 @@ |
||
22 | 22 | } |
23 | 23 | //$acceptedFileExtensions = ['jpg', 'png', 'jpeg', 'gif', 'docx', 'pdf', 'xlsx', 'pptx']; |
24 | 24 | $acceptedFileTypes = ['image/gif', 'image/png', 'image/jpeg', 'application/pdf', 'application/msword', 'application/excel']; |
25 | - $target_dir = __DIR__.'/../documents/'; |
|
25 | + $target_dir = __DIR__ . '/../documents/'; |
|
26 | 26 | $this->setUrl($file->getClientFilename()); |
27 | 27 | //$fileExtension = pathinfo(basename($file->getName()),PATHINFO_EXTENSION); |
28 | 28 | |
29 | 29 | // Allow certain file formats only |
30 | 30 | if (!in_array($file->getClientMediaType(), $acceptedFileTypes)) { |
31 | - throw new InvalidArgumentException('Sorry, only '.implode(', ', $acceptedFileTypes).' files are allowed.'); |
|
31 | + throw new InvalidArgumentException('Sorry, only ' . implode(', ', $acceptedFileTypes) . ' files are allowed.'); |
|
32 | 32 | } |
33 | 33 | $this->save(); |
34 | - $target_file = $target_dir.$this->getId(); |
|
34 | + $target_file = $target_dir . $this->getId(); |
|
35 | 35 | |
36 | 36 | // Check if file already exists |
37 | 37 | if (file_exists($target_file)) { |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require __DIR__.'/../config/database.php'; |
|
4 | -require __DIR__.'/../config/auth.php'; |
|
5 | -require __DIR__.'/../config/email.php'; |
|
6 | -require __DIR__.'/../config/recording.php'; |
|
3 | +require __DIR__ . '/../config/database.php'; |
|
4 | +require __DIR__ . '/../config/auth.php'; |
|
5 | +require __DIR__ . '/../config/email.php'; |
|
6 | +require __DIR__ . '/../config/recording.php'; |
|
7 | 7 | |
8 | 8 | function getConfig() |
9 | 9 | { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__.'/config.php'; |
|
3 | +require_once __DIR__ . '/config.php'; |
|
4 | 4 | |
5 | 5 | $config = getConfig(); |
6 | 6 | |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | |
13 | 13 | // Renderer settings |
14 | 14 | 'renderer' => [ |
15 | - 'template_path' => __DIR__.'/../templates/', |
|
15 | + 'template_path' => __DIR__ . '/../templates/', |
|
16 | 16 | ], |
17 | 17 | |
18 | 18 | // Monolog settings |
19 | 19 | 'logger' => [ |
20 | 20 | 'name' => 'rota', |
21 | - 'path' => __DIR__.'/../logs/app.log', |
|
21 | + 'path' => __DIR__ . '/../logs/app.log', |
|
22 | 22 | 'level' => \Monolog\Logger::DEBUG, |
23 | 23 | ], |
24 | 24 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $hostname = $_SERVER['HTTP_HOST']; |
40 | 40 | |
41 | 41 | return [ |
42 | - 'base' => $http.'://'.$hostname, |
|
42 | + 'base' => $http . '://' . $hostname, |
|
43 | 43 | 'protocol' => $http, |
44 | 44 | 'host' => $hostname, |
45 | 45 | ]; |
@@ -71,7 +71,7 @@ |
||
71 | 71 | $base_uri = $this->guzzle->getConfig()['base_uri']; |
72 | 72 | |
73 | 73 | if (strlen($base_uri) > 0) { |
74 | - $url = $base_uri.'/account/new?forgot=true'; |
|
74 | + $url = $base_uri . '/account/new?forgot=true'; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | return $url; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public static function generateInt($min, $max) |
33 | 33 | { |
34 | 34 | if ($min >= $max) { |
35 | - throw new InvalidArgumentException('Invalid constraints - minimum ('.$min.') is above the maximum ('.$max.')'); |
|
35 | + throw new InvalidArgumentException('Invalid constraints - minimum (' . $min . ') is above the maximum (' . $max . ')'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | if (function_exists('random_int')) { // use secure random numbers when available |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | public function getAvailabilityForm(ServerRequestInterface $request, ResponseInterface $response, $args) |
16 | 16 | { |
17 | - $this->logger->info("Fetch user availability GET '/user/".$args['id']."/availability'"); |
|
17 | + $this->logger->info("Fetch user availability GET '/user/" . $args['id'] . "/availability'"); |
|
18 | 18 | |
19 | 19 | $u = UserQuery::create()->findPk($args['id']); |
20 | 20 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public function postAvailability(ServerRequestInterface $request, ResponseInterface $response, $args) |
35 | 35 | { |
36 | - $this->logger->info("Update user availability POST '/user/".$args['id']."/availability'"); |
|
36 | + $this->logger->info("Update user availability POST '/user/" . $args['id'] . "/availability'"); |
|
37 | 37 | |
38 | 38 | $u = UserQuery::create() |
39 | 39 | ->findPk($args['id']); |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | $a->setAvailable(false); |
63 | 63 | } |
64 | 64 | |
65 | - if (strlen($data['event'.$eventId.'comment']) > 0) { |
|
66 | - $a->setComment($data['event'.$eventId.'comment']); |
|
65 | + if (strlen($data['event' . $eventId . 'comment']) > 0) { |
|
66 | + $a->setComment($data['event' . $eventId . 'comment']); |
|
67 | 67 | } else { |
68 | 68 | $a->setComment(null); |
69 | 69 | } |