Completed
Pull Request — master (#26)
by Christopher
07:26
created
api-classes/SubType.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
         }
21 21
 
22 22
         $data = [
23
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
-      ['field' => 'description', 'type' => 'string', 'value' => $this->description],
23
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
+        ['field' => 'description', 'type' => 'string', 'value' => $this->description],
25 25
     ];
26 26
 
27 27
         $db->insert($this->db_table, $data);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $whereCondition = 'id = '.$id;
44 44
         $where = [
45
-      $whereCondition,
45
+        $whereCondition,
46 46
     ];
47 47
 
48 48
         if ($db->delete($this->db_table, $where)) {
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         $columns = [
65
-      'id',
66
-      'name',
67
-      'description',
65
+        'id',
66
+        'name',
67
+        'description',
68 68
     ];
69 69
 
70 70
         $whereCondition = 'id = '.$id;
71 71
         $where = [
72
-      $whereCondition,
72
+        $whereCondition,
73 73
     ];
74 74
 
75 75
         $result = $db->selectSingle('SubType', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function createInDb(Database $db)
17 17
     {
18 18
         if (empty($this->name) || empty($this->description)) {
19
-            throw new Exception('Series name ('.$this->name.') or description ('.$this->description.') cannot be empty.');
19
+            throw new Exception('Series name (' . $this->name . ') or description (' . $this->description . ') cannot be empty.');
20 20
         }
21 21
 
22 22
         $data = [
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             throw new Exception('Sub Type id cannot be null');
41 41
         }
42 42
 
43
-        $whereCondition = 'id = '.$id;
43
+        $whereCondition = 'id = ' . $id;
44 44
         $where = [
45 45
       $whereCondition,
46 46
     ];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
       'description',
68 68
     ];
69 69
 
70
-        $whereCondition = 'id = '.$id;
70
+        $whereCondition = 'id = ' . $id;
71 71
         $where = [
72 72
       $whereCondition,
73 73
     ];
Please login to merge, or discard this patch.
api-classes/Location.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
         }
21 21
 
22 22
         $data = [
23
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
-      ['field' => 'address', 'type' => 'string', 'value' => $this->address],
23
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
24
+        ['field' => 'address', 'type' => 'string', 'value' => $this->address],
25 25
     ];
26 26
 
27 27
         $db->insert($this->db_table, $data);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         $whereCondition = 'id = '.$id;
41 41
         $where = [
42
-      $whereCondition,
42
+        $whereCondition,
43 43
     ];
44 44
 
45 45
         if ($db->delete($this->db_table, $where)) {
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
         }
60 60
 
61 61
         $columns = [
62
-      'id',
63
-      'name',
64
-      'address',
62
+        'id',
63
+        'name',
64
+        'address',
65 65
     ];
66 66
 
67 67
         $whereCondition = 'id = '.$id;
68 68
         $where = [
69
-      $whereCondition,
69
+        $whereCondition,
70 70
     ];
71 71
 
72 72
         $result = $db->selectSingle('Location', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function createInDb(Database $db)
17 17
     {
18 18
         if (empty($this->name)) {
19
-            throw new Exception('Series name ('.$this->name.') cannot be empty.');
19
+            throw new Exception('Series name (' . $this->name . ') cannot be empty.');
20 20
         }
21 21
 
22 22
         $data = [
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             $id = $this->id;
38 38
         }
39 39
 
40
-        $whereCondition = 'id = '.$id;
40
+        $whereCondition = 'id = ' . $id;
41 41
         $where = [
42 42
       $whereCondition,
43 43
     ];
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
       'address',
65 65
     ];
66 66
 
67
-        $whereCondition = 'id = '.$id;
67
+        $whereCondition = 'id = ' . $id;
68 68
         $where = [
69 69
       $whereCondition,
70 70
     ];
Please login to merge, or discard this patch.
api-classes/Series.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         $data = [
39
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
40
-      ['field' => 'description', 'type' => 'string', 'value' => $this->description],
39
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
40
+        ['field' => 'description', 'type' => 'string', 'value' => $this->description],
41 41
     ];
42 42
 
43 43
         $db->insert($this->db_table, $data);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         $whereCondition = 'id = '.$id;
57 57
         $where = [
58
-      $whereCondition,
58
+        $whereCondition,
59 59
     ];
60 60
 
61 61
         if ($db->delete($this->db_table, $where)) {
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         $columns = [
78
-      'id',
79
-      'name',
80
-      'description',
78
+        'id',
79
+        'name',
80
+        'description',
81 81
     ];
82 82
 
83 83
         $whereCondition = 'id = '.$id;
84 84
         $where = [
85
-      $whereCondition,
85
+        $whereCondition,
86 86
     ];
87 87
 
88 88
         $result = $db->selectSingle('Series', $this->db_table, $columns, $where);
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         $columns = [
108
-      'id',
109
-      'name',
110
-      'description',
108
+        'id',
109
+        'name',
110
+        'description',
111 111
     ];
112 112
 
113 113
         $whereCondition = 'name = '.$db->addQuotes($name);
114 114
         $where = [
115
-      $whereCondition,
115
+        $whereCondition,
116 116
     ];
117 117
 
118 118
         $result = $db->selectSingle('Series', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function createInDb(Database $db)
33 33
     {
34 34
         if (empty($this->name) || empty($this->description)) {
35
-            throw new Exception('Series name ('.$this->name.') or description ('.$this->description.') cannot be empty.');
35
+            throw new Exception('Series name (' . $this->name . ') or description (' . $this->description . ') cannot be empty.');
36 36
         }
37 37
 
38 38
         $data = [
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $id = $this->id;
54 54
         }
55 55
 
56
-        $whereCondition = 'id = '.$id;
56
+        $whereCondition = 'id = ' . $id;
57 57
         $where = [
58 58
       $whereCondition,
59 59
     ];
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
       'description',
81 81
     ];
82 82
 
83
-        $whereCondition = 'id = '.$id;
83
+        $whereCondition = 'id = ' . $id;
84 84
         $where = [
85 85
       $whereCondition,
86 86
     ];
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
       'description',
111 111
     ];
112 112
 
113
-        $whereCondition = 'name = '.$db->addQuotes($name);
113
+        $whereCondition = 'name = ' . $db->addQuotes($name);
114 114
         $where = [
115 115
       $whereCondition,
116 116
     ];
Please login to merge, or discard this patch.
src/config.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
src/settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/classes/Site.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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
         ];
Please login to merge, or discard this patch.
src/classes/AuthProvider/UsernamePassword/OneBodyAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/classes/Crypt.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/classes/Controller/NotificationController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function getNotificationClick(ServerRequestInterface $request, ResponseInterface $response, $args)
13 13
     {
14
-        $this->logger->info("Fetch settings GET '/notification/".$args['id']."'");
14
+        $this->logger->info("Fetch settings GET '/notification/" . $args['id'] . "'");
15 15
 
16 16
         $n = NotificationQuery::create()->findPk($args['id']);
17 17
         $click = new NotificationClick();
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
                 return $response->withStatus(302)->withHeader('Location', $this->router->pathFor($link['route'], $link['attributes']));
33 33
             } else {
34
-                return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home').$n->getLink());
34
+                return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home') . $n->getLink());
35 35
             }
36 36
         }
37 37
 
Please login to merge, or discard this patch.