Completed
Push — master ( 00307b...1dd238 )
by Andreas
02:16
created
src/PersistenceLayer/CfpPersistenceLayer.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 namespace Callingallpapers\Api\PersistenceLayer;
29 29
 
30 30
 use Callingallpapers\Api\Entity\Cfp;
31
-use Monolog\Logger;
32 31
 
33 32
 class CfpPersistenceLayer
34 33
 {
Please login to merge, or discard this patch.
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
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 $cfp->getEventUri()
56 56
             ), 400);
57 57
         }
58
-        $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) ' .
58
+        $statement = 'INSERT into `cfp`(`dateCfpStart`, `dateCfpEnd`, `dateEventStart`, `dateEventEnd`, `name`, `uri`, `hash`, `timezone`, `description`, `eventUri`, `iconUri`, `latitude`, `longitude`, `location`, `tags`, `lastUpdate`) '.
59 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
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function update(Cfp $cfp, $fetchHash)
90 90
     {
91
-        if (! $fetchHash) {
91
+        if (!$fetchHash) {
92 92
             throw new \UnexpectedValueException('No Hash given', 400);
93 93
         }
94 94
         $oldValues = $this->select($fetchHash);
@@ -117,9 +117,9 @@  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
             if ($cfp->$method() != $oldValues->$method()) {
122
-                $statementElements[] = '`' . $option . '` = :' . $option;
122
+                $statementElements[] = '`'.$option.'` = :'.$option;
123 123
                 $values[$option]     = $cfp->$method();
124 124
                 if ($values[$option] instanceof \DateTimeInterface) {
125 125
                     $values[$option] = $values[$option]->format('c');
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
         }
132 132
 
133 133
         // No values to update, just, return
134
-        if (! $values) {
134
+        if (!$values) {
135 135
             return $cfp->getHash();
136 136
         }
137 137
 
138 138
         $statement = 'UPDATE `cfp` SET '
139
-                   . implode(',', $statementElements) . ','
139
+                   . implode(',', $statementElements).','
140 140
                    . '`lastUpdate` = :lastUpdate '
141 141
                    . 'WHERE `hash` = :fetchHash';
142 142
         $statement = $this->pdo->prepare($statement);
Please login to merge, or discard this patch.
src/Renderer/IcalendarRenderer.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 {
37 37
     /**
38 38
      *
39
-     * @param Response $response
39
+     * @param ResponseInterface $response
40 40
      * @param array $data
41 41
      * @param int $status
42 42
      *
Please login to merge, or discard this patch.
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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
                 'DTSTAMP' => $lastChange,
65 65
                 'UID'     => $cfp['_rel']['cfp_uri'],
66 66
                 'DESCRIPTION' => $cfp['description'],
67
-                'GEO'     => round($cfp['latitude'], 6) . ';' . round($cfp['longitude'], 6),
67
+                'GEO'     => round($cfp['latitude'], 6).';'.round($cfp['longitude'], 6),
68 68
                 'LOCATION' => $cfp['location'],
69 69
 
70 70
             ]);
Please login to merge, or discard this patch.
public/index.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
  * @since     15.01.2016
28 28
  * @link      http://github.com/heiglandreas/callingallpapers
29 29
  */
30
-require_once realpath(__DIR__ . '/../vendor/autoload.php');
30
+require_once realpath(__DIR__.'/../vendor/autoload.php');
31 31
 
32 32
 $app = new \Slim\App;
33
-$app->get('/foo', function ($req, $res, $args) {
33
+$app->get('/foo', function($req, $res, $args) {
34 34
     return $res->withHeader(
35 35
         'Content-Type',
36 36
         'application/json'
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 session_start();
41 41
 
42 42
 // Instantiate the app
43
-$settings = require __DIR__ . '/../config/settings.php';
43
+$settings = require __DIR__.'/../config/settings.php';
44 44
 $app = new \Slim\App($settings);
45 45
 
46 46
 // Set up dependencies
47
-require __DIR__ . '/../config/dependencies.php';
47
+require __DIR__.'/../config/dependencies.php';
48 48
 
49 49
 // Register middleware
50
-require __DIR__ . '/../config/middleware.php';
50
+require __DIR__.'/../config/middleware.php';
51 51
 
52 52
 // Register routes
53
-require __DIR__ . '/../config/routes.php';
53
+require __DIR__.'/../config/routes.php';
54 54
 
55 55
 // Run app
56 56
 $app->run();
57 57
\ No newline at end of file
Please login to merge, or discard this patch.
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     15.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     15.01.2016
28
+     * @link      http://github.com/heiglandreas/callingallpapers
29
+     */
30 30
 require_once realpath(__DIR__ . '/../vendor/autoload.php');
31 31
 
32 32
 $app = new \Slim\App;
Please login to merge, or discard this patch.
config/routes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
     $cpl->insert($cfp);
56 56
 
57 57
     $uri = $request->getUri();
58
-    $uri = $uri->withPath('v1/cfp/' . $cfp->getId());
58
+    $uri = $uri->withPath('v1/cfp/'.$cfp->getId());
59 59
     return $response->withRedirect((string)$uri, 201);
60 60
 });
61 61
 
62 62
 
63
-$app->put('/v1/cfp/{hash}', function (
63
+$app->put('/v1/cfp/{hash}', function(
64 64
     \Psr\Http\Message\ServerRequestInterface $request,
65 65
     \Psr\Http\Message\ResponseInterface $response,
66 66
     array $args
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
     $cpl->update($cfp, $args['hash']);
77 77
 
78 78
     $uri = $request->getUri();
79
-    $uri = $uri->withPath('v1/cfp/' . $cfp->getId());
79
+    $uri = $uri->withPath('v1/cfp/'.$cfp->getId());
80 80
     return $response->withHeader('Location', (string)$uri)->withStatus(204);
81 81
 });
82 82
 
83 83
 
84
-$app->delete('/v1/cfp/{id}', function (
84
+$app->delete('/v1/cfp/{id}', function(
85 85
     \Psr\Http\Message\ServerRequestInterface $request,
86 86
     \Psr\Http\Message\ResponseInterface $response,
87 87
     array $args
Please login to merge, or discard this patch.
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/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   +14 added lines, -14 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
         }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
     public static function setName(Cfp $cfp, array $array)
83 83
     {
84
-        if (! isset($array['name'])) {
84
+        if (!isset($array['name'])) {
85 85
             throw new \InvalidArgumentException('Name has to be specified');
86 86
         }
87 87
         $cfp->setName(filter_var($array['name'], FILTER_SANITIZE_STRING));
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public static function setDateCfpStart(Cfp $cfp, array $array)
91 91
     {
92
-        if (! isset($array['dateCfpStart'])) {
92
+        if (!isset($array['dateCfpStart'])) {
93 93
             throw new \InvalidArgumentException('CFP-StartDate has to be specified');
94 94
         }
95 95
         $cfp->setDateCfpStart(new DateTimeImmutable($array['dateCfpStart']));
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public static function setDateCfpEnd(Cfp $cfp, array $array)
99 99
     {
100
-        if (! isset($array['dateCfpEnd'])) {
100
+        if (!isset($array['dateCfpEnd'])) {
101 101
             throw new \InvalidArgumentException('CFP-EndDate has to be specified');
102 102
         }
103 103
         $cfp->setDateCfpEnd(new DateTimeImmutable($array['dateCfpEnd']));
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
     public static function setTimezone(Cfp $cfp, array $array)
107 107
     {
108
-        if (! isset($array['timezone'])) {
108
+        if (!isset($array['timezone'])) {
109 109
             throw new \InvalidArgumentException('Timezone has to be specified');
110 110
         }
111 111
         $cfp->setTimezone(filter_var($array['timezone'], FILTER_SANITIZE_STRING));
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
     public static function setUri(Cfp $cfp, array $array)
115 115
     {
116
-        if (! isset($array['uri'])) {
116
+        if (!isset($array['uri'])) {
117 117
             throw new \InvalidArgumentException('URI has to be specified');
118 118
         }
119 119
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
     public static function setEventUri(Cfp $cfp, array $array)
124 124
     {
125
-        if (! isset($array['eventUri'])) {
125
+        if (!isset($array['eventUri'])) {
126 126
             throw new \InvalidArgumentException('Event-URI has to be specified');
127 127
         }
128 128
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     public static function setIconUri(Cfp $cfp, array $array)
151 151
     {
152
-        if (! isset($array['iconUri'])) {
152
+        if (!isset($array['iconUri'])) {
153 153
             return;
154 154
         }
155 155
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
     public static function setDescription(Cfp $cfp, array $array)
160 160
     {
161
-        if (! isset($array['description'])) {
161
+        if (!isset($array['description'])) {
162 162
             return;
163 163
         }
164 164
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
     public static function setLocation(Cfp $cfp, array $array)
169 169
     {
170
-        if (! isset($array['location'])) {
170
+        if (!isset($array['location'])) {
171 171
             return;
172 172
         }
173 173
 
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
 
177 177
     public static function setGeolocation(Cfp $cfp, array $array)
178 178
     {
179
-        if (! isset($array['latitude'])) {
179
+        if (!isset($array['latitude'])) {
180 180
             return;
181 181
         }
182 182
 
183
-        if (! isset($array['longitude'])) {
183
+        if (!isset($array['longitude'])) {
184 184
             return;
185 185
         }
186 186
 
@@ -213,11 +213,11 @@  discard block
 block discarded – undo
213 213
 
214 214
     public static function setTags(Cfp $cfp, array $array)
215 215
     {
216
-        if (! isset($array['tags'])) {
216
+        if (!isset($array['tags'])) {
217 217
             return;
218 218
         }
219 219
 
220
-        $cfp->setTags(array_map(function ($item) {
220
+        $cfp->setTags(array_map(function($item) {
221 221
             return filter_var($item, FILTER_SANITIZE_STRING);
222 222
         }, $array['tags']));
223 223
     }
Please login to merge, or discard this patch.
src/Entity/Cfp.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@
 block discarded – undo
241 241
 
242 242
     public function setTimezone($timezone)
243 243
     {
244
-        if (! $timezone instanceof \DateTimeZone) {
244
+        if (!$timezone instanceof \DateTimeZone) {
245 245
             $timezone = new \DateTimeZone($timezone);
246 246
         }
247 247
 
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/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.