aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-05-30 13:52:26 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-05-30 13:59:33 +0200
commit4346a86068781f4acdeb574d7e2af08b77b58ea7 (patch)
tree5c392314913f7cbcd2658893432ff5f9db318465 /src/Wallabag/CoreBundle
parent399bd777d7900f532bfcfa367da88767739391bc (diff)
downloadwallabag-4346a86068781f4acdeb574d7e2af08b77b58ea7.tar.gz
wallabag-4346a86068781f4acdeb574d7e2af08b77b58ea7.tar.zst
wallabag-4346a86068781f4acdeb574d7e2af08b77b58ea7.zip
CS
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php10
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php16
-rw-r--r--src/Wallabag/CoreBundle/Controller/RssController.php6
-rw-r--r--src/Wallabag/CoreBundle/Controller/SecurityController.php9
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php8
-rw-r--r--src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php8
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php56
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php55
-rw-r--r--src/Wallabag/CoreBundle/Entity/Tag.php15
-rw-r--r--src/Wallabag/CoreBundle/Entity/User.php60
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ConfigType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntryType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/NewUserType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/RssType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/UserInformationType.php1
-rwxr-xr-xsrc/Wallabag/CoreBundle/Helper/Tools.php12
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php8
-rw-r--r--src/Wallabag/CoreBundle/Repository/UserRepository.php2
-rw-r--r--src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php3
-rw-r--r--src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php2
-rw-r--r--src/Wallabag/CoreBundle/Service/Extractor.php23
-rw-r--r--src/Wallabag/CoreBundle/Tools/Utils.php2
-rw-r--r--src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php6
26 files changed, 171 insertions, 138 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 493842f7..491c67f9 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -225,7 +225,7 @@ class InstallCommand extends ContainerAwareCommand
225 } 225 }
226 226
227 /** 227 /**
228 * Run a command 228 * Run a command.
229 * 229 *
230 * @param string $command 230 * @param string $command
231 * @param array $parameters Parameters to this command (usually 'force' => true) 231 * @param array $parameters Parameters to this command (usually 'force' => true)
@@ -266,9 +266,9 @@ class InstallCommand extends ContainerAwareCommand
266 } 266 }
267 267
268 /** 268 /**
269 * Check if the database already exists 269 * Check if the database already exists.
270 * 270 *
271 * @return boolean 271 * @return bool
272 */ 272 */
273 private function isDatabasePresent() 273 private function isDatabasePresent()
274 { 274 {
@@ -300,9 +300,9 @@ class InstallCommand extends ContainerAwareCommand
300 300
301 /** 301 /**
302 * Check if the schema is already created. 302 * Check if the schema is already created.
303 * If we found at least oen table, it means the schema exists 303 * If we found at least oen table, it means the schema exists.
304 * 304 *
305 * @return boolean 305 * @return bool
306 */ 306 */
307 private function isSchemaPresent() 307 private function isSchemaPresent()
308 { 308 {
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index 8a8f3cd7..7fd982c9 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -50,7 +50,7 @@ class EntryController extends Controller
50 } 50 }
51 51
52 /** 52 /**
53 * Shows unread entries for current user 53 * Shows unread entries for current user.
54 * 54 *
55 * @Route("/unread", name="unread") 55 * @Route("/unread", name="unread")
56 * 56 *
@@ -70,7 +70,7 @@ class EntryController extends Controller
70 } 70 }
71 71
72 /** 72 /**
73 * Shows read entries for current user 73 * Shows read entries for current user.
74 * 74 *
75 * @Route("/archive", name="archive") 75 * @Route("/archive", name="archive")
76 * 76 *
@@ -90,7 +90,7 @@ class EntryController extends Controller
90 } 90 }
91 91
92 /** 92 /**
93 * Shows starred entries for current user 93 * Shows starred entries for current user.
94 * 94 *
95 * @Route("/starred", name="starred") 95 * @Route("/starred", name="starred")
96 * 96 *
@@ -110,7 +110,7 @@ class EntryController extends Controller
110 } 110 }
111 111
112 /** 112 /**
113 * Shows entry content 113 * Shows entry content.
114 * 114 *
115 * @param Entry $entry 115 * @param Entry $entry
116 * 116 *
@@ -129,7 +129,7 @@ class EntryController extends Controller
129 } 129 }
130 130
131 /** 131 /**
132 * Changes read status for an entry 132 * Changes read status for an entry.
133 * 133 *
134 * @param Request $request 134 * @param Request $request
135 * @param Entry $entry 135 * @param Entry $entry
@@ -154,7 +154,7 @@ class EntryController extends Controller
154 } 154 }
155 155
156 /** 156 /**
157 * Changes favorite status for an entry 157 * Changes favorite status for an entry.
158 * 158 *
159 * @param Request $request 159 * @param Request $request
160 * @param Entry $entry 160 * @param Entry $entry
@@ -179,7 +179,7 @@ class EntryController extends Controller
179 } 179 }
180 180
181 /** 181 /**
182 * Deletes entry 182 * Deletes entry.
183 * 183 *
184 * @param Request $request 184 * @param Request $request
185 * @param Entry $entry 185 * @param Entry $entry
@@ -205,7 +205,7 @@ class EntryController extends Controller
205 } 205 }
206 206
207 /** 207 /**
208 * Check if the logged user can manage the given entry 208 * Check if the logged user can manage the given entry.
209 * 209 *
210 * @param Entry $entry 210 * @param Entry $entry
211 */ 211 */
diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php
index 14f1dcb2..86754e15 100644
--- a/src/Wallabag/CoreBundle/Controller/RssController.php
+++ b/src/Wallabag/CoreBundle/Controller/RssController.php
@@ -11,7 +11,7 @@ use Wallabag\CoreBundle\Entity\Entry;
11class RssController extends Controller 11class RssController extends Controller
12{ 12{
13 /** 13 /**
14 * Shows unread entries for current user 14 * Shows unread entries for current user.
15 * 15 *
16 * @Route("/{username}/{token}/unread.xml", name="unread_rss", defaults={"_format"="xml"}) 16 * @Route("/{username}/{token}/unread.xml", name="unread_rss", defaults={"_format"="xml"})
17 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") 17 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter")
@@ -35,7 +35,7 @@ class RssController extends Controller
35 } 35 }
36 36
37 /** 37 /**
38 * Shows read entries for current user 38 * Shows read entries for current user.
39 * 39 *
40 * @Route("/{username}/{token}/archive.xml", name="archive_rss") 40 * @Route("/{username}/{token}/archive.xml", name="archive_rss")
41 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") 41 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter")
@@ -59,7 +59,7 @@ class RssController extends Controller
59 } 59 }
60 60
61 /** 61 /**
62 * Shows starred entries for current user 62 * Shows starred entries for current user.
63 * 63 *
64 * @Route("/{username}/{token}/starred.xml", name="starred_rss") 64 * @Route("/{username}/{token}/starred.xml", name="starred_rss")
65 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") 65 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter")
diff --git a/src/Wallabag/CoreBundle/Controller/SecurityController.php b/src/Wallabag/CoreBundle/Controller/SecurityController.php
index fe511db5..a61a898b 100644
--- a/src/Wallabag/CoreBundle/Controller/SecurityController.php
+++ b/src/Wallabag/CoreBundle/Controller/SecurityController.php
@@ -30,9 +30,10 @@ class SecurityController extends Controller
30 } 30 }
31 31
32 /** 32 /**
33 * Request forgot password: show form 33 * Request forgot password: show form.
34 * 34 *
35 * @Route("/forgot-password", name="forgot_password") 35 * @Route("/forgot-password", name="forgot_password")
36 *
36 * @Method({"GET", "POST"}) 37 * @Method({"GET", "POST"})
37 */ 38 */
38 public function forgotPasswordAction(Request $request) 39 public function forgotPasswordAction(Request $request)
@@ -73,9 +74,10 @@ class SecurityController extends Controller
73 } 74 }
74 75
75 /** 76 /**
76 * Tell the user to check his email provider 77 * Tell the user to check his email provider.
77 * 78 *
78 * @Route("/forgot-password/check-email", name="forgot_password_check_email") 79 * @Route("/forgot-password/check-email", name="forgot_password_check_email")
80 *
79 * @Method({"GET"}) 81 * @Method({"GET"})
80 */ 82 */
81 public function checkEmailAction(Request $request) 83 public function checkEmailAction(Request $request)
@@ -93,9 +95,10 @@ class SecurityController extends Controller
93 } 95 }
94 96
95 /** 97 /**
96 * Reset user password 98 * Reset user password.
97 * 99 *
98 * @Route("/forgot-password/{token}", name="forgot_password_reset") 100 * @Route("/forgot-password/{token}", name="forgot_password_reset")
101 *
99 * @Method({"GET", "POST"}) 102 * @Method({"GET", "POST"})
100 */ 103 */
101 public function resetAction(Request $request, $token) 104 public function resetAction(Request $request, $token)
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
index 54d0d6b6..547d6753 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
@@ -39,9 +39,9 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
39 $entry3->setContent('This is my content /o/'); 39 $entry3->setContent('This is my content /o/');
40 40
41 $tag1 = new Tag($this->getReference('bob-user')); 41 $tag1 = new Tag($this->getReference('bob-user'));
42 $tag1->setLabel("foo"); 42 $tag1->setLabel('foo');
43 $tag2 = new Tag($this->getReference('bob-user')); 43 $tag2 = new Tag($this->getReference('bob-user'));
44 $tag2->setLabel("bar"); 44 $tag2->setLabel('bar');
45 45
46 $entry3->addTag($tag1); 46 $entry3->addTag($tag1);
47 $entry3->addTag($tag2); 47 $entry3->addTag($tag2);
@@ -56,9 +56,9 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
56 $entry4->setContent('This is my content /o/'); 56 $entry4->setContent('This is my content /o/');
57 57
58 $tag1 = new Tag($this->getReference('admin-user')); 58 $tag1 = new Tag($this->getReference('admin-user'));
59 $tag1->setLabel("foo"); 59 $tag1->setLabel('foo');
60 $tag2 = new Tag($this->getReference('admin-user')); 60 $tag2 = new Tag($this->getReference('admin-user'));
61 $tag2->setLabel("bar"); 61 $tag2->setLabel('bar');
62 62
63 $entry4->addTag($tag1); 63 $entry4->addTag($tag1);
64 $entry4->addTag($tag2); 64 $entry4->addTag($tag2);
diff --git a/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php b/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php
index 724812fd..509348db 100644
--- a/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php
+++ b/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php
@@ -25,7 +25,7 @@ class PrefixedNamingStrategy implements NamingStrategy
25 */ 25 */
26 public function classToTableName($className) 26 public function classToTableName($className)
27 { 27 {
28 return strtolower($this->prefix . substr($className, strrpos($className, '\\') + 1)); 28 return strtolower($this->prefix.substr($className, strrpos($className, '\\') + 1));
29 } 29 }
30 30
31 /** 31 /**
@@ -49,7 +49,7 @@ class PrefixedNamingStrategy implements NamingStrategy
49 */ 49 */
50 public function joinColumnName($propertyName) 50 public function joinColumnName($propertyName)
51 { 51 {
52 return $propertyName . '_' . $this->referenceColumnName(); 52 return $propertyName.'_'.$this->referenceColumnName();
53 } 53 }
54 54
55 /** 55 /**
@@ -62,7 +62,7 @@ class PrefixedNamingStrategy implements NamingStrategy
62 // ie: not "wallabag_entry_wallabag_tag" but "wallabag_entry_tag" 62 // ie: not "wallabag_entry_wallabag_tag" but "wallabag_entry_tag"
63 $target = substr($targetEntity, strrpos($targetEntity, '\\') + 1); 63 $target = substr($targetEntity, strrpos($targetEntity, '\\') + 1);
64 64
65 return strtolower($this->classToTableName($sourceEntity) . '_' .$target); 65 return strtolower($this->classToTableName($sourceEntity).'_'.$target);
66 } 66 }
67 67
68 /** 68 /**
@@ -70,7 +70,7 @@ class PrefixedNamingStrategy implements NamingStrategy
70 */ 70 */
71 public function joinKeyColumnName($entityName, $referencedColumnName = null) 71 public function joinKeyColumnName($entityName, $referencedColumnName = null)
72 { 72 {
73 return strtolower($this->classToTableName($entityName) . '_' .($referencedColumnName ?: $this->referenceColumnName())); 73 return strtolower($this->classToTableName($entityName).'_'.($referencedColumnName ?: $this->referenceColumnName()));
74 } 74 }
75 75
76 /** 76 /**
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index 62ea637e..025d94ef 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM;
6use Symfony\Component\Validator\Constraints as Assert; 6use Symfony\Component\Validator\Constraints as Assert;
7 7
8/** 8/**
9 * Config 9 * Config.
10 * 10 *
11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository") 11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository")
12 * @ORM\Table 12 * @ORM\Table
@@ -15,7 +15,7 @@ use Symfony\Component\Validator\Constraints as Assert;
15class Config 15class Config
16{ 16{
17 /** 17 /**
18 * @var integer 18 * @var int
19 * 19 *
20 * @ORM\Column(name="id", type="integer") 20 * @ORM\Column(name="id", type="integer")
21 * @ORM\Id 21 * @ORM\Id
@@ -32,7 +32,7 @@ class Config
32 private $theme; 32 private $theme;
33 33
34 /** 34 /**
35 * @var integer 35 * @var int
36 * 36 *
37 * @Assert\NotBlank() 37 * @Assert\NotBlank()
38 * @Assert\Range( 38 * @Assert\Range(
@@ -60,7 +60,7 @@ class Config
60 private $rssToken; 60 private $rssToken;
61 61
62 /** 62 /**
63 * @var integer 63 * @var int
64 * 64 *
65 * @ORM\Column(name="rss_limit", type="integer", nullable=true) 65 * @ORM\Column(name="rss_limit", type="integer", nullable=true)
66 * @Assert\Range( 66 * @Assert\Range(
@@ -85,9 +85,9 @@ class Config
85 } 85 }
86 86
87 /** 87 /**
88 * Get id 88 * Get id.
89 * 89 *
90 * @return integer 90 * @return int
91 */ 91 */
92 public function getId() 92 public function getId()
93 { 93 {
@@ -95,9 +95,10 @@ class Config
95 } 95 }
96 96
97 /** 97 /**
98 * Set theme 98 * Set theme.
99 *
100 * @param string $theme
99 * 101 *
100 * @param string $theme
101 * @return Config 102 * @return Config
102 */ 103 */
103 public function setTheme($theme) 104 public function setTheme($theme)
@@ -108,7 +109,7 @@ class Config
108 } 109 }
109 110
110 /** 111 /**
111 * Get theme 112 * Get theme.
112 * 113 *
113 * @return string 114 * @return string
114 */ 115 */
@@ -118,9 +119,10 @@ class Config
118 } 119 }
119 120
120 /** 121 /**
121 * Set itemsPerPage 122 * Set itemsPerPage.
123 *
124 * @param int $itemsPerPage
122 * 125 *
123 * @param integer $itemsPerPage
124 * @return Config 126 * @return Config
125 */ 127 */
126 public function setItemsPerPage($itemsPerPage) 128 public function setItemsPerPage($itemsPerPage)
@@ -131,9 +133,9 @@ class Config
131 } 133 }
132 134
133 /** 135 /**
134 * Get itemsPerPage 136 * Get itemsPerPage.
135 * 137 *
136 * @return integer 138 * @return int
137 */ 139 */
138 public function getItemsPerPage() 140 public function getItemsPerPage()
139 { 141 {
@@ -141,9 +143,10 @@ class Config
141 } 143 }
142 144
143 /** 145 /**
144 * Set language 146 * Set language.
147 *
148 * @param string $language
145 * 149 *
146 * @param string $language
147 * @return Config 150 * @return Config
148 */ 151 */
149 public function setLanguage($language) 152 public function setLanguage($language)
@@ -154,7 +157,7 @@ class Config
154 } 157 }
155 158
156 /** 159 /**
157 * Get language 160 * Get language.
158 * 161 *
159 * @return string 162 * @return string
160 */ 163 */
@@ -164,9 +167,10 @@ class Config
164 } 167 }
165 168
166 /** 169 /**
167 * Set user 170 * Set user.
171 *
172 * @param \Wallabag\CoreBundle\Entity\User $user
168 * 173 *
169 * @param \Wallabag\CoreBundle\Entity\User $user
170 * @return Config 174 * @return Config
171 */ 175 */
172 public function setUser(\Wallabag\CoreBundle\Entity\User $user = null) 176 public function setUser(\Wallabag\CoreBundle\Entity\User $user = null)
@@ -177,7 +181,7 @@ class Config
177 } 181 }
178 182
179 /** 183 /**
180 * Get user 184 * Get user.
181 * 185 *
182 * @return \Wallabag\CoreBundle\Entity\User 186 * @return \Wallabag\CoreBundle\Entity\User
183 */ 187 */
@@ -187,9 +191,10 @@ class Config
187 } 191 }
188 192
189 /** 193 /**
190 * Set rssToken 194 * Set rssToken.
195 *
196 * @param string $rssToken
191 * 197 *
192 * @param string $rssToken
193 * @return Config 198 * @return Config
194 */ 199 */
195 public function setRssToken($rssToken) 200 public function setRssToken($rssToken)
@@ -200,7 +205,7 @@ class Config
200 } 205 }
201 206
202 /** 207 /**
203 * Get rssToken 208 * Get rssToken.
204 * 209 *
205 * @return string 210 * @return string
206 */ 211 */
@@ -210,9 +215,10 @@ class Config
210 } 215 }
211 216
212 /** 217 /**
213 * Set rssLimit 218 * Set rssLimit.
219 *
220 * @param string $rssLimit
214 * 221 *
215 * @param string $rssLimit
216 * @return Config 222 * @return Config
217 */ 223 */
218 public function setRssLimit($rssLimit) 224 public function setRssLimit($rssLimit)
@@ -223,7 +229,7 @@ class Config
223 } 229 }
224 230
225 /** 231 /**
226 * Get rssLimit 232 * Get rssLimit.
227 * 233 *
228 * @return string 234 * @return string
229 */ 235 */
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 15af105d..b1998ab6 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -9,7 +9,7 @@ use Hateoas\Configuration\Annotation as Hateoas;
9use JMS\Serializer\Annotation\XmlRoot; 9use JMS\Serializer\Annotation\XmlRoot;
10 10
11/** 11/**
12 * Entry 12 * Entry.
13 * 13 *
14 * @XmlRoot("entry") 14 * @XmlRoot("entry")
15 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository") 15 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository")
@@ -21,7 +21,7 @@ class Entry
21{ 21{
22 /** @Serializer\XmlAttribute */ 22 /** @Serializer\XmlAttribute */
23 /** 23 /**
24 * @var integer 24 * @var int
25 * 25 *
26 * @ORM\Column(name="id", type="integer") 26 * @ORM\Column(name="id", type="integer")
27 * @ORM\Id 27 * @ORM\Id
@@ -45,14 +45,14 @@ class Entry
45 private $url; 45 private $url;
46 46
47 /** 47 /**
48 * @var boolean 48 * @var bool
49 * 49 *
50 * @ORM\Column(name="is_archived", type="boolean") 50 * @ORM\Column(name="is_archived", type="boolean")
51 */ 51 */
52 private $isArchived = false; 52 private $isArchived = false;
53 53
54 /** 54 /**
55 * @var boolean 55 * @var bool
56 * 56 *
57 * @ORM\Column(name="is_starred", type="boolean") 57 * @ORM\Column(name="is_starred", type="boolean")
58 */ 58 */
@@ -94,7 +94,7 @@ class Entry
94 private $mimetype; 94 private $mimetype;
95 95
96 /** 96 /**
97 * @var integer 97 * @var int
98 * 98 *
99 * @ORM\Column(name="reading_type", type="integer", nullable=true) 99 * @ORM\Column(name="reading_type", type="integer", nullable=true)
100 */ 100 */
@@ -108,7 +108,7 @@ class Entry
108 private $domainName; 108 private $domainName;
109 109
110 /** 110 /**
111 * @var boolean 111 * @var bool
112 * 112 *
113 * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false}) 113 * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false})
114 */ 114 */
@@ -135,9 +135,9 @@ class Entry
135 } 135 }
136 136
137 /** 137 /**
138 * Get id 138 * Get id.
139 * 139 *
140 * @return integer 140 * @return int
141 */ 141 */
142 public function getId() 142 public function getId()
143 { 143 {
@@ -145,9 +145,10 @@ class Entry
145 } 145 }
146 146
147 /** 147 /**
148 * Set title 148 * Set title.
149 *
150 * @param string $title
149 * 151 *
150 * @param string $title
151 * @return Entry 152 * @return Entry
152 */ 153 */
153 public function setTitle($title) 154 public function setTitle($title)
@@ -158,7 +159,7 @@ class Entry
158 } 159 }
159 160
160 /** 161 /**
161 * Get title 162 * Get title.
162 * 163 *
163 * @return string 164 * @return string
164 */ 165 */
@@ -168,9 +169,10 @@ class Entry
168 } 169 }
169 170
170 /** 171 /**
171 * Set url 172 * Set url.
173 *
174 * @param string $url
172 * 175 *
173 * @param string $url
174 * @return Entry 176 * @return Entry
175 */ 177 */
176 public function setUrl($url) 178 public function setUrl($url)
@@ -181,7 +183,7 @@ class Entry
181 } 183 }
182 184
183 /** 185 /**
184 * Get url 186 * Get url.
185 * 187 *
186 * @return string 188 * @return string
187 */ 189 */
@@ -191,9 +193,10 @@ class Entry
191 } 193 }
192 194
193 /** 195 /**
194 * Set isArchived 196 * Set isArchived.
197 *
198 * @param string $isArchived
195 * 199 *
196 * @param string $isArchived
197 * @return Entry 200 * @return Entry
198 */ 201 */
199 public function setArchived($isArchived) 202 public function setArchived($isArchived)
@@ -204,7 +207,7 @@ class Entry
204 } 207 }
205 208
206 /** 209 /**
207 * Get isArchived 210 * Get isArchived.
208 * 211 *
209 * @return string 212 * @return string
210 */ 213 */
@@ -221,9 +224,10 @@ class Entry
221 } 224 }
222 225
223 /** 226 /**
224 * Set isStarred 227 * Set isStarred.
228 *
229 * @param string $isStarred
225 * 230 *
226 * @param string $isStarred
227 * @return Entry 231 * @return Entry
228 */ 232 */
229 public function setStarred($isStarred) 233 public function setStarred($isStarred)
@@ -234,7 +238,7 @@ class Entry
234 } 238 }
235 239
236 /** 240 /**
237 * Get isStarred 241 * Get isStarred.
238 * 242 *
239 * @return string 243 * @return string
240 */ 244 */
@@ -251,9 +255,10 @@ class Entry
251 } 255 }
252 256
253 /** 257 /**
254 * Set content 258 * Set content.
259 *
260 * @param string $content
255 * 261 *
256 * @param string $content
257 * @return Entry 262 * @return Entry
258 */ 263 */
259 public function setContent($content) 264 public function setContent($content)
@@ -264,7 +269,7 @@ class Entry
264 } 269 }
265 270
266 /** 271 /**
267 * Get content 272 * Get content.
268 * 273 *
269 * @return string 274 * @return string
270 */ 275 */
@@ -375,7 +380,7 @@ class Entry
375 } 380 }
376 381
377 /** 382 /**
378 * @return boolean 383 * @return bool
379 */ 384 */
380 public function isPublic() 385 public function isPublic()
381 { 386 {
@@ -383,7 +388,7 @@ class Entry
383 } 388 }
384 389
385 /** 390 /**
386 * @param boolean $isPublic 391 * @param bool $isPublic
387 */ 392 */
388 public function setPublic($isPublic) 393 public function setPublic($isPublic)
389 { 394 {
diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php
index 9d3c7a32..afe9e1b9 100644
--- a/src/Wallabag/CoreBundle/Entity/Tag.php
+++ b/src/Wallabag/CoreBundle/Entity/Tag.php
@@ -9,7 +9,7 @@ use JMS\Serializer\Annotation\Expose;
9use Doctrine\Common\Collections\ArrayCollection; 9use Doctrine\Common\Collections\ArrayCollection;
10 10
11/** 11/**
12 * Tag 12 * Tag.
13 * 13 *
14 * @XmlRoot("tag") 14 * @XmlRoot("tag")
15 * @ORM\Table 15 * @ORM\Table
@@ -19,7 +19,7 @@ use Doctrine\Common\Collections\ArrayCollection;
19class Tag 19class Tag
20{ 20{
21 /** 21 /**
22 * @var integer 22 * @var int
23 * 23 *
24 * @Expose 24 * @Expose
25 * @ORM\Column(name="id", type="integer") 25 * @ORM\Column(name="id", type="integer")
@@ -52,9 +52,9 @@ class Tag
52 $this->entries = new ArrayCollection(); 52 $this->entries = new ArrayCollection();
53 } 53 }
54 /** 54 /**
55 * Get id 55 * Get id.
56 * 56 *
57 * @return integer 57 * @return int
58 */ 58 */
59 public function getId() 59 public function getId()
60 { 60 {
@@ -62,9 +62,10 @@ class Tag
62 } 62 }
63 63
64 /** 64 /**
65 * Set label 65 * Set label.
66 *
67 * @param string $label
66 * 68 *
67 * @param string $label
68 * @return Tag 69 * @return Tag
69 */ 70 */
70 public function setLabel($label) 71 public function setLabel($label)
@@ -75,7 +76,7 @@ class Tag
75 } 76 }
76 77
77 /** 78 /**
78 * Get label 79 * Get label.
79 * 80 *
80 * @return string 81 * @return string
81 */ 82 */
diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php
index ff08c8fb..00eb808a 100644
--- a/src/Wallabag/CoreBundle/Entity/User.php
+++ b/src/Wallabag/CoreBundle/Entity/User.php
@@ -12,7 +12,7 @@ use JMS\Serializer\Annotation\ExclusionPolicy;
12use JMS\Serializer\Annotation\Expose; 12use JMS\Serializer\Annotation\Expose;
13 13
14/** 14/**
15 * User 15 * User.
16 * 16 *
17 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\UserRepository") 17 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\UserRepository")
18 * @ORM\Table 18 * @ORM\Table
@@ -25,7 +25,7 @@ use JMS\Serializer\Annotation\Expose;
25class User implements AdvancedUserInterface, \Serializable 25class User implements AdvancedUserInterface, \Serializable
26{ 26{
27 /** 27 /**
28 * @var integer 28 * @var int
29 * 29 *
30 * @Expose 30 * @Expose
31 * @ORM\Column(name="id", type="integer") 31 * @ORM\Column(name="id", type="integer")
@@ -142,9 +142,9 @@ class User implements AdvancedUserInterface, \Serializable
142 } 142 }
143 143
144 /** 144 /**
145 * Get id 145 * Get id.
146 * 146 *
147 * @return integer 147 * @return int
148 */ 148 */
149 public function getId() 149 public function getId()
150 { 150 {
@@ -152,9 +152,10 @@ class User implements AdvancedUserInterface, \Serializable
152 } 152 }
153 153
154 /** 154 /**
155 * Set username 155 * Set username.
156 *
157 * @param string $username
156 * 158 *
157 * @param string $username
158 * @return User 159 * @return User
159 */ 160 */
160 public function setUsername($username) 161 public function setUsername($username)
@@ -165,7 +166,7 @@ class User implements AdvancedUserInterface, \Serializable
165 } 166 }
166 167
167 /** 168 /**
168 * Get username 169 * Get username.
169 * 170 *
170 * @return string 171 * @return string
171 */ 172 */
@@ -191,9 +192,10 @@ class User implements AdvancedUserInterface, \Serializable
191 } 192 }
192 193
193 /** 194 /**
194 * Set password 195 * Set password.
196 *
197 * @param string $password
195 * 198 *
196 * @param string $password
197 * @return User 199 * @return User
198 */ 200 */
199 public function setPassword($password) 201 public function setPassword($password)
@@ -208,7 +210,7 @@ class User implements AdvancedUserInterface, \Serializable
208 } 210 }
209 211
210 /** 212 /**
211 * Get password 213 * Get password.
212 * 214 *
213 * @return string 215 * @return string
214 */ 216 */
@@ -218,9 +220,10 @@ class User implements AdvancedUserInterface, \Serializable
218 } 220 }
219 221
220 /** 222 /**
221 * Set name 223 * Set name.
224 *
225 * @param string $name
222 * 226 *
223 * @param string $name
224 * @return User 227 * @return User
225 */ 228 */
226 public function setName($name) 229 public function setName($name)
@@ -231,7 +234,7 @@ class User implements AdvancedUserInterface, \Serializable
231 } 234 }
232 235
233 /** 236 /**
234 * Get name 237 * Get name.
235 * 238 *
236 * @return string 239 * @return string
237 */ 240 */
@@ -241,9 +244,10 @@ class User implements AdvancedUserInterface, \Serializable
241 } 244 }
242 245
243 /** 246 /**
244 * Set email 247 * Set email.
248 *
249 * @param string $email
245 * 250 *
246 * @param string $email
247 * @return User 251 * @return User
248 */ 252 */
249 public function setEmail($email) 253 public function setEmail($email)
@@ -254,7 +258,7 @@ class User implements AdvancedUserInterface, \Serializable
254 } 258 }
255 259
256 /** 260 /**
257 * Get email 261 * Get email.
258 * 262 *
259 * @return string 263 * @return string
260 */ 264 */
@@ -341,8 +345,7 @@ class User implements AdvancedUserInterface, \Serializable
341 public function unserialize($serialized) 345 public function unserialize($serialized)
342 { 346 {
343 list( 347 list(
344 $this->id, 348 $this->id) = unserialize($serialized);
345 ) = unserialize($serialized);
346 } 349 }
347 350
348 public function isEqualTo(UserInterface $user) 351 public function isEqualTo(UserInterface $user)
@@ -370,9 +373,10 @@ class User implements AdvancedUserInterface, \Serializable
370 return $this->isActive; 373 return $this->isActive;
371 } 374 }
372 /** 375 /**
373 * Set config 376 * Set config.
377 *
378 * @param \Wallabag\CoreBundle\Entity\Config $config
374 * 379 *
375 * @param \Wallabag\CoreBundle\Entity\Config $config
376 * @return User 380 * @return User
377 */ 381 */
378 public function setConfig(\Wallabag\CoreBundle\Entity\Config $config = null) 382 public function setConfig(\Wallabag\CoreBundle\Entity\Config $config = null)
@@ -383,7 +387,7 @@ class User implements AdvancedUserInterface, \Serializable
383 } 387 }
384 388
385 /** 389 /**
386 * Get config 390 * Get config.
387 * 391 *
388 * @return \Wallabag\CoreBundle\Entity\Config 392 * @return \Wallabag\CoreBundle\Entity\Config
389 */ 393 */
@@ -393,9 +397,10 @@ class User implements AdvancedUserInterface, \Serializable
393 } 397 }
394 398
395 /** 399 /**
396 * Set confirmationToken 400 * Set confirmationToken.
401 *
402 * @param string $confirmationToken
397 * 403 *
398 * @param string $confirmationToken
399 * @return User 404 * @return User
400 */ 405 */
401 public function setConfirmationToken($confirmationToken) 406 public function setConfirmationToken($confirmationToken)
@@ -406,7 +411,7 @@ class User implements AdvancedUserInterface, \Serializable
406 } 411 }
407 412
408 /** 413 /**
409 * Get confirmationToken 414 * Get confirmationToken.
410 * 415 *
411 * @return string 416 * @return string
412 */ 417 */
@@ -416,9 +421,10 @@ class User implements AdvancedUserInterface, \Serializable
416 } 421 }
417 422
418 /** 423 /**
419 * Set passwordRequestedAt 424 * Set passwordRequestedAt.
425 *
426 * @param \DateTime $passwordRequestedAt
420 * 427 *
421 * @param \DateTime $passwordRequestedAt
422 * @return User 428 * @return User
423 */ 429 */
424 public function setPasswordRequestedAt($passwordRequestedAt) 430 public function setPasswordRequestedAt($passwordRequestedAt)
@@ -429,7 +435,7 @@ class User implements AdvancedUserInterface, \Serializable
429 } 435 }
430 436
431 /** 437 /**
432 * Get passwordRequestedAt 438 * Get passwordRequestedAt.
433 * 439 *
434 * @return \DateTime 440 * @return \DateTime
435 */ 441 */
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
index e141789f..b4224e3d 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
index 0fcf020a..d5890971 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryType.php b/src/Wallabag/CoreBundle/Form/Type/EntryType.php
index cfd64473..839bc25c 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EntryType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EntryType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php
index c278b84f..2ee24b8f 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
index 313a9aae..da30ccd9 100644
--- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php
index 50ae800b..a5d683c4 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php
index a1ab990f..e14e84e1 100644
--- a/src/Wallabag/CoreBundle/Form/Type/RssType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
index 617722db..c088fdd0 100644
--- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Helper/Tools.php b/src/Wallabag/CoreBundle/Helper/Tools.php
index 0fd5f259..be29ab99 100755
--- a/src/Wallabag/CoreBundle/Helper/Tools.php
+++ b/src/Wallabag/CoreBundle/Helper/Tools.php
@@ -5,15 +5,16 @@ namespace Wallabag\CoreBundle\Helper;
5final class Tools 5final class Tools
6{ 6{
7 /** 7 /**
8 * Download a file (typically, for downloading pictures on web server) 8 * Download a file (typically, for downloading pictures on web server).
9 * 9 *
10 * @param $url 10 * @param $url
11 *
11 * @return bool|mixed|string 12 * @return bool|mixed|string
12 */ 13 */
13 public static function getFile($url) 14 public static function getFile($url)
14 { 15 {
15 $timeout = 15; 16 $timeout = 15;
16 $useragent = "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"; 17 $useragent = 'Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0';
17 18
18 if (in_array('curl', get_loaded_extensions())) { 19 if (in_array('curl', get_loaded_extensions())) {
19 # Fetch feed from URL 20 # Fetch feed from URL
@@ -32,7 +33,7 @@ final class Tools
32 33
33 # FeedBurner requires a proper USER-AGENT... 34 # FeedBurner requires a proper USER-AGENT...
34 curl_setopt($curl, CURL_HTTP_VERSION_1_1, true); 35 curl_setopt($curl, CURL_HTTP_VERSION_1_1, true);
35 curl_setopt($curl, CURLOPT_ENCODING, "gzip, deflate"); 36 curl_setopt($curl, CURLOPT_ENCODING, 'gzip, deflate');
36 curl_setopt($curl, CURLOPT_USERAGENT, $useragent); 37 curl_setopt($curl, CURLOPT_USERAGENT, $useragent);
37 38
38 $data = curl_exec($curl); 39 $data = curl_exec($curl);
@@ -45,7 +46,7 @@ final class Tools
45 array( 46 array(
46 'http' => array( 47 'http' => array(
47 'timeout' => $timeout, 48 'timeout' => $timeout,
48 'header' => "User-Agent: ".$useragent, 49 'header' => 'User-Agent: '.$useragent,
49 'follow_location' => true, 50 'follow_location' => true,
50 ), 51 ),
51 'ssl' => array( 52 'ssl' => array(
@@ -91,9 +92,10 @@ final class Tools
91 } 92 }
92 93
93 /** 94 /**
94 * Encode a URL by using a salt 95 * Encode a URL by using a salt.
95 * 96 *
96 * @param $string 97 * @param $string
98 *
97 * @return string 99 * @return string
98 */ 100 */
99 public static function encodeString($string) 101 public static function encodeString($string)
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index a8c138a9..1335e808 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -10,7 +10,7 @@ use Pagerfanta\Pagerfanta;
10class EntryRepository extends EntityRepository 10class EntryRepository extends EntityRepository
11{ 11{
12 /** 12 /**
13 * Retrieves unread entries for a user 13 * Retrieves unread entries for a user.
14 * 14 *
15 * @param int $userId 15 * @param int $userId
16 * @param int $firstResult 16 * @param int $firstResult
@@ -35,7 +35,7 @@ class EntryRepository extends EntityRepository
35 } 35 }
36 36
37 /** 37 /**
38 * Retrieves read entries for a user 38 * Retrieves read entries for a user.
39 * 39 *
40 * @param int $userId 40 * @param int $userId
41 * @param int $firstResult 41 * @param int $firstResult
@@ -61,7 +61,7 @@ class EntryRepository extends EntityRepository
61 } 61 }
62 62
63 /** 63 /**
64 * Retrieves starred entries for a user 64 * Retrieves starred entries for a user.
65 * 65 *
66 * @param int $userId 66 * @param int $userId
67 * @param int $firstResult 67 * @param int $firstResult
@@ -87,7 +87,7 @@ class EntryRepository extends EntityRepository
87 } 87 }
88 88
89 /** 89 /**
90 * Find Entries 90 * Find Entries.
91 * 91 *
92 * @param int $userId 92 * @param int $userId
93 * @param bool $isArchived 93 * @param bool $isArchived
diff --git a/src/Wallabag/CoreBundle/Repository/UserRepository.php b/src/Wallabag/CoreBundle/Repository/UserRepository.php
index aab3dedc..968d0b49 100644
--- a/src/Wallabag/CoreBundle/Repository/UserRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/UserRepository.php
@@ -7,7 +7,7 @@ use Doctrine\ORM\EntityRepository;
7class UserRepository extends EntityRepository 7class UserRepository extends EntityRepository
8{ 8{
9 /** 9 /**
10 * Find a user by its username and rss roken 10 * Find a user by its username and rss roken.
11 * 11 *
12 * @param string $username 12 * @param string $username
13 * @param string $rssToken 13 * @param string $rssToken
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php
index fcfe418b..e7c81fc0 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php
+++ b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php
@@ -7,8 +7,7 @@ use Symfony\Component\Security\Core\Exception\BadCredentialsException;
7 7
8/** 8/**
9 * This override just add en extra variable (username) to be able to salt the password 9 * This override just add en extra variable (username) to be able to salt the password
10 * the way Wallabag v1 does. It will avoid to break compatibility with Wallabag v1 10 * the way Wallabag v1 does. It will avoid to break compatibility with Wallabag v1.
11 *
12 */ 11 */
13class WallabagPasswordEncoder extends BasePasswordEncoder 12class WallabagPasswordEncoder extends BasePasswordEncoder
14{ 13{
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php
index 1c7c5fae..cf3cb051 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php
+++ b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php
@@ -45,7 +45,7 @@ class WallabagAuthenticationProvider extends UserAuthenticationProvider
45 throw new BadCredentialsException('The credentials were changed from another session.'); 45 throw new BadCredentialsException('The credentials were changed from another session.');
46 } 46 }
47 } else { 47 } else {
48 if ("" === ($presentedPassword = $token->getCredentials())) { 48 if ('' === ($presentedPassword = $token->getCredentials())) {
49 throw new BadCredentialsException('The presented password cannot be empty.'); 49 throw new BadCredentialsException('The presented password cannot be empty.');
50 } 50 }
51 51
diff --git a/src/Wallabag/CoreBundle/Service/Extractor.php b/src/Wallabag/CoreBundle/Service/Extractor.php
index e4ec96f6..6d43a1da 100644
--- a/src/Wallabag/CoreBundle/Service/Extractor.php
+++ b/src/Wallabag/CoreBundle/Service/Extractor.php
@@ -9,7 +9,7 @@ final class Extractor
9{ 9{
10 public static function extract($url) 10 public static function extract($url)
11 { 11 {
12 $pageContent = Extractor::getPageContent(new Url(base64_encode($url))); 12 $pageContent = self::getPageContent(new Url(base64_encode($url)));
13 $title = $pageContent['rss']['channel']['item']['title'] ?: 'Untitled'; 13 $title = $pageContent['rss']['channel']['item']['title'] ?: 'Untitled';
14 $body = $pageContent['rss']['channel']['item']['description']; 14 $body = $pageContent['rss']['channel']['item']['description'];
15 15
@@ -21,9 +21,10 @@ final class Extractor
21 } 21 }
22 22
23 /** 23 /**
24 * Get the content for a given URL (by a call to FullTextFeed) 24 * Get the content for a given URL (by a call to FullTextFeed).
25 *
26 * @param Url $url
25 * 27 *
26 * @param Url $url
27 * @return mixed 28 * @return mixed
28 */ 29 */
29 public static function getPageContent(Url $url) 30 public static function getPageContent(Url $url)
@@ -49,12 +50,12 @@ final class Extractor
49 $scope = function () { 50 $scope = function () {
50 extract(func_get_arg(1)); 51 extract(func_get_arg(1));
51 $_GET = $_REQUEST = array( 52 $_GET = $_REQUEST = array(
52 "url" => $url->getUrl(), 53 'url' => $url->getUrl(),
53 "max" => 5, 54 'max' => 5,
54 "links" => "preserve", 55 'links' => 'preserve',
55 "exc" => "", 56 'exc' => '',
56 "format" => "json", 57 'format' => 'json',
57 "submit" => "Create Feed", 58 'submit' => 'Create Feed',
58 ); 59 );
59 ob_start(); 60 ob_start();
60 require func_get_arg(0); 61 require func_get_arg(0);
@@ -67,11 +68,11 @@ final class Extractor
67 // Silence $scope function to avoid 68 // Silence $scope function to avoid
68 // issues with FTRSS when error_reporting is to high 69 // issues with FTRSS when error_reporting is to high
69 // FTRSS generates PHP warnings which break output 70 // FTRSS generates PHP warnings which break output
70 $json = @$scope(__DIR__."/../../../../vendor/wallabag/Fivefilters_Libraries/makefulltextfeed.php", array("url" => $url)); 71 $json = @$scope(__DIR__.'/../../../../vendor/wallabag/Fivefilters_Libraries/makefulltextfeed.php', array('url' => $url));
71 72
72 // Clearing and restoring context 73 // Clearing and restoring context
73 foreach ($GLOBALS as $key => $value) { 74 foreach ($GLOBALS as $key => $value) {
74 if ($key != "GLOBALS" && $key != "_SESSION") { 75 if ($key != 'GLOBALS' && $key != '_SESSION') {
75 unset($GLOBALS[$key]); 76 unset($GLOBALS[$key]);
76 } 77 }
77 } 78 }
diff --git a/src/Wallabag/CoreBundle/Tools/Utils.php b/src/Wallabag/CoreBundle/Tools/Utils.php
index 8fa74491..7e2968e7 100644
--- a/src/Wallabag/CoreBundle/Tools/Utils.php
+++ b/src/Wallabag/CoreBundle/Tools/Utils.php
@@ -5,7 +5,7 @@ namespace Wallabag\CoreBundle\Tools;
5class Utils 5class Utils
6{ 6{
7 /** 7 /**
8 * Generate a token used for RSS 8 * Generate a token used for RSS.
9 * 9 *
10 * @return string 10 * @return string
11 */ 11 */
diff --git a/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php
index 92406865..18388948 100644
--- a/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php
+++ b/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php
@@ -13,9 +13,10 @@ class WallabagExtension extends \Twig_Extension
13 } 13 }
14 14
15 /** 15 /**
16 * Returns the domain name for a URL 16 * Returns the domain name for a URL.
17 * 17 *
18 * @param $url 18 * @param $url
19 *
19 * @return string 20 * @return string
20 */ 21 */
21 public static function getDomainName($url) 22 public static function getDomainName($url)
@@ -24,9 +25,10 @@ class WallabagExtension extends \Twig_Extension
24 } 25 }
25 26
26 /** 27 /**
27 * For a given text, we calculate reading time for an article 28 * For a given text, we calculate reading time for an article.
28 * 29 *
29 * @param $text 30 * @param $text
31 *
30 * @return float 32 * @return float
31 */ 33 */
32 public static function getReadingTime($text) 34 public static function getReadingTime($text)