diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-31 21:24:20 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-31 21:24:20 +0100 |
commit | 4cfbd5d893aa51fd5d3b349c2695e9913591041f (patch) | |
tree | c07eb79213d471aa33c49ef4e5819e41cc12f242 /src/Wallabag/CoreBundle/Controller/WallabagRestController.php | |
parent | 1990517b2263a080946853ed697a6d687262ae80 (diff) | |
parent | 7df80cb32ca9b7d0fe452320ddc3563a1e373e2f (diff) | |
download | wallabag-4cfbd5d893aa51fd5d3b349c2695e9913591041f.tar.gz wallabag-4cfbd5d893aa51fd5d3b349c2695e9913591041f.tar.zst wallabag-4cfbd5d893aa51fd5d3b349c2695e9913591041f.zip |
Merge pull request #1037 from j0k3r/refactor-cs
CS
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/WallabagRestController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index 8e018e88..5668d934 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php | |||
@@ -3,7 +3,6 @@ | |||
3 | namespace Wallabag\CoreBundle\Controller; | 3 | namespace Wallabag\CoreBundle\Controller; |
4 | 4 | ||
5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
6 | use FOS\RestBundle\Controller\Annotations\View; | ||
7 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
8 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
9 | use Wallabag\CoreBundle\Entity\Entries; | 8 | use Wallabag\CoreBundle\Entity\Entries; |
@@ -12,7 +11,6 @@ use Wallabag\CoreBundle\Service\Extractor; | |||
12 | 11 | ||
13 | class WallabagRestController extends Controller | 12 | class WallabagRestController extends Controller |
14 | { | 13 | { |
15 | |||
16 | /** | 14 | /** |
17 | * Retrieve all entries. It could be filtered by many options. | 15 | * Retrieve all entries. It could be filtered by many options. |
18 | * | 16 | * |
@@ -44,14 +42,13 @@ class WallabagRestController extends Controller | |||
44 | $entries = $this | 42 | $entries = $this |
45 | ->getDoctrine() | 43 | ->getDoctrine() |
46 | ->getRepository('WallabagCoreBundle:Entries') | 44 | ->getRepository('WallabagCoreBundle:Entries') |
47 | ->findEntries(1, (int)$isArchived, (int)$isStarred, (int)$isDeleted, $sort, $order); | 45 | ->findEntries(1, (int) $isArchived, (int) $isStarred, (int) $isDeleted, $sort, $order); |
48 | 46 | ||
49 | if(!is_array($entries)) { | 47 | if (!is_array($entries)) { |
50 | throw $this->createNotFoundException(); | 48 | throw $this->createNotFoundException(); |
51 | } | 49 | } |
52 | 50 | ||
53 | return $entries; | 51 | return $entries; |
54 | |||
55 | } | 52 | } |
56 | 53 | ||
57 | /** | 54 | /** |
@@ -119,7 +116,6 @@ class WallabagRestController extends Controller | |||
119 | */ | 116 | */ |
120 | public function patchEntriesAction(Entries $entry) | 117 | public function patchEntriesAction(Entries $entry) |
121 | { | 118 | { |
122 | |||
123 | } | 119 | } |
124 | 120 | ||
125 | /** | 121 | /** |
@@ -133,10 +129,8 @@ class WallabagRestController extends Controller | |||
133 | */ | 129 | */ |
134 | public function deleteEntriesAction(Entries $entry) | 130 | public function deleteEntriesAction(Entries $entry) |
135 | { | 131 | { |
136 | |||
137 | } | 132 | } |
138 | 133 | ||
139 | |||
140 | /** | 134 | /** |
141 | * Retrieve all tags for an entry | 135 | * Retrieve all tags for an entry |
142 | * | 136 | * |
@@ -146,8 +140,8 @@ class WallabagRestController extends Controller | |||
146 | * } | 140 | * } |
147 | * ) | 141 | * ) |
148 | */ | 142 | */ |
149 | public function getEntriesTagsAction(Entries $entry) { | 143 | public function getEntriesTagsAction(Entries $entry) |
150 | 144 | { | |
151 | } | 145 | } |
152 | 146 | ||
153 | /** | 147 | /** |
@@ -162,8 +156,8 @@ class WallabagRestController extends Controller | |||
162 | * } | 156 | * } |
163 | * ) | 157 | * ) |
164 | */ | 158 | */ |
165 | public function postEntriesTagsAction(Entries $entry) { | 159 | public function postEntriesTagsAction(Entries $entry) |
166 | 160 | { | |
167 | } | 161 | } |
168 | 162 | ||
169 | /** | 163 | /** |
@@ -178,7 +172,6 @@ class WallabagRestController extends Controller | |||
178 | */ | 172 | */ |
179 | public function deleteEntriesTagsAction(Entries $entry, Tags $tag) | 173 | public function deleteEntriesTagsAction(Entries $entry, Tags $tag) |
180 | { | 174 | { |
181 | |||
182 | } | 175 | } |
183 | 176 | ||
184 | /** | 177 | /** |
@@ -187,8 +180,8 @@ class WallabagRestController extends Controller | |||
187 | * @ApiDoc( | 180 | * @ApiDoc( |
188 | * ) | 181 | * ) |
189 | */ | 182 | */ |
190 | public function getTagsAction() { | 183 | public function getTagsAction() |
191 | 184 | { | |
192 | } | 185 | } |
193 | 186 | ||
194 | /** | 187 | /** |
@@ -200,8 +193,8 @@ class WallabagRestController extends Controller | |||
200 | * } | 193 | * } |
201 | * ) | 194 | * ) |
202 | */ | 195 | */ |
203 | public function getTagAction(Tags $tag) { | 196 | public function getTagAction(Tags $tag) |
204 | 197 | { | |
205 | } | 198 | } |
206 | 199 | ||
207 | /** | 200 | /** |
@@ -215,6 +208,5 @@ class WallabagRestController extends Controller | |||
215 | */ | 208 | */ |
216 | public function deleteTagAction(Tags $tag) | 209 | public function deleteTagAction(Tags $tag) |
217 | { | 210 | { |
218 | |||
219 | } | 211 | } |
220 | } \ No newline at end of file | 212 | } |