@@ -38,14 +38,14 @@ |
||
| 38 | 38 | |
| 39 | 39 | $id = urlencode($id); |
| 40 | 40 | |
| 41 | -$url = 'http://localhost/api/v1/series/'.$id; |
|
| 41 | +$url = 'http://localhost/api/v1/series/' . $id; |
|
| 42 | 42 | $response = file_get_contents($url); |
| 43 | 43 | |
| 44 | -echo 'URL: '.$url; |
|
| 44 | +echo 'URL: ' . $url; |
|
| 45 | 45 | |
| 46 | 46 | $responseData = json_decode($response, true); |
| 47 | 47 | $data = $responseData['data']; |
| 48 | 48 | |
| 49 | 49 | echo var_dump($responseData); |
| 50 | 50 | |
| 51 | -echo 'series '.$id.': id = '.$data['id'].', name = '.$data['name'].', description = '.$data['description']; |
|
| 51 | +echo 'series ' . $id . ': id = ' . $data['id'] . ', name = ' . $data['name'] . ', description = ' . $data['description']; |
|
@@ -16,7 +16,7 @@ discard block |
||
| 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 = [ |
@@ -37,7 +37,7 @@ discard block |
||
| 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 |
||
| 64 | 64 | 'description', |
| 65 | 65 | ]; |
| 66 | 66 | |
| 67 | - $whereCondition = 'id = '.$id; |
|
| 67 | + $whereCondition = 'id = ' . $id; |
|
| 68 | 68 | $where = [ |
| 69 | 69 | $whereCondition, |
| 70 | 70 | ]; |
@@ -16,7 +16,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 67 | 67 | 'description', |
| 68 | 68 | ]; |
| 69 | 69 | |
| 70 | - $whereCondition = 'id = '.$id; |
|
| 70 | + $whereCondition = 'id = ' . $id; |
|
| 71 | 71 | $where = [ |
| 72 | 72 | $whereCondition, |
| 73 | 73 | ]; |
@@ -16,7 +16,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 64 | 64 | 'address', |
| 65 | 65 | ]; |
| 66 | 66 | |
| 67 | - $whereCondition = 'id = '.$id; |
|
| 67 | + $whereCondition = 'id = ' . $id; |
|
| 68 | 68 | $where = [ |
| 69 | 69 | $whereCondition, |
| 70 | 70 | ]; |
@@ -32,7 +32,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | ]; |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require __DIR__.'/../config/database.php'; |
|
| 4 | -require __DIR__.'/../config/auth.php'; |
|
| 5 | -require __DIR__.'/../config/email.php'; |
|
| 6 | -require __DIR__.'/../config/recording.php'; |
|
| 3 | +require __DIR__ . '/../config/database.php'; |
|
| 4 | +require __DIR__ . '/../config/auth.php'; |
|
| 5 | +require __DIR__ . '/../config/email.php'; |
|
| 6 | +require __DIR__ . '/../config/recording.php'; |
|
| 7 | 7 | |
| 8 | 8 | function getConfig() |
| 9 | 9 | { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -require_once __DIR__.'/config.php'; |
|
| 3 | +require_once __DIR__ . '/config.php'; |
|
| 4 | 4 | |
| 5 | 5 | $config = getConfig(); |
| 6 | 6 | |
@@ -12,13 +12,13 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | // Renderer settings |
| 14 | 14 | 'renderer' => [ |
| 15 | - 'template_path' => __DIR__.'/../templates/', |
|
| 15 | + 'template_path' => __DIR__ . '/../templates/', |
|
| 16 | 16 | ], |
| 17 | 17 | |
| 18 | 18 | // Monolog settings |
| 19 | 19 | 'logger' => [ |
| 20 | 20 | 'name' => 'rota', |
| 21 | - 'path' => __DIR__.'/../logs/app.log', |
|
| 21 | + 'path' => __DIR__ . '/../logs/app.log', |
|
| 22 | 22 | 'level' => \Monolog\Logger::DEBUG, |
| 23 | 23 | ], |
| 24 | 24 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $hostname = $_SERVER['HTTP_HOST']; |
| 40 | 40 | |
| 41 | 41 | return [ |
| 42 | - 'base' => $http.'://'.$hostname, |
|
| 42 | + 'base' => $http . '://' . $hostname, |
|
| 43 | 43 | 'protocol' => $http, |
| 44 | 44 | 'host' => $hostname, |
| 45 | 45 | ]; |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | $base_uri = $this->guzzle->getConfig()['base_uri']; |
| 72 | 72 | |
| 73 | 73 | if (strlen($base_uri) > 0) { |
| 74 | - $url = $base_uri.'/account/new?forgot=true'; |
|
| 74 | + $url = $base_uri . '/account/new?forgot=true'; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | return $url; |