@@ -24,12 +24,12 @@ |
||
| 24 | 24 | public function createInDb(Database $db) |
| 25 | 25 | { |
| 26 | 26 | if (empty($this->name) || empty($this->datetime) || empty($this->series) || empty($this->type) || empty($this->sub_type) || empty($this->location)) { |
| 27 | - $message = 'Series name ('.$this->name.')'; |
|
| 28 | - $message .= ' or date ('.$this->datetime.')'; |
|
| 29 | - $message .= ' or series ('.$this->series.')'; |
|
| 30 | - $message .= ' or type ('.$this->type.')'; |
|
| 31 | - $message .= ' or sub_type ('.$this->sub_type.')'; |
|
| 32 | - $message .= ' or location ('.$this->location.')'; |
|
| 27 | + $message = 'Series name (' . $this->name . ')'; |
|
| 28 | + $message .= ' or date (' . $this->datetime . ')'; |
|
| 29 | + $message .= ' or series (' . $this->series . ')'; |
|
| 30 | + $message .= ' or type (' . $this->type . ')'; |
|
| 31 | + $message .= ' or sub_type (' . $this->sub_type . ')'; |
|
| 32 | + $message .= ' or location (' . $this->location . ')'; |
|
| 33 | 33 | $message .= ' cannot be empty.'; |
| 34 | 34 | |
| 35 | 35 | throw new Exception($message); |
@@ -131,13 +131,13 @@ discard block |
||
| 131 | 131 | $currentTimestamp = $date = strftime('%F %T', time()); |
| 132 | 132 | |
| 133 | 133 | $data = [ |
| 134 | - ['field' => 'name', 'type' => 'string', 'value' => $this->name], |
|
| 135 | - ['field' => 'date', 'type' => 'string', 'value' => $this->datetime], |
|
| 136 | - ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()], |
|
| 137 | - ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()], |
|
| 138 | - ['field' => 'subType', 'type' => 'int', 'value' => $this->subType->getId()], |
|
| 139 | - ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()], |
|
| 140 | - ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp], |
|
| 134 | + ['field' => 'name', 'type' => 'string', 'value' => $this->name], |
|
| 135 | + ['field' => 'date', 'type' => 'string', 'value' => $this->datetime], |
|
| 136 | + ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()], |
|
| 137 | + ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()], |
|
| 138 | + ['field' => 'subType', 'type' => 'int', 'value' => $this->subType->getId()], |
|
| 139 | + ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()], |
|
| 140 | + ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp], |
|
| 141 | 141 | ]; |
| 142 | 142 | |
| 143 | 143 | if (isset($this->notes)) { |
@@ -164,23 +164,23 @@ discard block |
||
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | $columns = [ |
| 167 | - 'id', |
|
| 168 | - 'name', |
|
| 169 | - 'date', |
|
| 170 | - 'eventGroup', |
|
| 171 | - 'type', |
|
| 172 | - 'subType', |
|
| 173 | - 'location', |
|
| 174 | - 'comment', |
|
| 175 | - 'sermonTitle', |
|
| 176 | - 'bibleVerse', |
|
| 177 | - 'deleted', |
|
| 178 | - 'created', |
|
| 179 | - 'updated', |
|
| 167 | + 'id', |
|
| 168 | + 'name', |
|
| 169 | + 'date', |
|
| 170 | + 'eventGroup', |
|
| 171 | + 'type', |
|
| 172 | + 'subType', |
|
| 173 | + 'location', |
|
| 174 | + 'comment', |
|
| 175 | + 'sermonTitle', |
|
| 176 | + 'bibleVerse', |
|
| 177 | + 'deleted', |
|
| 178 | + 'created', |
|
| 179 | + 'updated', |
|
| 180 | 180 | ]; |
| 181 | 181 | |
| 182 | 182 | $where = [ |
| 183 | - 'id = '.$id, |
|
| 183 | + 'id = '.$id, |
|
| 184 | 184 | ]; |
| 185 | 185 | |
| 186 | 186 | $result = $db->selectSingle('Event', $this->db_table, $columns, $where); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | foreach ($rehersals as $rehersal) { |
| 110 | 110 | if (!is_a($rehersal, 'Rehersal')) { |
| 111 | - throw new Exception('Rehersal is not a Rehersal object: '.$rehersal, 1); |
|
| 111 | + throw new Exception('Rehersal is not a Rehersal object: ' . $rehersal, 1); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | $this->rehersals = $rehersals; |
@@ -117,12 +117,12 @@ discard block |
||
| 117 | 117 | public function createInDb(Database $db) |
| 118 | 118 | { |
| 119 | 119 | if (empty($this->name) || empty($this->datetime) || empty($this->series) || empty($this->type) || empty($this->subType) || empty($this->location)) { |
| 120 | - $message = 'Series name ('.$this->name.')'; |
|
| 121 | - $message .= ' or date ('.$this->datetime.')'; |
|
| 122 | - $message .= ' or series ('.$this->series.')'; |
|
| 123 | - $message .= ' or type ('.$this->type.')'; |
|
| 124 | - $message .= ' or sub_type ('.$this->subType.')'; |
|
| 125 | - $message .= ' or location ('.$this->location.')'; |
|
| 120 | + $message = 'Series name (' . $this->name . ')'; |
|
| 121 | + $message .= ' or date (' . $this->datetime . ')'; |
|
| 122 | + $message .= ' or series (' . $this->series . ')'; |
|
| 123 | + $message .= ' or type (' . $this->type . ')'; |
|
| 124 | + $message .= ' or sub_type (' . $this->subType . ')'; |
|
| 125 | + $message .= ' or location (' . $this->location . ')'; |
|
| 126 | 126 | $message .= ' cannot be empty.'; |
| 127 | 127 | |
| 128 | 128 | throw new Exception($message); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | ]; |
| 181 | 181 | |
| 182 | 182 | $where = [ |
| 183 | - 'id = '.$id, |
|
| 183 | + 'id = ' . $id, |
|
| 184 | 184 | ]; |
| 185 | 185 | |
| 186 | 186 | $result = $db->selectSingle('Event', $this->db_table, $columns, $where); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | if (!password_verify($v, $this->password)) { |
| 35 | 35 | $bcrypt_options = [ |
| 36 | 36 | 'cost' => 12, |
| 37 | - ]; |
|
| 37 | + ]; |
|
| 38 | 38 | $this->password = password_hash($v, PASSWORD_BCRYPT, $bcrypt_options); |
| 39 | 39 | |
| 40 | 40 | $this->modifiedColumns[UserTableMap::COL_PASSWORD] = true; |
@@ -24,12 +24,12 @@ |
||
| 24 | 24 | public function createInDb(Database $db) |
| 25 | 25 | { |
| 26 | 26 | if (empty($this->name) || empty($this->datetime) || empty($this->series) || empty($this->type) || empty($this->sub_type) || empty($this->location)) { |
| 27 | - $message = 'Series name ('.$this->name.')'; |
|
| 28 | - $message .= ' or date ('.$this->datetime.')'; |
|
| 29 | - $message .= ' or series ('.$this->series.')'; |
|
| 30 | - $message .= ' or type ('.$this->type.')'; |
|
| 31 | - $message .= ' or sub_type ('.$this->sub_type.')'; |
|
| 32 | - $message .= ' or location ('.$this->location.')'; |
|
| 27 | + $message = 'Series name (' . $this->name . ')'; |
|
| 28 | + $message .= ' or date (' . $this->datetime . ')'; |
|
| 29 | + $message .= ' or series (' . $this->series . ')'; |
|
| 30 | + $message .= ' or type (' . $this->type . ')'; |
|
| 31 | + $message .= ' or sub_type (' . $this->sub_type . ')'; |
|
| 32 | + $message .= ' or location (' . $this->location . ')'; |
|
| 33 | 33 | $message .= ' cannot be empty.'; |
| 34 | 34 | |
| 35 | 35 | throw new Exception($message); |