@@ -134,10 +134,10 @@ discard block |
||
| 134 | 134 | 'profile_img' => $this->upload->uploadImage($data, 'profile_img') |
| 135 | 135 | ]; |
| 136 | 136 | |
| 137 | - unset($data['confirm_password']); |
|
| 138 | - $data['password'] = $this->crypt->create($data['password']); |
|
| 139 | - $data['admin_user_id'] = Uuid::uuid1()->toString(); |
|
| 140 | - $data['admin_user_uuid'] = (new MysqlUuid($data['admin_user_id']))->toFormat(new Binary); |
|
| 137 | + unset($data[ 'confirm_password' ]); |
|
| 138 | + $data[ 'password' ] = $this->crypt->create($data[ 'password' ]); |
|
| 139 | + $data[ 'admin_user_id' ] = Uuid::uuid1()->toString(); |
|
| 140 | + $data[ 'admin_user_uuid' ] = (new MysqlUuid($data[ 'admin_user_id' ]))->toFormat(new Binary); |
|
| 141 | 141 | |
| 142 | 142 | return $this->adminUsersMapper->insert($data); |
| 143 | 143 | } |
@@ -151,13 +151,13 @@ discard block |
||
| 151 | 151 | $filter = $this->adminUserFilter->getInputFilter()->setData($data); |
| 152 | 152 | |
| 153 | 153 | // we dont want to force user to enter the password again |
| 154 | - if ($data['password'] == '') { |
|
| 154 | + if ($data[ 'password' ] == '') { |
|
| 155 | 155 | $filter->remove('password'); |
| 156 | 156 | $filter->remove('confirm_password'); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | // if we want to keep same email |
| 160 | - if ($user->email == $data['email']) { |
|
| 160 | + if ($user->email == $data[ 'email' ]) { |
|
| 161 | 161 | $filter->remove('email'); |
| 162 | 162 | } |
| 163 | 163 | |
@@ -171,24 +171,24 @@ discard block |
||
| 171 | 171 | ]; |
| 172 | 172 | |
| 173 | 173 | // We don't want to force user to re-upload image on edit |
| 174 | - if (!$data['face_img']) { |
|
| 175 | - unset($data['face_img']); |
|
| 174 | + if (!$data[ 'face_img' ]) { |
|
| 175 | + unset($data[ 'face_img' ]); |
|
| 176 | 176 | } else { |
| 177 | 177 | $this->upload->deleteFile($user->face_img); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - if (!$data['profile_img']) { |
|
| 181 | - unset($data['profile_img']); |
|
| 180 | + if (!$data[ 'profile_img' ]) { |
|
| 181 | + unset($data[ 'profile_img' ]); |
|
| 182 | 182 | } else { |
| 183 | 183 | $this->upload->deleteFile($user->profile_img); |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | - if (isset($data['password'])) { |
|
| 187 | - unset($data['confirm_password']); |
|
| 188 | - $data['password'] = $this->crypt->create($data['password']); |
|
| 186 | + if (isset($data[ 'password' ])) { |
|
| 187 | + unset($data[ 'confirm_password' ]); |
|
| 188 | + $data[ 'password' ] = $this->crypt->create($data[ 'password' ]); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - return $this->adminUsersMapper->update($data, ['admin_user_id' => $userId]); |
|
| 191 | + return $this->adminUsersMapper->update($data, [ 'admin_user_id' => $userId ]); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $this->upload->deleteFile($adminUser->face_img); |
| 208 | 208 | $this->upload->deleteFile($adminUser->profile_img); |
| 209 | 209 | |
| 210 | - return (bool)$this->adminUsersMapper->delete(['admin_user_id' => $userId]); |
|
| 210 | + return (bool) $this->adminUsersMapper->delete([ 'admin_user_id' => $userId ]); |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | /** |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | [ |
| 27 | 27 | 'name' => 'first_name', |
| 28 | 28 | 'required' => true, |
| 29 | - 'filters' => [['name' => 'StringTrim']], |
|
| 29 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 30 | 30 | 'validators' => [ |
| 31 | - ['name' => 'NotEmpty'], |
|
| 32 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 255]] |
|
| 31 | + [ 'name' => 'NotEmpty' ], |
|
| 32 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 255 ] ] |
|
| 33 | 33 | ], |
| 34 | 34 | ] |
| 35 | 35 | ); |
@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | [ |
| 39 | 39 | 'name' => 'last_name', |
| 40 | 40 | 'required' => true, |
| 41 | - 'filters' => [['name' => 'StringTrim']], |
|
| 41 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 42 | 42 | 'validators' => [ |
| 43 | - ['name' => 'NotEmpty'], |
|
| 44 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 255]] |
|
| 43 | + [ 'name' => 'NotEmpty' ], |
|
| 44 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 255 ] ] |
|
| 45 | 45 | ], |
| 46 | 46 | ] |
| 47 | 47 | ); |
@@ -50,13 +50,13 @@ discard block |
||
| 50 | 50 | [ |
| 51 | 51 | 'name' => 'email', |
| 52 | 52 | 'required' => true, |
| 53 | - 'filters' => [['name' => 'StringTrim']], |
|
| 53 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 54 | 54 | 'validators' => [ |
| 55 | - ['name' => 'NotEmpty'], |
|
| 56 | - ['name' => 'EmailAddress'], |
|
| 55 | + [ 'name' => 'NotEmpty' ], |
|
| 56 | + [ 'name' => 'EmailAddress' ], |
|
| 57 | 57 | [ |
| 58 | 58 | 'name' => 'dbnorecordexists', |
| 59 | - 'options' => ['adapter' => $this->adapter, 'table' => 'admin_users', 'field' => 'email'] |
|
| 59 | + 'options' => [ 'adapter' => $this->adapter, 'table' => 'admin_users', 'field' => 'email' ] |
|
| 60 | 60 | ], |
| 61 | 61 | ], |
| 62 | 62 | ] |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | [ |
| 67 | 67 | 'name' => 'introduction', |
| 68 | 68 | 'required' => false, |
| 69 | - 'filters' => [['name' => 'StringTrim']] |
|
| 69 | + 'filters' => [ [ 'name' => 'StringTrim' ] ] |
|
| 70 | 70 | ] |
| 71 | 71 | ); |
| 72 | 72 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | [ |
| 75 | 75 | 'name' => 'biography', |
| 76 | 76 | 'required' => false, |
| 77 | - 'filters' => [['name' => 'StringTrim']] |
|
| 77 | + 'filters' => [ [ 'name' => 'StringTrim' ] ] |
|
| 78 | 78 | ] |
| 79 | 79 | ); |
| 80 | 80 | |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | 'name' => 'password', |
| 84 | 84 | 'required' => true, |
| 85 | 85 | 'validators' => [ |
| 86 | - ['name' => 'NotEmpty'], |
|
| 87 | - ['name' => 'StringLength', 'options' => ['min' => 7, 'max' => 255]] |
|
| 86 | + [ 'name' => 'NotEmpty' ], |
|
| 87 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 7, 'max' => 255 ] ] |
|
| 88 | 88 | ], |
| 89 | 89 | ] |
| 90 | 90 | ); |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | 'name' => 'confirm_password', |
| 95 | 95 | 'required' => true, |
| 96 | 96 | 'validators' => [ |
| 97 | - ['name' => 'NotEmpty'], |
|
| 98 | - ['name' => 'Identical', 'options' => ['token' => 'password']], |
|
| 97 | + [ 'name' => 'NotEmpty' ], |
|
| 98 | + [ 'name' => 'Identical', 'options' => [ 'token' => 'password' ] ], |
|
| 99 | 99 | ], |
| 100 | 100 | ] |
| 101 | 101 | ); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | [ |
| 105 | 105 | 'name' => 'status', |
| 106 | 106 | 'required' => true, |
| 107 | - 'validators' => [['name' => 'NotEmpty'], ['name' => 'Digits']] |
|
| 107 | + 'validators' => [ [ 'name' => 'NotEmpty' ], [ 'name' => 'Digits' ] ] |
|
| 108 | 108 | ] |
| 109 | 109 | ); |
| 110 | 110 | |
@@ -33,24 +33,24 @@ discard block |
||
| 33 | 33 | public function getPaginationSelect() |
| 34 | 34 | { |
| 35 | 35 | return $this->getSql()->select() |
| 36 | - ->columns(['title', 'body', 'lead', 'featured_img', 'main_img']) |
|
| 36 | + ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img' ]) |
|
| 37 | 37 | ->join('articles', 'article_posts.article_uuid = articles.article_uuid') |
| 38 | - ->join('category', 'articles.category_uuid = category.category_uuid', ['category_name' => 'name'], 'left') |
|
| 39 | - ->where(['articles.type' => ArticleType::POST]) |
|
| 40 | - ->order(['created_at' => 'desc']); |
|
| 38 | + ->join('category', 'articles.category_uuid = category.category_uuid', [ 'category_name' => 'name' ], 'left') |
|
| 39 | + ->where([ 'articles.type' => ArticleType::POST ]) |
|
| 40 | + ->order([ 'created_at' => 'desc' ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function get($id) |
| 44 | 44 | { |
| 45 | 45 | $select = $this->getSql()->select() |
| 46 | - ->columns(['title', 'body', 'lead', 'featured_img', 'main_img', 'has_layout']) |
|
| 46 | + ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img', 'has_layout' ]) |
|
| 47 | 47 | ->join('articles', 'article_posts.article_uuid = articles.article_uuid') |
| 48 | 48 | ->join( |
| 49 | 49 | 'category', 'category.category_uuid = articles.category_uuid', |
| 50 | - ['category_slug' => 'slug', 'category_name' => 'name', 'category_id'], 'left' |
|
| 50 | + [ 'category_slug' => 'slug', 'category_name' => 'name', 'category_id' ], 'left' |
|
| 51 | 51 | ) |
| 52 | - ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id'], 'left') |
|
| 53 | - ->where(['articles.article_id' => $id]); |
|
| 52 | + ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id' ], 'left') |
|
| 53 | + ->where([ 'articles.article_id' => $id ]); |
|
| 54 | 54 | |
| 55 | 55 | return $this->selectWith($select)->current(); |
| 56 | 56 | } |
@@ -59,16 +59,16 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | $select = $this->getSql()->select() |
| 61 | 61 | ->join('articles', 'article_posts.article_uuid = articles.article_uuid') |
| 62 | - ->join('category', 'category.category_uuid = articles.category_uuid', ['category_slug' => 'slug']) |
|
| 63 | - ->where(['articles.status' => 1]) |
|
| 62 | + ->join('category', 'category.category_uuid = articles.category_uuid', [ 'category_slug' => 'slug' ]) |
|
| 63 | + ->where([ 'articles.status' => 1 ]) |
|
| 64 | 64 | ->limit(1); |
| 65 | 65 | |
| 66 | 66 | if ($direction > 0) { |
| 67 | 67 | $select->where->greaterThan('published_at', $publishedAt); |
| 68 | - $select->order(['published_at' => 'asc']); |
|
| 68 | + $select->order([ 'published_at' => 'asc' ]); |
|
| 69 | 69 | } elseif ($direction < 0) { |
| 70 | 70 | $select->where->lessThan('published_at', $publishedAt); |
| 71 | - $select->order(['published_at' => 'desc']); |
|
| 71 | + $select->order([ 'published_at' => 'desc' ]); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | return $this->selectWith($select)->current(); |
@@ -77,17 +77,17 @@ discard block |
||
| 77 | 77 | public function getBySlug($slug) |
| 78 | 78 | { |
| 79 | 79 | $select = $this->getSql()->select() |
| 80 | - ->columns(['title', 'body', 'lead', 'featured_img', 'main_img']) |
|
| 80 | + ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img' ]) |
|
| 81 | 81 | ->join('articles', 'article_posts.article_uuid = articles.article_uuid') |
| 82 | 82 | ->join( |
| 83 | 83 | 'category', |
| 84 | 84 | 'category.category_uuid = articles.category_uuid', |
| 85 | - ['category_name' => 'name', 'category_slug' => 'slug'] |
|
| 85 | + [ 'category_name' => 'name', 'category_slug' => 'slug' ] |
|
| 86 | 86 | )->join( |
| 87 | 87 | 'admin_users', |
| 88 | 88 | 'admin_users.admin_user_uuid = articles.admin_user_uuid', |
| 89 | - ['first_name', 'last_name']) |
|
| 90 | - ->where(['articles.slug' => $slug, 'articles.status' => 1]); |
|
| 89 | + [ 'first_name', 'last_name' ]) |
|
| 90 | + ->where([ 'articles.slug' => $slug, 'articles.status' => 1 ]); |
|
| 91 | 91 | |
| 92 | 92 | return $this->selectWith($select)->current(); |
| 93 | 93 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | public function getAll() |
| 96 | 96 | { |
| 97 | 97 | $select = $this->getSql()->select() |
| 98 | - ->join('articles', 'article_posts.article_uuid = articles.article_uuid', ['article_id', 'slug']); |
|
| 98 | + ->join('articles', 'article_posts.article_uuid = articles.article_uuid', [ 'article_id', 'slug' ]); |
|
| 99 | 99 | |
| 100 | 100 | return $this->selectWith($select); |
| 101 | 101 | } |
@@ -104,13 +104,13 @@ discard block |
||
| 104 | 104 | { |
| 105 | 105 | $select = $this->getSql()->select() |
| 106 | 106 | ->join('articles', 'article_posts.article_uuid = articles.article_uuid') |
| 107 | - ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['first_name', 'last_name']) |
|
| 107 | + ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'first_name', 'last_name' ]) |
|
| 108 | 108 | ->join( |
| 109 | 109 | 'category', 'category.category_uuid = articles.category_uuid', |
| 110 | - ['category_name' => 'name', 'category_id', 'category_slug' => 'slug'] |
|
| 110 | + [ 'category_name' => 'name', 'category_id', 'category_slug' => 'slug' ] |
|
| 111 | 111 | ) |
| 112 | - ->where(['articles.status' => 1]) |
|
| 113 | - ->order(['articles.published_at' => 'desc']) |
|
| 112 | + ->where([ 'articles.status' => 1 ]) |
|
| 113 | + ->order([ 'articles.published_at' => 'desc' ]) |
|
| 114 | 114 | ->limit($limit); |
| 115 | 115 | |
| 116 | 116 | return $this->selectWith($select); |
@@ -22,23 +22,23 @@ |
||
| 22 | 22 | public function getPaginationSelect() |
| 23 | 23 | { |
| 24 | 24 | return $this->getSql()->select() |
| 25 | - ->columns(['title', 'body']) |
|
| 25 | + ->columns([ 'title', 'body' ]) |
|
| 26 | 26 | ->join('articles', 'article_discussions.article_uuid = articles.article_uuid') |
| 27 | - ->where(['articles.type' => ArticleType::DISCUSSION]) |
|
| 28 | - ->order(['created_at' => 'desc']); |
|
| 27 | + ->where([ 'articles.type' => ArticleType::DISCUSSION ]) |
|
| 28 | + ->order([ 'created_at' => 'desc' ]); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function get($id) |
| 32 | 32 | { |
| 33 | 33 | $select = $this->getSql()->select() |
| 34 | - ->columns(['title', 'body']) |
|
| 34 | + ->columns([ 'title', 'body' ]) |
|
| 35 | 35 | ->join('articles', 'article_discussions.article_uuid = articles.article_uuid') |
| 36 | 36 | ->join( |
| 37 | 37 | 'category', 'category.category_uuid = articles.category_uuid', |
| 38 | - ['category_slug' => 'slug', 'category_name' => 'name', 'category_id'], 'left' |
|
| 38 | + [ 'category_slug' => 'slug', 'category_name' => 'name', 'category_id' ], 'left' |
|
| 39 | 39 | ) |
| 40 | - ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id'], 'left') |
|
| 41 | - ->where(['articles.article_id' => $id]); |
|
| 40 | + ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id' ], 'left') |
|
| 41 | + ->where([ 'articles.article_id' => $id ]); |
|
| 42 | 42 | |
| 43 | 43 | return $this->selectWith($select)->current(); |
| 44 | 44 | } |
@@ -68,16 +68,16 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $article = $articleFilter->getValues(); |
| 70 | 70 | $article += [ |
| 71 | - 'admin_user_uuid' => $this->adminUsersMapper->getUuid($article['admin_user_id']), |
|
| 71 | + 'admin_user_uuid' => $this->adminUsersMapper->getUuid($article[ 'admin_user_id' ]), |
|
| 72 | 72 | 'type' => ArticleType::DISCUSSION, |
| 73 | 73 | 'article_id' => $id, |
| 74 | 74 | 'article_uuid' => $uuId |
| 75 | 75 | ]; |
| 76 | 76 | |
| 77 | - $article['category_uuid'] = $this->categoryMapper->get($article['category_id'])->category_uuid; |
|
| 78 | - unset($article['category_id'], $article['admin_user_id']); |
|
| 77 | + $article[ 'category_uuid' ] = $this->categoryMapper->get($article[ 'category_id' ])->category_uuid; |
|
| 78 | + unset($article[ 'category_id' ], $article[ 'admin_user_id' ]); |
|
| 79 | 79 | |
| 80 | - $discussion = $discussionFilter->getValues() + ['article_uuid' => $uuId]; |
|
| 80 | + $discussion = $discussionFilter->getValues() + [ 'article_uuid' => $uuId ]; |
|
| 81 | 81 | |
| 82 | 82 | $this->articleMapper->insert($article); |
| 83 | 83 | $this->articleDiscussionsMapper->insert($discussion); |
@@ -93,15 +93,15 @@ discard block |
||
| 93 | 93 | throw new FilterException($articleFilter->getMessages() + $discussionFilter->getMessages()); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - $article = $articleFilter->getValues() + ['article_uuid' => $article->article_uuid]; |
|
| 96 | + $article = $articleFilter->getValues() + [ 'article_uuid' => $article->article_uuid ]; |
|
| 97 | 97 | $discussion = $discussionFilter->getValues(); |
| 98 | 98 | |
| 99 | - $article['admin_user_uuid'] = $this->adminUsersMapper->getUuid($article['admin_user_id']); |
|
| 100 | - $article['category_uuid'] = $this->categoryMapper->get($article['category_id'])->category_uuid; |
|
| 101 | - unset($article['category_id'], $article['admin_user_id']); |
|
| 99 | + $article[ 'admin_user_uuid' ] = $this->adminUsersMapper->getUuid($article[ 'admin_user_id' ]); |
|
| 100 | + $article[ 'category_uuid' ] = $this->categoryMapper->get($article[ 'category_id' ])->category_uuid; |
|
| 101 | + unset($article[ 'category_id' ], $article[ 'admin_user_id' ]); |
|
| 102 | 102 | |
| 103 | - $this->articleMapper->update($article, ['article_uuid' => $article['article_uuid']]); |
|
| 104 | - $this->articleDiscussionsMapper->update($discussion, ['article_uuid' => $article['article_uuid']]); |
|
| 103 | + $this->articleMapper->update($article, [ 'article_uuid' => $article[ 'article_uuid' ] ]); |
|
| 104 | + $this->articleDiscussionsMapper->update($discussion, [ 'article_uuid' => $article[ 'article_uuid' ] ]); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | public function deleteArticle($id) |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | throw new \Exception('Article not found!'); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $this->articleDiscussionsMapper->delete(['article_uuid' => $discussion->article_uuid]); |
|
| 115 | + $this->articleDiscussionsMapper->delete([ 'article_uuid' => $discussion->article_uuid ]); |
|
| 116 | 116 | $this->delete($discussion->article_uuid); |
| 117 | 117 | } |
| 118 | 118 | } |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | public function getCategoryIds($articleId) |
| 33 | 33 | { |
| 34 | - $categories = []; |
|
| 34 | + $categories = [ ]; |
|
| 35 | 35 | foreach ($this->articleMapper->getCategories($articleId) as $category) { |
| 36 | - $categories[] = $category->category_id; |
|
| 36 | + $categories[ ] = $category->category_id; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | return $categories; |
@@ -41,6 +41,6 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | public function delete($articleId) |
| 43 | 43 | { |
| 44 | - $this->articleMapper->delete(['article_uuid' => $articleId]); |
|
| 44 | + $this->articleMapper->delete([ 'article_uuid' => $articleId ]); |
|
| 45 | 45 | } |
| 46 | 46 | } |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | [ |
| 20 | 20 | 'name' => 'title', |
| 21 | 21 | 'required' => true, |
| 22 | - 'filters' => [['name' => 'StringTrim']], |
|
| 22 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 23 | 23 | 'validators' => [ |
| 24 | - ['name' => 'NotEmpty'], |
|
| 25 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]], |
|
| 24 | + [ 'name' => 'NotEmpty' ], |
|
| 25 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ], |
|
| 26 | 26 | ], |
| 27 | 27 | ] |
| 28 | 28 | ); |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | [ |
| 32 | 32 | 'name' => 'body', |
| 33 | 33 | 'required' => true, |
| 34 | - 'filters' => [['name' => 'StringTrim']], |
|
| 34 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 35 | 35 | 'validators' => [ |
| 36 | - ['name' => 'NotEmpty'], |
|
| 37 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100000]], |
|
| 36 | + [ 'name' => 'NotEmpty' ], |
|
| 37 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100000 ] ], |
|
| 38 | 38 | ], |
| 39 | 39 | ] |
| 40 | 40 | ); |
@@ -43,10 +43,10 @@ discard block |
||
| 43 | 43 | [ |
| 44 | 44 | 'name' => 'lead', |
| 45 | 45 | 'required' => true, |
| 46 | - 'filters' => [['name' => 'StringTrim']], |
|
| 46 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 47 | 47 | 'validators' => [ |
| 48 | - ['name' => 'NotEmpty'], |
|
| 49 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 50000]], |
|
| 48 | + [ 'name' => 'NotEmpty' ], |
|
| 49 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 50000 ] ], |
|
| 50 | 50 | ], |
| 51 | 51 | ] |
| 52 | 52 | ); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | [ |
| 56 | 56 | 'name' => 'has_layout', |
| 57 | 57 | 'required' => false, |
| 58 | - 'filters' => [['name' => 'Boolean']], |
|
| 58 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
| 59 | 59 | ] |
| 60 | 60 | ); |
| 61 | 61 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | [ |
| 20 | 20 | 'name' => 'slug', |
| 21 | 21 | 'required' => true, |
| 22 | - 'filters' => [['name' => 'StringTrim', 'options' => ['charlist' => '/']]], |
|
| 22 | + 'filters' => [ [ 'name' => 'StringTrim', 'options' => [ 'charlist' => '/' ] ] ], |
|
| 23 | 23 | 'validators' => [ |
| 24 | - ['name' => 'NotEmpty'], |
|
| 25 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]], |
|
| 24 | + [ 'name' => 'NotEmpty' ], |
|
| 25 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ], |
|
| 26 | 26 | ], |
| 27 | 27 | ] |
| 28 | 28 | ); |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | [ |
| 32 | 32 | 'name' => 'published_at', |
| 33 | 33 | 'required' => true, |
| 34 | - 'filters' => [['name' => 'StringTrim']], |
|
| 34 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 35 | 35 | 'validators' => [ |
| 36 | - ['name' => 'NotEmpty'], |
|
| 37 | - ['name' => 'Date', 'options' => ['format' => 'Y-m-d H:i:s']] |
|
| 36 | + [ 'name' => 'NotEmpty' ], |
|
| 37 | + [ 'name' => 'Date', 'options' => [ 'format' => 'Y-m-d H:i:s' ] ] |
|
| 38 | 38 | ] |
| 39 | 39 | ] |
| 40 | 40 | ); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | [ |
| 58 | 58 | 'name' => 'status', |
| 59 | 59 | 'required' => false, |
| 60 | - 'filters' => [['name' => 'Boolean']], |
|
| 60 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
| 61 | 61 | ] |
| 62 | 62 | ); |
| 63 | 63 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | [ |
| 66 | 66 | 'name' => 'is_wysiwyg_editor', |
| 67 | 67 | 'required' => false, |
| 68 | - 'filters' => [['name' => 'Boolean']], |
|
| 68 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
| 69 | 69 | ] |
| 70 | 70 | ); |
| 71 | 71 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | [ |
| 20 | 20 | 'name' => 'title', |
| 21 | 21 | 'required' => true, |
| 22 | - 'filters' => [['name' => 'StringTrim']], |
|
| 22 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 23 | 23 | 'validators' => [ |
| 24 | - ['name' => 'NotEmpty'], |
|
| 25 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]], |
|
| 24 | + [ 'name' => 'NotEmpty' ], |
|
| 25 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ], |
|
| 26 | 26 | ], |
| 27 | 27 | ] |
| 28 | 28 | ); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | [ |
| 32 | 32 | 'name' => 'sub_title', |
| 33 | 33 | 'required' => false, |
| 34 | - 'filters' => [['name' => 'StringTrim']] |
|
| 34 | + 'filters' => [ [ 'name' => 'StringTrim' ] ] |
|
| 35 | 35 | ] |
| 36 | 36 | ); |
| 37 | 37 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | [ |
| 40 | 40 | 'name' => 'place_name', |
| 41 | 41 | 'required' => true, |
| 42 | - 'filters' => [['name' => 'StringTrim']] |
|
| 42 | + 'filters' => [ [ 'name' => 'StringTrim' ] ] |
|
| 43 | 43 | ] |
| 44 | 44 | ); |
| 45 | 45 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | [ |
| 48 | 48 | 'name' => 'event_url', |
| 49 | 49 | 'required' => false, |
| 50 | - 'filters' => [['name' => 'StringTrim']] |
|
| 50 | + 'filters' => [ [ 'name' => 'StringTrim' ] ] |
|
| 51 | 51 | ] |
| 52 | 52 | ); |
| 53 | 53 | |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | [ |
| 56 | 56 | 'name' => 'body', |
| 57 | 57 | 'required' => true, |
| 58 | - 'filters' => [['name' => 'StringTrim']], |
|
| 58 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 59 | 59 | 'validators' => [ |
| 60 | - ['name' => 'NotEmpty'], |
|
| 61 | - ['name' => 'StringLength', 'options' => ['min' => 2]], |
|
| 60 | + [ 'name' => 'NotEmpty' ], |
|
| 61 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2 ] ], |
|
| 62 | 62 | ], |
| 63 | 63 | ] |
| 64 | 64 | ); |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | [ |
| 68 | 68 | 'name' => 'start_at', |
| 69 | 69 | 'required' => true, |
| 70 | - 'filters' => [['name' => 'StringTrim']], |
|
| 70 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 71 | 71 | 'validators' => [ |
| 72 | - ['name' => 'NotEmpty'], |
|
| 73 | - ['name' => 'Date', 'options' => ['format' => 'Y-m-d H:i:s']] |
|
| 72 | + [ 'name' => 'NotEmpty' ], |
|
| 73 | + [ 'name' => 'Date', 'options' => [ 'format' => 'Y-m-d H:i:s' ] ] |
|
| 74 | 74 | ] |
| 75 | 75 | ] |
| 76 | 76 | ); |
@@ -79,10 +79,10 @@ discard block |
||
| 79 | 79 | [ |
| 80 | 80 | 'name' => 'end_at', |
| 81 | 81 | 'required' => true, |
| 82 | - 'filters' => [['name' => 'StringTrim']], |
|
| 82 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 83 | 83 | 'validators' => [ |
| 84 | - ['name' => 'NotEmpty'], |
|
| 85 | - ['name' => 'Date', 'options' => ['format' => 'Y-m-d H:i:s']] |
|
| 84 | + [ 'name' => 'NotEmpty' ], |
|
| 85 | + [ 'name' => 'Date', 'options' => [ 'format' => 'Y-m-d H:i:s' ] ] |
|
| 86 | 86 | ] |
| 87 | 87 | ] |
| 88 | 88 | ); |
@@ -91,8 +91,8 @@ discard block |
||
| 91 | 91 | [ |
| 92 | 92 | 'name' => 'longitude', |
| 93 | 93 | 'required' => true, |
| 94 | - 'filters' => [['name' => 'StringTrim']], |
|
| 95 | - 'validators' => [['name' => 'NotEmpty']], |
|
| 94 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 95 | + 'validators' => [ [ 'name' => 'NotEmpty' ] ], |
|
| 96 | 96 | ] |
| 97 | 97 | ); |
| 98 | 98 | |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | [ |
| 101 | 101 | 'name' => 'latitude', |
| 102 | 102 | 'required' => true, |
| 103 | - 'filters' => [['name' => 'StringTrim']], |
|
| 104 | - 'validators' => [['name' => 'NotEmpty']], |
|
| 103 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 104 | + 'validators' => [ [ 'name' => 'NotEmpty' ] ], |
|
| 105 | 105 | ] |
| 106 | 106 | ); |
| 107 | 107 | |