@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * |
160 | 160 | * @param Request $request A Symfony request |
161 | 161 | * |
162 | - * @return Post |
|
162 | + * @return FormInterface |
|
163 | 163 | * |
164 | 164 | * @throws NotFoundHttpException |
165 | 165 | */ |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * @param int $id A Post identifier |
190 | 190 | * @param Request $request A Symfony request |
191 | 191 | * |
192 | - * @return Post |
|
192 | + * @return FormInterface |
|
193 | 193 | * |
194 | 194 | * @throws NotFoundHttpException |
195 | 195 | */ |
@@ -15,19 +15,15 @@ |
||
15 | 15 | use FOS\RestBundle\Controller\Annotations\View; |
16 | 16 | use FOS\RestBundle\Controller\Annotations\Route; |
17 | 17 | use FOS\RestBundle\Request\ParamFetcherInterface; |
18 | - |
|
19 | 18 | use JMS\Serializer\SerializationContext; |
20 | 19 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
21 | - |
|
22 | 20 | use Application\Sonata\NewsBundle\Entity\Post; |
23 | - |
|
24 | 21 | use Sonata\DatagridBundle\Pager\PagerInterface; |
25 | 22 | use Sonata\FormatterBundle\Formatter\Pool as FormatterPool; |
26 | 23 | use Sonata\NewsBundle\Mailer\MailerInterface; |
27 | 24 | use Sonata\NewsBundle\Model\Comment; |
28 | 25 | use Sonata\NewsBundle\Model\CommentManagerInterface; |
29 | 26 | use Sonata\NewsBundle\Model\PostManagerInterface; |
30 | - |
|
31 | 27 | use Symfony\Component\Form\FormFactoryInterface; |
32 | 28 | use Symfony\Component\Form\FormInterface; |
33 | 29 | use Symfony\Component\HttpFoundation\Request; |
@@ -78,6 +78,8 @@ |
||
78 | 78 | |
79 | 79 | /** |
80 | 80 | * {@inheritdoc} |
81 | + * @param string $date |
|
82 | + * @param string $step |
|
81 | 83 | */ |
82 | 84 | public function getPublicationDateQueryParts($date, $step, $alias = 'p') |
83 | 85 | { |
@@ -10,12 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | namespace Sonata\NewsBundle\Document; |
12 | 12 | |
13 | -use Doctrine\DBAL\Connection; |
|
14 | 13 | use Sonata\CoreBundle\Model\BaseDocumentManager; |
15 | 14 | use Sonata\DoctrineMongoDBAdminBundle\Datagrid\Pager; |
16 | 15 | use Sonata\DoctrineMongoDBAdminBundle\Datagrid\ProxyQuery; |
17 | - |
|
18 | -use Doctrine\ODM\MongoDB\DocumentManager; |
|
19 | 16 | use Sonata\NewsBundle\Model\PostManagerInterface; |
20 | 17 | |
21 | 18 | class PostManager extends BaseDocumentManager implements PostManagerInterface |
@@ -17,15 +17,11 @@ |
||
17 | 17 | use Sonata\AdminBundle\Datagrid\DatagridMapper; |
18 | 18 | use Sonata\AdminBundle\Datagrid\ListMapper; |
19 | 19 | use Sonata\AdminBundle\Show\ShowMapper; |
20 | -use Sonata\FormatterBundle\Formatter\Pool as FormatterPool; |
|
21 | -use Sonata\CoreBundle\Model\ManagerInterface; |
|
22 | - |
|
23 | -use Knp\Menu\ItemInterface as MenuItemInterface; |
|
24 | 20 | use Sonata\FormatterBundle\Formatter\Pool; |
21 | +use Knp\Menu\ItemInterface as MenuItemInterface; |
|
25 | 22 | use Sonata\NewsBundle\Model\CommentInterface; |
26 | 23 | use Sonata\NewsBundle\Permalink\PermalinkInterface; |
27 | 24 | use Sonata\UserBundle\Model\UserManagerInterface; |
28 | -use Symfony\Component\Routing\RouterInterface; |
|
29 | 25 | |
30 | 26 | class PostAdmin extends Admin |
31 | 27 | { |
@@ -15,10 +15,8 @@ |
||
15 | 15 | use Sonata\CoreBundle\Model\ManagerInterface; |
16 | 16 | use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; |
17 | 17 | use Symfony\Component\HttpFoundation\Response; |
18 | - |
|
19 | 18 | use Sonata\AdminBundle\Form\FormMapper; |
20 | 19 | use Sonata\AdminBundle\Validator\ErrorElement; |
21 | - |
|
22 | 20 | use Sonata\BlockBundle\Model\BlockInterface; |
23 | 21 | use Sonata\BlockBundle\Block\BaseBlockService; |
24 | 22 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
@@ -15,10 +15,8 @@ |
||
15 | 15 | use Sonata\CoreBundle\Model\ManagerInterface; |
16 | 16 | use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; |
17 | 17 | use Symfony\Component\HttpFoundation\Response; |
18 | - |
|
19 | 18 | use Sonata\AdminBundle\Form\FormMapper; |
20 | 19 | use Sonata\AdminBundle\Validator\ErrorElement; |
21 | - |
|
22 | 20 | use Sonata\BlockBundle\Model\BlockInterface; |
23 | 21 | use Sonata\BlockBundle\Block\BaseBlockService; |
24 | 22 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
@@ -13,16 +13,9 @@ |
||
13 | 13 | |
14 | 14 | use FOS\RestBundle\Controller\Annotations\View; |
15 | 15 | use FOS\RestBundle\Controller\Annotations\Route; |
16 | - |
|
17 | -use JMS\Serializer\SerializationContext; |
|
18 | - |
|
19 | 16 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
20 | - |
|
21 | 17 | use Sonata\NewsBundle\Model\Comment; |
22 | 18 | use Sonata\NewsBundle\Model\CommentManagerInterface; |
23 | - |
|
24 | -use Symfony\Component\Form\FormFactoryInterface; |
|
25 | -use Symfony\Component\HttpFoundation\Request; |
|
26 | 19 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
27 | 20 | |
28 | 21 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | - * @return Response |
|
65 | + * @return \Symfony\Component\HttpFoundation\Response |
|
66 | 66 | */ |
67 | 67 | public function archiveAction() |
68 | 68 | { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @param string $year |
124 | 124 | * @param string $month |
125 | 125 | * |
126 | - * @return Response |
|
126 | + * @return \Symfony\Component\HttpFoundation\Response |
|
127 | 127 | */ |
128 | 128 | public function archiveMonthlyAction($year, $month) |
129 | 129 | { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | /** |
136 | 136 | * @param string $year |
137 | 137 | * |
138 | - * @return Response |
|
138 | + * @return \Symfony\Component\HttpFoundation\Response |
|
139 | 139 | */ |
140 | 140 | public function archiveYearlyAction($year) |
141 | 141 | { |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * |
150 | 150 | * @param $permalink |
151 | 151 | * |
152 | - * @return Response |
|
152 | + * @return \Symfony\Component\HttpFoundation\Response |
|
153 | 153 | */ |
154 | 154 | public function viewAction($permalink) |
155 | 155 | { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | /** |
195 | 195 | * @param integer $postId |
196 | 196 | * |
197 | - * @return Response |
|
197 | + * @return \Symfony\Component\HttpFoundation\Response |
|
198 | 198 | */ |
199 | 199 | public function commentsAction($postId) |
200 | 200 | { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | * @param $postId |
214 | 214 | * @param bool $form |
215 | 215 | * |
216 | - * @return Response |
|
216 | + * @return \Symfony\Component\HttpFoundation\Response |
|
217 | 217 | */ |
218 | 218 | public function addCommentFormAction($postId, $form = false) |
219 | 219 | { |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | * |
251 | 251 | * @param string $id |
252 | 252 | * |
253 | - * @return Response |
|
253 | + * @return \Symfony\Component\HttpFoundation\Response |
|
254 | 254 | */ |
255 | 255 | public function addCommentAction($id) |
256 | 256 | { |
@@ -11,10 +11,8 @@ |
||
11 | 11 | namespace Sonata\NewsBundle\Controller; |
12 | 12 | |
13 | 13 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
14 | - |
|
15 | 14 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
16 | 15 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
17 | - |
|
18 | 16 | use Symfony\Component\Form\Form; |
19 | 17 | use Symfony\Component\HttpFoundation\RedirectResponse; |
20 | 18 | use Sonata\NewsBundle\Model\CommentInterface; |
@@ -18,7 +18,6 @@ |
||
18 | 18 | use Symfony\Component\Config\Definition\Processor; |
19 | 19 | use Symfony\Component\DependencyInjection\Definition; |
20 | 20 | use Symfony\Component\DependencyInjection\Reference; |
21 | - |
|
22 | 21 | use Sonata\EasyExtendsBundle\Mapper\DoctrineCollector; |
23 | 22 | |
24 | 23 | /** |
@@ -11,10 +11,7 @@ |
||
11 | 11 | namespace Sonata\NewsBundle\Document; |
12 | 12 | |
13 | 13 | use Sonata\CoreBundle\Model\BaseDocumentManager; |
14 | -use Sonata\NewsBundle\Model\CommentManager as ModelCommentManager; |
|
15 | 14 | use Sonata\NewsBundle\Model\CommentInterface; |
16 | -use Doctrine\ODM\MongoDB\DocumentManager; |
|
17 | - |
|
18 | 15 | use Sonata\DoctrineMongoDBAdminBundle\Datagrid\Pager; |
19 | 16 | use Sonata\DoctrineMongoDBAdminBundle\Datagrid\ProxyQuery; |
20 | 17 | use Sonata\NewsBundle\Model\CommentManagerInterface; |