Completed
Pull Request — master (#15)
by Andreas
04:35 queued 02:09
created
config/dependencies.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
 $container = $app->getContainer();
5 5
 
6 6
 // view renderer
7
-$container['renderer'] = function ($c) {
7
+$container['renderer'] = function($c) {
8 8
     $settings = $c->get('settings')['renderer'];
9 9
     return new Slim\Views\PhpRenderer($settings['template_path']);
10 10
 };
11 11
 
12 12
 // monolog
13
-$container['logger'] = function ($c) {
13
+$container['logger'] = function($c) {
14 14
     $settings = $c->get('settings')['logger'];
15 15
     $logger = new Monolog\Logger($settings['name']);
16 16
     $logger->pushProcessor(new Monolog\Processor\UidProcessor());
Please login to merge, or discard this patch.
src/Renderer/TwigRenderer.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
- * THE SOFTWARE.
19
- *
20
- * @author    Andreas Heigl<[email protected]>
21
- * @copyright 2016-2016 Andreas Heigl
22
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
- * @version   0.0
24
- * @since     18.01.2016
25
- * @link      http://github.com/heiglandreas/callingallpapers
26
- */
3
+     * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+     * of this software and associated documentation files (the "Software"), to deal
6
+     * in the Software without restriction, including without limitation the rights
7
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+     * copies of the Software, and to permit persons to whom the Software is
9
+     * furnished to do so, subject to the following conditions:
10
+     * The above copyright notice and this permission notice shall be included in
11
+     * all copies or substantial portions of the Software.
12
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
+     * THE SOFTWARE.
19
+     *
20
+     * @author    Andreas Heigl<[email protected]>
21
+     * @copyright 2016-2016 Andreas Heigl
22
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
+     * @version   0.0
24
+     * @since     18.01.2016
25
+     * @link      http://github.com/heiglandreas/callingallpapers
26
+     */
27 27
 
28 28
 namespace Callingallpapers\Api\Renderer;
29 29
 
Please login to merge, or discard this patch.
src/Renderer/IcalendarRenderer.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a copy
6
- * of this software and associated documentation files (the "Software"), to deal
7
- * in the Software without restriction, including without limitation the rights
8
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- * copies of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included in
13
- * all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- * THE SOFTWARE.
22
- *
23
- * @author    Andreas Heigl<[email protected]>
24
- * @copyright 2016-2016 Andreas Heigl
25
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
26
- * @version   0.0
27
- * @since     16.01.2016
28
- * @link      http://github.com/heiglandreas/callingallpapers
29
- */
3
+     * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
+     *
5
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+     * of this software and associated documentation files (the "Software"), to deal
7
+     * in the Software without restriction, including without limitation the rights
8
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+     * copies of the Software, and to permit persons to whom the Software is
10
+     * furnished to do so, subject to the following conditions:
11
+     *
12
+     * The above copyright notice and this permission notice shall be included in
13
+     * all copies or substantial portions of the Software.
14
+     *
15
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+     * THE SOFTWARE.
22
+     *
23
+     * @author    Andreas Heigl<[email protected]>
24
+     * @copyright 2016-2016 Andreas Heigl
25
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
26
+     * @version   0.0
27
+     * @since     16.01.2016
28
+     * @link      http://github.com/heiglandreas/callingallpapers
29
+     */
30 30
 namespace Callingallpapers\Api\Renderer;
31 31
 
32 32
 use Psr\Http\Message\ResponseInterface;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function render(ResponseInterface $response, array $data = [], $status = 200)
46 46
     {
47 47
         $icalendar = new VCalendar();
48
-        if (! isset($data['cfps'])) {
48
+        if (!isset($data['cfps'])) {
49 49
             $data['cfps'] = [];
50 50
         }
51 51
         foreach ($data['cfps'] as $cfp) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 'DTSTAMP' => $lastChange,
67 67
                 'UID'     => $cfp['_rel']['cfp_uri'],
68 68
                 'DESCRIPTION' => $cfp['description'],
69
-                'GEO'     => round($cfp['latitude'], 6) . ';' . round($cfp['longitude'], 6),
69
+                'GEO'     => round($cfp['latitude'], 6).';'.round($cfp['longitude'], 6),
70 70
                 'LOCATION' => $cfp['location'],
71 71
 
72 72
             ]);
Please login to merge, or discard this patch.
src/Service/CfpFactory.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
- * THE SOFTWARE.
19
- *
20
- * @author    Andreas Heigl<[email protected]>
21
- * @copyright 2016-2016 Andreas Heigl
22
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
- * @version   0.0
24
- * @since     18.02.2016
25
- * @link      http://github.com/heiglandreas/callingallpapers
26
- */
3
+     * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+     * of this software and associated documentation files (the "Software"), to deal
6
+     * in the Software without restriction, including without limitation the rights
7
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+     * copies of the Software, and to permit persons to whom the Software is
9
+     * furnished to do so, subject to the following conditions:
10
+     * The above copyright notice and this permission notice shall be included in
11
+     * all copies or substantial portions of the Software.
12
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
+     * THE SOFTWARE.
19
+     *
20
+     * @author    Andreas Heigl<[email protected]>
21
+     * @copyright 2016-2016 Andreas Heigl
22
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
+     * @version   0.0
24
+     * @since     18.02.2016
25
+     * @link      http://github.com/heiglandreas/callingallpapers
26
+     */
27 27
 
28 28
 namespace Callingallpapers\Api\Service;
29 29
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $missingFields = [];
50 50
 
51 51
         foreach ($requiredFields as $field) {
52
-            if (! isset($params[$field])) {
52
+            if (!isset($params[$field])) {
53 53
                 $missingFields[] = $field;
54 54
             }
55 55
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     public static function setName(Cfp $cfp, array $array)
84 84
     {
85
-        if (! isset($array['name'])) {
85
+        if (!isset($array['name'])) {
86 86
             throw new \InvalidArgumentException('Name has to be specified');
87 87
         }
88 88
         $cfp->setName(filter_var($array['name'], FILTER_SANITIZE_STRING));
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     public static function setDateCfpStart(Cfp $cfp, array $array)
92 92
     {
93
-        if (! isset($array['dateCfpStart'])) {
93
+        if (!isset($array['dateCfpStart'])) {
94 94
             throw new \InvalidArgumentException('CFP-StartDate has to be specified');
95 95
         }
96 96
         $cfp->setDateCfpStart(new DateTimeImmutable($array['dateCfpStart']));
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     public static function setDateCfpEnd(Cfp $cfp, array $array)
100 100
     {
101
-        if (! isset($array['dateCfpEnd'])) {
101
+        if (!isset($array['dateCfpEnd'])) {
102 102
             throw new \InvalidArgumentException('CFP-EndDate has to be specified');
103 103
         }
104 104
         $cfp->setDateCfpEnd(new DateTimeImmutable($array['dateCfpEnd']));
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
     public static function setTimezone(Cfp $cfp, array $array)
108 108
     {
109
-        if (! isset($array['timezone'])) {
109
+        if (!isset($array['timezone'])) {
110 110
             throw new \InvalidArgumentException('Timezone has to be specified');
111 111
         }
112 112
         $cfp->setTimezone(filter_var($array['timezone'], FILTER_SANITIZE_STRING));
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
     public static function setUri(Cfp $cfp, array $array)
116 116
     {
117
-        if (! isset($array['uri'])) {
117
+        if (!isset($array['uri'])) {
118 118
             throw new \InvalidArgumentException('URI has to be specified');
119 119
         }
120 120
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
     public static function setEventUri(Cfp $cfp, array $array)
125 125
     {
126
-        if (! isset($array['eventUri'])) {
126
+        if (!isset($array['eventUri'])) {
127 127
             throw new \InvalidArgumentException('Event-URI has to be specified');
128 128
         }
129 129
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
     public static function setIconUri(Cfp $cfp, array $array)
152 152
     {
153
-        if (! isset($array['iconUri'])) {
153
+        if (!isset($array['iconUri'])) {
154 154
             return;
155 155
         }
156 156
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
     public static function setDescription(Cfp $cfp, array $array)
161 161
     {
162
-        if (! isset($array['description'])) {
162
+        if (!isset($array['description'])) {
163 163
             return;
164 164
         }
165 165
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
     public static function setLocation(Cfp $cfp, array $array)
170 170
     {
171
-        if (! isset($array['location'])) {
171
+        if (!isset($array['location'])) {
172 172
             return;
173 173
         }
174 174
 
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
 
178 178
     public static function setGeolocation(Cfp $cfp, array $array)
179 179
     {
180
-        if (! isset($array['latitude'])) {
180
+        if (!isset($array['latitude'])) {
181 181
             return;
182 182
         }
183 183
 
184
-        if (! isset($array['longitude'])) {
184
+        if (!isset($array['longitude'])) {
185 185
             return;
186 186
         }
187 187
 
@@ -214,18 +214,18 @@  discard block
 block discarded – undo
214 214
 
215 215
     public static function setTags(Cfp $cfp, array $array)
216 216
     {
217
-        if (! isset($array['tags'])) {
217
+        if (!isset($array['tags'])) {
218 218
             return;
219 219
         }
220 220
 
221
-        $cfp->setTags(array_map(function ($item) {
221
+        $cfp->setTags(array_map(function($item) {
222 222
             return filter_var($item, FILTER_SANITIZE_STRING);
223 223
         }, $array['tags']));
224 224
     }
225 225
 
226 226
     public static function setSource(Cfp $cfp, array $array)
227 227
     {
228
-        if (! isset($array['source'])) {
228
+        if (!isset($array['source'])) {
229 229
             return;
230 230
         }
231 231
 
Please login to merge, or discard this patch.
src/Entity/CfpListMapper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
                 'tags'           => $cfp->getTags(),
53 53
                 'lastChange'     => $cfp->getLastUdated()->format('c'),
54 54
                 '_rel'            => [
55
-                    'cfp_uri'    => 'v1/cfp/' . $cfp->getHash(),
55
+                    'cfp_uri'    => 'v1/cfp/'.$cfp->getHash(),
56 56
                 ]
57 57
             ];
58 58
 
Please login to merge, or discard this patch.
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
- * THE SOFTWARE.
19
- *
20
- * @author    Andreas Heigl<[email protected]>
21
- * @copyright 2016-2016 Andreas Heigl
22
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
- * @version   0.0
24
- * @since     16.01.2016
25
- * @link      http://github.com/heiglandreas/callingallpapers
26
- */
3
+     * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+     * of this software and associated documentation files (the "Software"), to deal
6
+     * in the Software without restriction, including without limitation the rights
7
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+     * copies of the Software, and to permit persons to whom the Software is
9
+     * furnished to do so, subject to the following conditions:
10
+     * The above copyright notice and this permission notice shall be included in
11
+     * all copies or substantial portions of the Software.
12
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
+     * THE SOFTWARE.
19
+     *
20
+     * @author    Andreas Heigl<[email protected]>
21
+     * @copyright 2016-2016 Andreas Heigl
22
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
+     * @version   0.0
24
+     * @since     16.01.2016
25
+     * @link      http://github.com/heiglandreas/callingallpapers
26
+     */
27 27
 
28 28
 namespace Callingallpapers\Api\Middleware;
29 29
 
Please login to merge, or discard this patch.
src/Entity/CfpList.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
     public function add(Cfp $cfp)
35 35
     {
36
-        if (! $this->has($cfp)) {
36
+        if (!$this->has($cfp)) {
37 37
             $this->cfps[] = $cfp;
38 38
         }
39 39
     }
Please login to merge, or discard this patch.
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
- * THE SOFTWARE.
19
- *
20
- * @author    Andreas Heigl<[email protected]>
21
- * @copyright 2016-2016 Andreas Heigl
22
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
- * @version   0.0
24
- * @since     16.01.2016
25
- * @link      http://github.com/heiglandreas/callingallpapers
26
- */
3
+     * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+     * of this software and associated documentation files (the "Software"), to deal
6
+     * in the Software without restriction, including without limitation the rights
7
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+     * copies of the Software, and to permit persons to whom the Software is
9
+     * furnished to do so, subject to the following conditions:
10
+     * The above copyright notice and this permission notice shall be included in
11
+     * all copies or substantial portions of the Software.
12
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
+     * THE SOFTWARE.
19
+     *
20
+     * @author    Andreas Heigl<[email protected]>
21
+     * @copyright 2016-2016 Andreas Heigl
22
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
+     * @version   0.0
24
+     * @since     16.01.2016
25
+     * @link      http://github.com/heiglandreas/callingallpapers
26
+     */
27 27
 
28 28
 namespace Callingallpapers\Api\Middleware;
29 29
 
Please login to merge, or discard this patch.
src/Middleware/OAuth.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016 The callingallpapers.com Developer Team
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a copy
6
- * of this software and associated documentation files (the "Software"), to deal
7
- * in the Software without restriction, including without limitation the rights
8
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- * copies of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included in
13
- * all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- * THE SOFTWARE.
22
- *
23
- * @author    Andreas Heigl<[email protected]>
24
- * @copyright 2016-2016 The callingallpapers.com Developer Team
25
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
26
- * @version   0.0
27
- * @since     16.01.2016
28
- * @link      https://github.com/joindin/callingallpapers
29
- */
3
+     * Copyright (c) 2016-2016 The callingallpapers.com Developer Team
4
+     *
5
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+     * of this software and associated documentation files (the "Software"), to deal
7
+     * in the Software without restriction, including without limitation the rights
8
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+     * copies of the Software, and to permit persons to whom the Software is
10
+     * furnished to do so, subject to the following conditions:
11
+     *
12
+     * The above copyright notice and this permission notice shall be included in
13
+     * all copies or substantial portions of the Software.
14
+     *
15
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+     * THE SOFTWARE.
22
+     *
23
+     * @author    Andreas Heigl<[email protected]>
24
+     * @copyright 2016-2016 The callingallpapers.com Developer Team
25
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
26
+     * @version   0.0
27
+     * @since     16.01.2016
28
+     * @link      https://github.com/joindin/callingallpapers
29
+     */
30 30
 
31 31
 namespace Callingallpapers\Api\Middleware;
32 32
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         }
69 69
 
70 70
         $bearer = explode(' ', $auth[0]);
71
-        if (! isset($bearer[1])) {
71
+        if (!isset($bearer[1])) {
72 72
             return $this->getNoAuthResponse($response);
73 73
         }
74 74
         $bearer = $bearer[1];
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
     protected function getNoAuthResponse($response, $error = 'no token', $description = 'No Access-Token provided')
89 89
     {
90
-        $response = $response->withHeader('WWW-Authenticate', 'Bearer realm="callingallpapers", error="' . $error . '", error_desciption="' . $description . '"');
90
+        $response = $response->withHeader('WWW-Authenticate', 'Bearer realm="callingallpapers", error="'.$error.'", error_desciption="'.$description.'"');
91 91
         $response = $response->withStatus(401);
92 92
 
93 93
         return $response;
Please login to merge, or discard this patch.
src/Middleware/Renderer.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
- * THE SOFTWARE.
19
- *
20
- * @author    Andreas Heigl<[email protected]>
21
- * @copyright 2016-2016 Andreas Heigl
22
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
- * @version   0.0
24
- * @since     16.01.2016
25
- * @link      http://github.com/heiglandreas/callingallpapers
26
- */
3
+     * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+     * of this software and associated documentation files (the "Software"), to deal
6
+     * in the Software without restriction, including without limitation the rights
7
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+     * copies of the Software, and to permit persons to whom the Software is
9
+     * furnished to do so, subject to the following conditions:
10
+     * The above copyright notice and this permission notice shall be included in
11
+     * all copies or substantial portions of the Software.
12
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
+     * THE SOFTWARE.
19
+     *
20
+     * @author    Andreas Heigl<[email protected]>
21
+     * @copyright 2016-2016 Andreas Heigl
22
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
+     * @version   0.0
24
+     * @since     16.01.2016
25
+     * @link      http://github.com/heiglandreas/callingallpapers
26
+     */
27 27
 
28 28
 namespace Callingallpapers\Api\Middleware;
29 29
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
         if (strpos($accept[0], 'text/html') !== false) {
61 61
             $container         = $this->app->getContainer();
62
-            $container['view'] = function ($container) {
62
+            $container['view'] = function($container) {
63 63
                 $config = $container['settings'];
64 64
                 $tView  = new \Slim\Views\Twig($config['renderer']['template_path'],
65 65
                     [
Please login to merge, or discard this patch.
src/PersistenceLayer/CfpPersistenceLayer.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
- * Permission is hereby granted, free of charge, to any person obtaining a copy
5
- * of this software and associated documentation files (the "Software"), to deal
6
- * in the Software without restriction, including without limitation the rights
7
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- * copies of the Software, and to permit persons to whom the Software is
9
- * furnished to do so, subject to the following conditions:
10
- * The above copyright notice and this permission notice shall be included in
11
- * all copies or substantial portions of the Software.
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
- * THE SOFTWARE.
19
- *
20
- * @author    Andreas Heigl<[email protected]>
21
- * @copyright 2016-2016 Andreas Heigl
22
- * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
- * @version   0.0
24
- * @since     19.01.2016
25
- * @link      http://github.com/heiglandreas/callingallpapers
26
- */
3
+     * Copyright (c) 2016-2016} Andreas Heigl<[email protected]>
4
+     * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+     * of this software and associated documentation files (the "Software"), to deal
6
+     * in the Software without restriction, including without limitation the rights
7
+     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+     * copies of the Software, and to permit persons to whom the Software is
9
+     * furnished to do so, subject to the following conditions:
10
+     * The above copyright notice and this permission notice shall be included in
11
+     * all copies or substantial portions of the Software.
12
+     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18
+     * THE SOFTWARE.
19
+     *
20
+     * @author    Andreas Heigl<[email protected]>
21
+     * @copyright 2016-2016 Andreas Heigl
22
+     * @license   http://www.opensource.org/licenses/mit-license.php MIT-License
23
+     * @version   0.0
24
+     * @since     19.01.2016
25
+     * @link      http://github.com/heiglandreas/callingallpapers
26
+     */
27 27
 
28 28
 namespace Callingallpapers\Api\PersistenceLayer;
29 29
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             ), 400);
57 57
         }
58 58
         $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) ' .
59
-                     'VALUES (:dateCfpStart, :dateCfpEnd, :dateEventStart, :dateEventEnd, :name, :uri, :hash, :timezone, :description, :eventUri, :iconUri, :latitude, :longitude, :location, :tags, :lastUpdate);';
59
+                        'VALUES (:dateCfpStart, :dateCfpEnd, :dateEventStart, :dateEventEnd, :name, :uri, :hash, :timezone, :description, :eventUri, :iconUri, :latitude, :longitude, :location, :tags, :lastUpdate);';
60 60
         $statement = $this->pdo->prepare($statement);
61 61
 
62 62
         $values = [
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
         }
137 137
 
138 138
         $statement = 'UPDATE `cfp` SET '
139
-                   . implode(',', $statementElements) . ','
140
-                   . '`lastUpdate` = :lastUpdate '
141
-                   . 'WHERE `hash` = :fetchHash';
139
+                    . implode(',', $statementElements) . ','
140
+                    . '`lastUpdate` = :lastUpdate '
141
+                    . 'WHERE `hash` = :fetchHash';
142 142
         $statement = $this->pdo->prepare($statement);
143 143
         $values['fetchHash']  = $fetchHash;
144 144
         $values['lastUpdate'] = (new \DateTime('now', new \DateTimezone('UTC')))->format('c');
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 $cfp->getEventUri()
55 55
             ), 400);
56 56
         }
57
-        $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) ' .
57
+        $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) '.
58 58
                      'VALUES (:dateCfpStart, :dateCfpEnd, :dateEventStart, :dateEventEnd, :name, :uri, :hash, :timezone, :description, :eventUri, :iconUri, :latitude, :longitude, :location, :tags, :lastUpdate);';
59 59
         $statement = $this->pdo->prepare($statement);
60 60
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
     public function update(Cfp $cfp, $fetchHash)
89 89
     {
90
-        if (! $fetchHash) {
90
+        if (!$fetchHash) {
91 91
             throw new \UnexpectedValueException('No Hash given', 400);
92 92
         }
93 93
         $oldValues = $this->select($fetchHash);
@@ -117,15 +117,15 @@  discard block
 block discarded – undo
117 117
         ];
118 118
 
119 119
         foreach ($options as $option) {
120
-            $method = 'get' . $option;
120
+            $method = 'get'.$option;
121 121
             // Merge values from tags and source before comparing!
122 122
             if (in_array($option, ['tags', 'source'])) {
123
-                $setter = 'set' . $option;
123
+                $setter = 'set'.$option;
124 124
                 $cfp->$setter(array_merge($oldValues->$method(), $cfp->$method()));
125 125
 
126 126
             }
127 127
             if ($cfp->$method() != $oldValues->$method()) {
128
-                $statementElements[] = '`' . $option . '` = :' . $option;
128
+                $statementElements[] = '`'.$option.'` = :'.$option;
129 129
                 $values[$option]     = $cfp->$method();
130 130
                 if ($values[$option] instanceof \DateTimeInterface) {
131 131
                     $values[$option] = $values[$option]->format('c');
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         $statement = 'UPDATE `cfp` SET '
145
-                   . implode(',', $statementElements) . ','
145
+                   . implode(',', $statementElements).','
146 146
                    . '`lastUpdate` = :lastUpdate '
147 147
                    . 'WHERE `hash` = :fetchHash';
148 148
         $statement = $this->pdo->prepare($statement);
Please login to merge, or discard this patch.