diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-20 08:22:39 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-20 08:22:39 +0200 |
commit | 4fcb7eaf139a4d2cbd0f54574e6c51a0fe852ef1 (patch) | |
tree | 4d878e6d4eb5c1baab95cd02e3eb95ee4182a399 /src | |
parent | 34437f408c5b7b590aded6795d7ce01bfbfc7711 (diff) | |
parent | 8ce32af61229eec8f4cc34b207273d47f60adc48 (diff) | |
download | wallabag-4fcb7eaf139a4d2cbd0f54574e6c51a0fe852ef1.tar.gz wallabag-4fcb7eaf139a4d2cbd0f54574e6c51a0fe852ef1.tar.zst wallabag-4fcb7eaf139a4d2cbd0f54574e6c51a0fe852ef1.zip |
Merge pull request #1383 from wallabag/cs
CS
Diffstat (limited to 'src')
21 files changed, 73 insertions, 73 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 692a4ae0..02a6de64 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -84,12 +84,12 @@ class WallabagRestController extends Controller | |||
84 | public function getEntriesAction(Request $request) | 84 | public function getEntriesAction(Request $request) |
85 | { | 85 | { |
86 | $isArchived = $request->query->get('archive'); | 86 | $isArchived = $request->query->get('archive'); |
87 | $isStarred = $request->query->get('star'); | 87 | $isStarred = $request->query->get('star'); |
88 | $sort = $request->query->get('sort', 'created'); | 88 | $sort = $request->query->get('sort', 'created'); |
89 | $order = $request->query->get('order', 'desc'); | 89 | $order = $request->query->get('order', 'desc'); |
90 | $page = (int) $request->query->get('page', 1); | 90 | $page = (int) $request->query->get('page', 1); |
91 | $perPage = (int) $request->query->get('perPage', 30); | 91 | $perPage = (int) $request->query->get('perPage', 30); |
92 | $tags = $request->query->get('tags', []); | 92 | $tags = $request->query->get('tags', []); |
93 | 93 | ||
94 | $pager = $this | 94 | $pager = $this |
95 | ->getDoctrine() | 95 | ->getDoctrine() |
@@ -99,7 +99,7 @@ class WallabagRestController extends Controller | |||
99 | $pager->setCurrentPage($page); | 99 | $pager->setCurrentPage($page); |
100 | $pager->setMaxPerPage($perPage); | 100 | $pager->setMaxPerPage($perPage); |
101 | 101 | ||
102 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); | 102 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); |
103 | $paginatedCollection = $pagerfantaFactory->createRepresentation( | 103 | $paginatedCollection = $pagerfantaFactory->createRepresentation( |
104 | $pager, | 104 | $pager, |
105 | new Route('api_get_entries', [], $absolute = true) | 105 | new Route('api_get_entries', [], $absolute = true) |
@@ -188,9 +188,9 @@ class WallabagRestController extends Controller | |||
188 | { | 188 | { |
189 | $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId()); | 189 | $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId()); |
190 | 190 | ||
191 | $title = $request->request->get('title'); | 191 | $title = $request->request->get('title'); |
192 | $isArchived = $request->request->get('is_archived'); | 192 | $isArchived = $request->request->get('is_archived'); |
193 | $isStarred = $request->request->get('is_starred'); | 193 | $isStarred = $request->request->get('is_starred'); |
194 | 194 | ||
195 | if (!is_null($title)) { | 195 | if (!is_null($title)) { |
196 | $entry->setTitle($title); | 196 | $entry->setTitle($title); |
diff --git a/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php b/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php index db73ae2a..9bf8b377 100644 --- a/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php +++ b/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php | |||
@@ -17,7 +17,7 @@ class WsseProvider implements AuthenticationProviderInterface | |||
17 | public function __construct(UserProviderInterface $userProvider, $cacheDir) | 17 | public function __construct(UserProviderInterface $userProvider, $cacheDir) |
18 | { | 18 | { |
19 | $this->userProvider = $userProvider; | 19 | $this->userProvider = $userProvider; |
20 | $this->cacheDir = $cacheDir; | 20 | $this->cacheDir = $cacheDir; |
21 | 21 | ||
22 | // If cache directory does not exist we create it | 22 | // If cache directory does not exist we create it |
23 | if (!is_dir($this->cacheDir)) { | 23 | if (!is_dir($this->cacheDir)) { |
diff --git a/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php b/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php index 50587837..2fcbe014 100644 --- a/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php +++ b/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php | |||
@@ -36,9 +36,9 @@ class WsseListener implements ListenerInterface | |||
36 | $token = new WsseUserToken(); | 36 | $token = new WsseUserToken(); |
37 | $token->setUser($matches[1]); | 37 | $token->setUser($matches[1]); |
38 | 38 | ||
39 | $token->digest = $matches[2]; | 39 | $token->digest = $matches[2]; |
40 | $token->nonce = $matches[3]; | 40 | $token->nonce = $matches[3]; |
41 | $token->created = $matches[4]; | 41 | $token->created = $matches[4]; |
42 | 42 | ||
43 | try { | 43 | try { |
44 | $authToken = $this->authenticationManager->authenticate($token); | 44 | $authToken = $this->authenticationManager->authenticate($token); |
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 93ce650e..006fa396 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -136,9 +136,9 @@ class EntryController extends Controller | |||
136 | return $this->render( | 136 | return $this->render( |
137 | 'WallabagCoreBundle:Entry:entries.html.twig', | 137 | 'WallabagCoreBundle:Entry:entries.html.twig', |
138 | array( | 138 | array( |
139 | 'form' => $form->createView(), | 139 | 'form' => $form->createView(), |
140 | 'entries' => $entries, | 140 | 'entries' => $entries, |
141 | 'currentPage' => $page | 141 | 'currentPage' => $page, |
142 | ) | 142 | ) |
143 | ); | 143 | ); |
144 | } | 144 | } |
@@ -178,9 +178,9 @@ class EntryController extends Controller | |||
178 | return $this->render( | 178 | return $this->render( |
179 | 'WallabagCoreBundle:Entry:entries.html.twig', | 179 | 'WallabagCoreBundle:Entry:entries.html.twig', |
180 | array( | 180 | array( |
181 | 'form' => $form->createView(), | 181 | 'form' => $form->createView(), |
182 | 'entries' => $entries, | 182 | 'entries' => $entries, |
183 | 'currentPage' => $page | 183 | 'currentPage' => $page, |
184 | ) | 184 | ) |
185 | ); | 185 | ); |
186 | } | 186 | } |
@@ -220,9 +220,9 @@ class EntryController extends Controller | |||
220 | return $this->render( | 220 | return $this->render( |
221 | 'WallabagCoreBundle:Entry:entries.html.twig', | 221 | 'WallabagCoreBundle:Entry:entries.html.twig', |
222 | array( | 222 | array( |
223 | 'form' => $form->createView(), | 223 | 'form' => $form->createView(), |
224 | 'entries' => $entries, | 224 | 'entries' => $entries, |
225 | 'currentPage' => $page | 225 | 'currentPage' => $page, |
226 | ) | 226 | ) |
227 | ); | 227 | ); |
228 | } | 228 | } |
@@ -265,7 +265,7 @@ class EntryController extends Controller | |||
265 | 265 | ||
266 | $this->get('session')->getFlashBag()->add( | 266 | $this->get('session')->getFlashBag()->add( |
267 | 'notice', | 267 | 'notice', |
268 | 'Entry ' . ($entry->isArchived() ? 'archived' : 'unarchived') | 268 | 'Entry '.($entry->isArchived() ? 'archived' : 'unarchived') |
269 | ); | 269 | ); |
270 | 270 | ||
271 | return $this->redirect($request->headers->get('referer')); | 271 | return $this->redirect($request->headers->get('referer')); |
@@ -290,7 +290,7 @@ class EntryController extends Controller | |||
290 | 290 | ||
291 | $this->get('session')->getFlashBag()->add( | 291 | $this->get('session')->getFlashBag()->add( |
292 | 'notice', | 292 | 'notice', |
293 | 'Entry ' . ($entry->isStarred() ? 'starred' : 'unstarred') | 293 | 'Entry '.($entry->isStarred() ? 'starred' : 'unstarred') |
294 | ); | 294 | ); |
295 | 295 | ||
296 | return $this->redirect($request->headers->get('referer')); | 296 | return $this->redirect($request->headers->get('referer')); |
diff --git a/src/Wallabag/CoreBundle/Controller/SecurityController.php b/src/Wallabag/CoreBundle/Controller/SecurityController.php index a61a898b..f0a7ab6d 100644 --- a/src/Wallabag/CoreBundle/Controller/SecurityController.php +++ b/src/Wallabag/CoreBundle/Controller/SecurityController.php | |||
@@ -25,7 +25,7 @@ class SecurityController extends Controller | |||
25 | return $this->render('WallabagCoreBundle:Security:login.html.twig', array( | 25 | return $this->render('WallabagCoreBundle:Security:login.html.twig', array( |
26 | // last username entered by the user | 26 | // last username entered by the user |
27 | 'last_username' => $session->get(SecurityContext::LAST_USERNAME), | 27 | 'last_username' => $session->get(SecurityContext::LAST_USERNAME), |
28 | 'error' => $error, | 28 | 'error' => $error, |
29 | )); | 29 | )); |
30 | } | 30 | } |
31 | 31 | ||
diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php index 09be1b74..3b844b44 100644 --- a/src/Wallabag/CoreBundle/Controller/StaticController.php +++ b/src/Wallabag/CoreBundle/Controller/StaticController.php | |||
@@ -10,13 +10,14 @@ class StaticController extends Controller | |||
10 | /** | 10 | /** |
11 | * @Route("/howto", name="howto") | 11 | * @Route("/howto", name="howto") |
12 | */ | 12 | */ |
13 | public function howtoAction() | 13 | public function howtoAction() |
14 | { | 14 | { |
15 | return $this->render( | 15 | return $this->render( |
16 | 'WallabagCoreBundle:Static:howto.html.twig', | 16 | 'WallabagCoreBundle:Static:howto.html.twig', |
17 | array() | 17 | array() |
18 | ); | 18 | ); |
19 | } | 19 | } |
20 | |||
20 | /** | 21 | /** |
21 | * @Route("/about", name="about") | 22 | * @Route("/about", name="about") |
22 | */ | 23 | */ |
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index e448cea1..a342ec0b 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php | |||
@@ -23,9 +23,8 @@ class TagController extends Controller | |||
23 | return $this->render( | 23 | return $this->render( |
24 | 'WallabagCoreBundle:Tag:tags.html.twig', | 24 | 'WallabagCoreBundle:Tag:tags.html.twig', |
25 | array( | 25 | array( |
26 | 'tags' => $tags | 26 | 'tags' => $tags, |
27 | ) | 27 | ) |
28 | ); | 28 | ); |
29 | } | 29 | } |
30 | |||
31 | } | 30 | } |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php index 3bb5c5f2..cb0c52c4 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php | |||
@@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Entity\Config; | |||
10 | class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface | 10 | class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface |
11 | { | 11 | { |
12 | /** | 12 | /** |
13 | * {@inheritDoc} | 13 | * {@inheritdoc} |
14 | */ | 14 | */ |
15 | public function load(ObjectManager $manager) | 15 | public function load(ObjectManager $manager) |
16 | { | 16 | { |
@@ -36,7 +36,7 @@ class LoadConfigData extends AbstractFixture implements OrderedFixtureInterface | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * {@inheritDoc} | 39 | * {@inheritdoc} |
40 | */ | 40 | */ |
41 | public function getOrder() | 41 | public function getOrder() |
42 | { | 42 | { |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php index 547d6753..6cd24d44 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php | |||
@@ -11,7 +11,7 @@ use Wallabag\CoreBundle\Entity\Tag; | |||
11 | class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface | 11 | class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface |
12 | { | 12 | { |
13 | /** | 13 | /** |
14 | * {@inheritDoc} | 14 | * {@inheritdoc} |
15 | */ | 15 | */ |
16 | public function load(ObjectManager $manager) | 16 | public function load(ObjectManager $manager) |
17 | { | 17 | { |
@@ -91,7 +91,7 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface | |||
91 | } | 91 | } |
92 | 92 | ||
93 | /** | 93 | /** |
94 | * {@inheritDoc} | 94 | * {@inheritdoc} |
95 | */ | 95 | */ |
96 | public function getOrder() | 96 | public function getOrder() |
97 | { | 97 | { |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php index d99412f4..1c7f9dfa 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadUserData.php | |||
@@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Entity\User; | |||
10 | class LoadUserData extends AbstractFixture implements OrderedFixtureInterface | 10 | class LoadUserData extends AbstractFixture implements OrderedFixtureInterface |
11 | { | 11 | { |
12 | /** | 12 | /** |
13 | * {@inheritDoc} | 13 | * {@inheritdoc} |
14 | */ | 14 | */ |
15 | public function load(ObjectManager $manager) | 15 | public function load(ObjectManager $manager) |
16 | { | 16 | { |
@@ -38,7 +38,7 @@ class LoadUserData extends AbstractFixture implements OrderedFixtureInterface | |||
38 | } | 38 | } |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * {@inheritDoc} | 41 | * {@inheritdoc} |
42 | */ | 42 | */ |
43 | public function getOrder() | 43 | public function getOrder() |
44 | { | 44 | { |
diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 92442df6..6f005314 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php | |||
@@ -48,7 +48,7 @@ class Tag | |||
48 | 48 | ||
49 | public function __construct(User $user) | 49 | public function __construct(User $user) |
50 | { | 50 | { |
51 | $this->user = $user; | 51 | $this->user = $user; |
52 | $this->entries = new ArrayCollection(); | 52 | $this->entries = new ArrayCollection(); |
53 | } | 53 | } |
54 | 54 | ||
diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php index 00eb808a..510a1594 100644 --- a/src/Wallabag/CoreBundle/Entity/User.php +++ b/src/Wallabag/CoreBundle/Entity/User.php | |||
@@ -123,9 +123,9 @@ class User implements AdvancedUserInterface, \Serializable | |||
123 | public function __construct() | 123 | public function __construct() |
124 | { | 124 | { |
125 | $this->isActive = true; | 125 | $this->isActive = true; |
126 | $this->salt = md5(uniqid(null, true)); | 126 | $this->salt = md5(uniqid(null, true)); |
127 | $this->entries = new ArrayCollection(); | 127 | $this->entries = new ArrayCollection(); |
128 | $this->tags = new ArrayCollection(); | 128 | $this->tags = new ArrayCollection(); |
129 | } | 129 | } |
130 | 130 | ||
131 | /** | 131 | /** |
@@ -176,7 +176,7 @@ class User implements AdvancedUserInterface, \Serializable | |||
176 | } | 176 | } |
177 | 177 | ||
178 | /** | 178 | /** |
179 | * @inheritDoc | 179 | * {@inheritdoc} |
180 | */ | 180 | */ |
181 | public function getSalt() | 181 | public function getSalt() |
182 | { | 182 | { |
@@ -184,7 +184,7 @@ class User implements AdvancedUserInterface, \Serializable | |||
184 | } | 184 | } |
185 | 185 | ||
186 | /** | 186 | /** |
187 | * @inheritDoc | 187 | * {@inheritdoc} |
188 | */ | 188 | */ |
189 | public function getRoles() | 189 | public function getRoles() |
190 | { | 190 | { |
@@ -323,7 +323,7 @@ class User implements AdvancedUserInterface, \Serializable | |||
323 | return $this->tags; | 323 | return $this->tags; |
324 | } | 324 | } |
325 | /** | 325 | /** |
326 | * @inheritDoc | 326 | * {@inheritdoc} |
327 | */ | 327 | */ |
328 | public function eraseCredentials() | 328 | public function eraseCredentials() |
329 | { | 329 | { |
diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php index d1057fb5..771daef1 100644 --- a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php | |||
@@ -5,7 +5,6 @@ namespace Wallabag\CoreBundle\Filter; | |||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\FormBuilderInterface; | 6 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 7 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands; | ||
9 | use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface; | 8 | use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface; |
10 | 9 | ||
11 | class EntryFilterType extends AbstractType | 10 | class EntryFilterType extends AbstractType |
@@ -17,26 +16,29 @@ class EntryFilterType extends AbstractType | |||
17 | ->add('createdAt', 'filter_date_range', array( | 16 | ->add('createdAt', 'filter_date_range', array( |
18 | 'left_date_options' => array( | 17 | 'left_date_options' => array( |
19 | 'attr' => array( | 18 | 'attr' => array( |
20 | 'placeholder' => 'dd/mm/yyyy'), | 19 | 'placeholder' => 'dd/mm/yyyy', |
20 | ), | ||
21 | 'format' => 'dd/MM/yyyy', | 21 | 'format' => 'dd/MM/yyyy', |
22 | 'widget' => 'single_text' | 22 | 'widget' => 'single_text', |
23 | ), | 23 | ), |
24 | 'right_date_options' => array( | 24 | 'right_date_options' => array( |
25 | 'attr' => array( | 25 | 'attr' => array( |
26 | 'placeholder' => 'dd/mm/yyyy'), | 26 | 'placeholder' => 'dd/mm/yyyy', |
27 | ), | ||
27 | 'format' => 'dd/MM/yyyy', | 28 | 'format' => 'dd/MM/yyyy', |
28 | 'widget' => 'single_text' | 29 | 'widget' => 'single_text', |
29 | ))) | 30 | ), |
31 | )) | ||
30 | ->add('domainName', 'filter_text', array( | 32 | ->add('domainName', 'filter_text', array( |
31 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) | 33 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
32 | { | ||
33 | $value = $values['value']; | 34 | $value = $values['value']; |
34 | if (strlen($value) <= 3 || empty($value)) { | 35 | if (strlen($value) <= 3 || empty($value)) { |
35 | return null; | 36 | return; |
36 | } | 37 | } |
37 | $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); | 38 | $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); |
39 | |||
38 | return $filterQuery->createCondition($expression); | 40 | return $filterQuery->createCondition($expression); |
39 | } | 41 | }, |
40 | )); | 42 | )); |
41 | } | 43 | } |
42 | 44 | ||
@@ -48,8 +50,8 @@ class EntryFilterType extends AbstractType | |||
48 | public function configureOptions(OptionsResolver $resolver) | 50 | public function configureOptions(OptionsResolver $resolver) |
49 | { | 51 | { |
50 | $resolver->setDefaults(array( | 52 | $resolver->setDefaults(array( |
51 | 'csrf_protection' => false, | 53 | 'csrf_protection' => false, |
52 | 'validation_groups' => array('filtering') | 54 | 'validation_groups' => array('filtering'), |
53 | )); | 55 | )); |
54 | } | 56 | } |
55 | } | 57 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index b4224e3d..82e1954d 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | |||
@@ -19,7 +19,7 @@ class ChangePasswordType extends AbstractType | |||
19 | 'type' => 'password', | 19 | 'type' => 'password', |
20 | 'invalid_message' => 'The password fields must match.', | 20 | 'invalid_message' => 'The password fields must match.', |
21 | 'required' => true, | 21 | 'required' => true, |
22 | 'first_options' => array('label' => 'New password'), | 22 | 'first_options' => array('label' => 'New password'), |
23 | 'second_options' => array('label' => 'Repeat new password'), | 23 | 'second_options' => array('label' => 'Repeat new password'), |
24 | 'constraints' => array( | 24 | 'constraints' => array( |
25 | new Constraints\Length(array( | 25 | new Constraints\Length(array( |
diff --git a/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php index a5d683c4..38f1a105 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php | |||
@@ -15,7 +15,7 @@ class ResetPasswordType extends AbstractType | |||
15 | 'type' => 'password', | 15 | 'type' => 'password', |
16 | 'invalid_message' => 'The password fields must match.', | 16 | 'invalid_message' => 'The password fields must match.', |
17 | 'required' => true, | 17 | 'required' => true, |
18 | 'first_options' => array('label' => 'New password'), | 18 | 'first_options' => array('label' => 'New password'), |
19 | 'second_options' => array('label' => 'Repeat new password'), | 19 | 'second_options' => array('label' => 'Repeat new password'), |
20 | 'constraints' => array( | 20 | 'constraints' => array( |
21 | new Constraints\Length(array( | 21 | new Constraints\Length(array( |
diff --git a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php index ea2bda17..2771cf11 100644 --- a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php +++ b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php | |||
@@ -67,7 +67,7 @@ class UsernameRssTokenConverter implements ParamConverterInterface | |||
67 | public function apply(Request $request, ParamConverter $configuration) | 67 | public function apply(Request $request, ParamConverter $configuration) |
68 | { | 68 | { |
69 | $username = $request->attributes->get('username'); | 69 | $username = $request->attributes->get('username'); |
70 | $rssToken = $request->attributes->get('token'); | 70 | $rssToken = $request->attributes->get('token'); |
71 | 71 | ||
72 | // Check, if route attributes exists | 72 | // Check, if route attributes exists |
73 | if (null === $username || null === $rssToken) { | 73 | if (null === $username || null === $rssToken) { |
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index 51f1cd42..9c409607 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php | |||
@@ -11,7 +11,7 @@ class TagRepository extends EntityRepository | |||
11 | /** | 11 | /** |
12 | * Find Tags. | 12 | * Find Tags. |
13 | * | 13 | * |
14 | * @param int $userId | 14 | * @param int $userId |
15 | * | 15 | * |
16 | * @return array | 16 | * @return array |
17 | */ | 17 | */ |
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php index e7c81fc0..98b4e86b 100644 --- a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php +++ b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php | |||
@@ -52,7 +52,7 @@ class WallabagPasswordEncoder extends BasePasswordEncoder | |||
52 | $digest = hash($this->algorithm, $salted, true); | 52 | $digest = hash($this->algorithm, $salted, true); |
53 | 53 | ||
54 | // "stretch" hash | 54 | // "stretch" hash |
55 | for ($i = 1; $i < $this->iterations; $i++) { | 55 | for ($i = 1; $i < $this->iterations; ++$i) { |
56 | $digest = hash($this->algorithm, $digest.$salted, true); | 56 | $digest = hash($this->algorithm, $digest.$salted, true); |
57 | } | 57 | } |
58 | 58 | ||
diff --git a/src/Wallabag/CoreBundle/Service/Extractor.php b/src/Wallabag/CoreBundle/Service/Extractor.php index 961ac20a..4c067d3a 100644 --- a/src/Wallabag/CoreBundle/Service/Extractor.php +++ b/src/Wallabag/CoreBundle/Service/Extractor.php | |||
@@ -33,8 +33,8 @@ final class Extractor | |||
33 | $REAL = array(); | 33 | $REAL = array(); |
34 | foreach ($GLOBALS as $key => $value) { | 34 | foreach ($GLOBALS as $key => $value) { |
35 | if ($key != 'GLOBALS' && $key != '_SESSION' && $key != 'HTTP_SESSION_VARS') { | 35 | if ($key != 'GLOBALS' && $key != '_SESSION' && $key != 'HTTP_SESSION_VARS') { |
36 | $GLOBALS[$key] = array(); | 36 | $GLOBALS[$key] = array(); |
37 | $REAL[$key] = $value; | 37 | $REAL[$key] = $value; |
38 | } | 38 | } |
39 | } | 39 | } |
40 | // Saving and clearing session | 40 | // Saving and clearing session |
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index 8d013ec0..86a19f61 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php | |||
@@ -252,7 +252,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
252 | 252 | ||
253 | $data = array( | 253 | $data = array( |
254 | 'entry_filter[readingTime][right_number]' => 11, | 254 | 'entry_filter[readingTime][right_number]' => 11, |
255 | 'entry_filter[readingTime][left_number]' => 11 | 255 | 'entry_filter[readingTime][left_number]' => 11, |
256 | ); | 256 | ); |
257 | 257 | ||
258 | $crawler = $client->submit($form, $data); | 258 | $crawler = $client->submit($form, $data); |
@@ -271,7 +271,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
271 | 271 | ||
272 | $data = array( | 272 | $data = array( |
273 | 'entry_filter[createdAt][left_date]' => date('d/m/Y'), | 273 | 'entry_filter[createdAt][left_date]' => date('d/m/Y'), |
274 | 'entry_filter[createdAt][right_date]' => date('d/m/Y', strtotime("+1 day")) | 274 | 'entry_filter[createdAt][right_date]' => date('d/m/Y', strtotime('+1 day')), |
275 | ); | 275 | ); |
276 | 276 | ||
277 | $crawler = $client->submit($form, $data); | 277 | $crawler = $client->submit($form, $data); |
@@ -280,13 +280,12 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
280 | 280 | ||
281 | $data = array( | 281 | $data = array( |
282 | 'entry_filter[createdAt][left_date]' => '01/01/1970', | 282 | 'entry_filter[createdAt][left_date]' => '01/01/1970', |
283 | 'entry_filter[createdAt][right_date]' => '01/01/1970' | 283 | 'entry_filter[createdAt][right_date]' => '01/01/1970', |
284 | ); | 284 | ); |
285 | 285 | ||
286 | $crawler = $client->submit($form, $data); | 286 | $crawler = $client->submit($form, $data); |
287 | 287 | ||
288 | $this->assertCount(0, $crawler->filter('div[class=entry]')); | 288 | $this->assertCount(0, $crawler->filter('div[class=entry]')); |
289 | |||
290 | } | 289 | } |
291 | 290 | ||
292 | public function testPaginationWithFilter() | 291 | public function testPaginationWithFilter() |
@@ -318,7 +317,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
318 | $crawler = $client->request('GET', '/unread/list'); | 317 | $crawler = $client->request('GET', '/unread/list'); |
319 | $form = $crawler->filter('button[id=submit-filter]')->form(); | 318 | $form = $crawler->filter('button[id=submit-filter]')->form(); |
320 | $data = array( | 319 | $data = array( |
321 | 'entry_filter[domainName]' => 'monde' | 320 | 'entry_filter[domainName]' => 'monde', |
322 | ); | 321 | ); |
323 | 322 | ||
324 | $crawler = $client->submit($form, $data); | 323 | $crawler = $client->submit($form, $data); |
@@ -326,7 +325,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
326 | 325 | ||
327 | $form = $crawler->filter('button[id=submit-filter]')->form(); | 326 | $form = $crawler->filter('button[id=submit-filter]')->form(); |
328 | $data = array( | 327 | $data = array( |
329 | 'entry_filter[domainName]' => 'wallabag' | 328 | 'entry_filter[domainName]' => 'wallabag', |
330 | ); | 329 | ); |
331 | 330 | ||
332 | $crawler = $client->submit($form, $data); | 331 | $crawler = $client->submit($form, $data); |
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php index 34faf709..4a43e049 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php | |||
@@ -3,7 +3,6 @@ | |||
3 | namespace Wallabag\CoreBundle\Tests\Controller; | 3 | namespace Wallabag\CoreBundle\Tests\Controller; |
4 | 4 | ||
5 | use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; | 5 | use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; |
6 | use Doctrine\ORM\AbstractQuery; | ||
7 | 6 | ||
8 | class TagControllerTest extends WallabagCoreTestCase | 7 | class TagControllerTest extends WallabagCoreTestCase |
9 | { | 8 | { |