aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r--src/Wallabag/UserBundle/Entity/User.php2
-rw-r--r--src/Wallabag/UserBundle/EventListener/PasswordResettingListener.php4
-rw-r--r--src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php2
-rw-r--r--src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php
index 4bbb68dc..dfed8e47 100644
--- a/src/Wallabag/UserBundle/Entity/User.php
+++ b/src/Wallabag/UserBundle/Entity/User.php
@@ -88,7 +88,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
88 { 88 {
89 parent::__construct(); 89 parent::__construct();
90 $this->entries = new ArrayCollection(); 90 $this->entries = new ArrayCollection();
91 $this->roles = array('ROLE_USER'); 91 $this->roles = ['ROLE_USER'];
92 } 92 }
93 93
94 /** 94 /**
diff --git a/src/Wallabag/UserBundle/EventListener/PasswordResettingListener.php b/src/Wallabag/UserBundle/EventListener/PasswordResettingListener.php
index 128e85a4..3a7f2637 100644
--- a/src/Wallabag/UserBundle/EventListener/PasswordResettingListener.php
+++ b/src/Wallabag/UserBundle/EventListener/PasswordResettingListener.php
@@ -27,9 +27,9 @@ class PasswordResettingListener implements EventSubscriberInterface
27 */ 27 */
28 public static function getSubscribedEvents() 28 public static function getSubscribedEvents()
29 { 29 {
30 return array( 30 return [
31 FOSUserEvents::RESETTING_RESET_SUCCESS => 'onPasswordResettingSuccess', 31 FOSUserEvents::RESETTING_RESET_SUCCESS => 'onPasswordResettingSuccess',
32 ); 32 ];
33 } 33 }
34 34
35 public function onPasswordResettingSuccess(FormEvent $event) 35 public function onPasswordResettingSuccess(FormEvent $event)
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
index d8403491..ca9d18f1 100644
--- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
+++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
@@ -82,7 +82,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface
82 { 82 {
83 $template = $this->twig->loadTemplate('WallabagUserBundle:TwoFactor:email_auth_code.html.twig'); 83 $template = $this->twig->loadTemplate('WallabagUserBundle:TwoFactor:email_auth_code.html.twig');
84 84
85 $subject = $template->renderBlock('subject', array()); 85 $subject = $template->renderBlock('subject', []);
86 $bodyHtml = $template->renderBlock('body_html', [ 86 $bodyHtml = $template->renderBlock('body_html', [
87 'user' => $user->getName(), 87 'user' => $user->getName(),
88 'code' => $user->getEmailAuthCode(), 88 'code' => $user->getEmailAuthCode(),
diff --git a/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php b/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php
index b95e195e..00967051 100644
--- a/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php
+++ b/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php
@@ -43,7 +43,7 @@ class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase
43{% block body_text %}text body {{ support_url }}{% endblock %} 43{% block body_text %}text body {{ support_url }}{% endblock %}
44TWIG; 44TWIG;
45 45
46 $this->twig = new \Twig_Environment(new \Twig_Loader_Array(array('WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate))); 46 $this->twig = new \Twig_Environment(new \Twig_Loader_Array(['WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate]));
47 47
48 $this->config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config') 48 $this->config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config')
49 ->disableOriginalConstructor() 49 ->disableOriginalConstructor()
@@ -76,7 +76,7 @@ TWIG;
76 76
77 $msg = $this->spool->getMessages()[0]; 77 $msg = $this->spool->getMessages()[0];
78 $this->assertArrayHasKey('test@wallabag.io', $msg->getTo()); 78 $this->assertArrayHasKey('test@wallabag.io', $msg->getTo());
79 $this->assertEquals(array('nobody@test.io' => 'wallabag test'), $msg->getFrom()); 79 $this->assertEquals(['nobody@test.io' => 'wallabag test'], $msg->getFrom());
80 $this->assertEquals('subject', $msg->getSubject()); 80 $this->assertEquals('subject', $msg->getSubject());
81 $this->assertContains('text body http://0.0.0.0/support', $msg->toString()); 81 $this->assertContains('text body http://0.0.0.0/support', $msg->toString());
82 $this->assertContains('html body 666666', $msg->toString()); 82 $this->assertContains('html body 666666', $msg->toString());