@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | $data = array(); |
| 25 | 25 | |
| 26 | 26 | if ( |
| 27 | - ! $app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 28 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 27 | + !$app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 28 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 29 | 29 | ) { |
| 30 | 30 | $app->abort(403); |
| 31 | 31 | } |
@@ -78,8 +78,8 @@ discard block |
||
| 78 | 78 | $data = array(); |
| 79 | 79 | |
| 80 | 80 | if ( |
| 81 | - ! $app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 82 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 81 | + !$app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 82 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 83 | 83 | ) { |
| 84 | 84 | $app->abort(403); |
| 85 | 85 | } |
@@ -145,15 +145,15 @@ discard block |
||
| 145 | 145 | $data = array(); |
| 146 | 146 | |
| 147 | 147 | if ( |
| 148 | - ! $app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 149 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 148 | + !$app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 149 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 150 | 150 | ) { |
| 151 | 151 | $app->abort(403); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | $post = $app['orm.em']->find('Application\Entity\PostEntity', $id); |
| 155 | 155 | |
| 156 | - if (! $post) { |
|
| 156 | + if (!$post) { |
|
| 157 | 157 | $app->abort(404); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | $data = array(); |
| 220 | 220 | |
| 221 | 221 | if ( |
| 222 | - ! $app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 223 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 222 | + !$app['security']->isGranted('ROLE_POSTS_EDITOR') && |
|
| 223 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 224 | 224 | ) { |
| 225 | 225 | $app->abort(403); |
| 226 | 226 | } |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | |
| 244 | 244 | if ( |
| 245 | 245 | ( |
| 246 | - ! $post && |
|
| 246 | + !$post && |
|
| 247 | 247 | $ids === false |
| 248 | 248 | ) || |
| 249 | 249 | ( |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | $data = array(); |
| 25 | 25 | |
| 26 | - if (! $app['security']->isGranted('ROLE_ADMIN')) { |
|
| 26 | + if (!$app['security']->isGranted('ROLE_ADMIN')) { |
|
| 27 | 27 | $app->abort(403); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | if ($form->isValid()) { |
| 38 | 38 | $data = $form->getData(); |
| 39 | 39 | |
| 40 | - if (! empty($data)) { |
|
| 40 | + if (!empty($data)) { |
|
| 41 | 41 | foreach ($data as $key => $value) { |
| 42 | 42 | $settingEntity = $app['orm.em'] |
| 43 | 43 | ->getRepository('Application\Entity\SettingEntity') |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | $data = array(); |
| 19 | 19 | |
| 20 | 20 | if ( |
| 21 | - ! $app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 22 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 21 | + !$app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 22 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 23 | 23 | ) { |
| 24 | 24 | $app->abort(403); |
| 25 | 25 | } |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | $data = array(); |
| 68 | 68 | |
| 69 | 69 | if ( |
| 70 | - ! $app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 71 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 70 | + !$app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 71 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 72 | 72 | ) { |
| 73 | 73 | $app->abort(403); |
| 74 | 74 | } |
@@ -134,15 +134,15 @@ discard block |
||
| 134 | 134 | $data = array(); |
| 135 | 135 | |
| 136 | 136 | if ( |
| 137 | - ! $app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 138 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 137 | + !$app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 138 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 139 | 139 | ) { |
| 140 | 140 | $app->abort(403); |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | $user = $app['orm.em']->find('Application\Entity\UserEntity', $id); |
| 144 | 144 | |
| 145 | - if (! $user) { |
|
| 145 | + if (!$user) { |
|
| 146 | 146 | $app->abort(404); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | $data = array(); |
| 162 | 162 | |
| 163 | 163 | if ( |
| 164 | - ! $app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 165 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 164 | + !$app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 165 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 166 | 166 | ) { |
| 167 | 167 | $app->abort(403); |
| 168 | 168 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $id |
| 173 | 173 | ); |
| 174 | 174 | |
| 175 | - if (! $user) { |
|
| 175 | + if (!$user) { |
|
| 176 | 176 | $app->abort(404); |
| 177 | 177 | } |
| 178 | 178 | |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | $data = array(); |
| 263 | 263 | |
| 264 | 264 | if ( |
| 265 | - ! $app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 266 | - ! $app['security']->isGranted('ROLE_ADMIN') |
|
| 265 | + !$app['security']->isGranted('ROLE_USERS_EDITOR') && |
|
| 266 | + !$app['security']->isGranted('ROLE_ADMIN') |
|
| 267 | 267 | ) { |
| 268 | 268 | $app->abort(403); |
| 269 | 269 | } |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | if ( |
| 288 | 288 | ( |
| 289 | - ! $user && |
|
| 289 | + !$user && |
|
| 290 | 290 | $ids === false |
| 291 | 291 | ) || |
| 292 | 292 | ( |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $app['application.mailer'] |
| 111 | 111 | ->swiftMessageInitializeAndSend(array( |
| 112 | 112 | 'subject' => $app['name'].' - '.$app['translator']->trans('Welcome'), |
| 113 | - 'to' => array( $userEntity->getEmail() ), |
|
| 113 | + 'to' => array($userEntity->getEmail()), |
|
| 114 | 114 | 'body' => 'emails/users/register-welcome.html.twig', |
| 115 | 115 | 'type' => 'user.register.welcome', |
| 116 | 116 | 'templateData' => array( |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | $app['application.mailer'] |
| 144 | 144 | ->swiftMessageInitializeAndSend(array( |
| 145 | 145 | 'subject' => $app['name'].' - '.$app['translator']->trans('Registration'), |
| 146 | - 'to' => array( $userEntity->getEmail() ), |
|
| 146 | + 'to' => array($userEntity->getEmail()), |
|
| 147 | 147 | 'body' => 'emails/users/register.html.twig', |
| 148 | 148 | 'type' => 'user.register', |
| 149 | 149 | 'templateData' => array( |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | $app['application.mailer'] |
| 262 | 262 | ->swiftMessageInitializeAndSend(array( |
| 263 | 263 | 'subject' => $app['name'].' - '.$app['translator']->trans('Reset password'), |
| 264 | - 'to' => array( $userEntity->getEmail() ), |
|
| 264 | + 'to' => array($userEntity->getEmail()), |
|
| 265 | 265 | 'body' => 'emails/users/reset-password.html.twig', |
| 266 | 266 | 'type' => 'user.reset_password', |
| 267 | 267 | 'templateData' => array( |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | public function addPostMeta(PostMetaEntity $postMeta) |
| 274 | 274 | { |
| 275 | - if (! $this->postMetas->contains($postMeta)) { |
|
| 275 | + if (!$this->postMetas->contains($postMeta)) { |
|
| 276 | 276 | $postMeta->setPost($this); |
| 277 | 277 | $this->postMetas->add($postMeta); |
| 278 | 278 | } |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $slugify = new Slugify(); |
| 326 | 326 | $metas = $this->getMetas(); |
| 327 | 327 | |
| 328 | - if (! empty($metas)) { |
|
| 328 | + if (!empty($metas)) { |
|
| 329 | 329 | foreach ($metas as $metaKey => $metaValue) { |
| 330 | 330 | $metaEntity = new PostMetaEntity(); |
| 331 | 331 | |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | */ |
| 519 | 519 | public function isAccountNonLocked() |
| 520 | 520 | { |
| 521 | - return ! $this->isLocked(); |
|
| 521 | + return !$this->isLocked(); |
|
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | /*** Reset password code ***/ |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | */ |
| 649 | 649 | public function isAccountNonExpired() |
| 650 | 650 | { |
| 651 | - return ! $this->getExpired(); |
|
| 651 | + return !$this->getExpired(); |
|
| 652 | 652 | } |
| 653 | 653 | |
| 654 | 654 | /*** Credentials expired ***/ |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | */ |
| 674 | 674 | public function isCredentialsNonExpired() |
| 675 | 675 | { |
| 676 | - return ! $this->getExpired(); |
|
| 676 | + return !$this->getExpired(); |
|
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | /*** Roles ***/ |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | */ |
| 764 | 764 | public function isEqualTo(AdvancedUserInterface $user) |
| 765 | 765 | { |
| 766 | - if (! $user instanceof AdvancedUserInterface) { |
|
| 766 | + if (!$user instanceof AdvancedUserInterface) { |
|
| 767 | 767 | return false; |
| 768 | 768 | } |
| 769 | 769 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | 'data_class' => 'Application\Entity\UserEntity', |
| 50 | 50 | 'csrf_protection' => true, |
| 51 | 51 | 'csrf_field_name' => 'csrf_token', |
| 52 | - 'validation_groups' => function (FormInterface $form) use ($self) { |
|
| 52 | + 'validation_groups' => function(FormInterface $form) use ($self) { |
|
| 53 | 53 | $action = $self->action; |
| 54 | 54 | |
| 55 | 55 | if ($action == 'reset') { |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | { |
| 71 | 71 | $resolver->setDefaults(array( |
| 72 | 72 | 'data_class' => 'Application\Entity\UserEntity', |
| 73 | - 'validation_groups' => function (FormInterface $form) { |
|
| 73 | + 'validation_groups' => function(FormInterface $form) { |
|
| 74 | 74 | $user = $form->getData(); |
| 75 | 75 | $validationGroups = array(); |
| 76 | 76 | |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | */ |
| 116 | 116 | public function send($swiftMessage = false) |
| 117 | 117 | { |
| 118 | - if (! $swiftMessage) { |
|
| 118 | + if (!$swiftMessage) { |
|
| 119 | 119 | $swiftMessage = $this->getSwiftMessageInstance(); |
| 120 | 120 | } |
| 121 | 121 | |