Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jul 24, 2019
2 parents 9d0b0f5 + 9ae8a0b commit 53b10c4
Show file tree
Hide file tree
Showing 26 changed files with 24 additions and 116 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $rules = [
],
'no_extra_blank_lines' => true,
'no_php4_constructor' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
Expand Down
3 changes: 0 additions & 3 deletions src/Action/AbstractPostArchiveAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ final public function renderArchive(Request $request, array $criteria = [], arra
return $response;
}

/**
* @param SeoPageInterface|null $seoPage
*/
public function setSeoPage(SeoPageInterface $seoPage = null): void
{
$this->seoPage = $seoPage;
Expand Down
3 changes: 1 addition & 2 deletions src/Action/CreateCommentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ public function __construct(
}

/**
* @param string $id
* @param Request $request
* @param string $id
*
* @throws NotFoundHttpException
*
Expand Down
3 changes: 0 additions & 3 deletions src/Action/ViewPostAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ public function __invoke($permalink)
]);
}

/**
* @param SeoPageInterface|null $seoPage
*/
public function setSeoPage(SeoPageInterface $seoPage = null): void
{
$this->seoPage = $seoPage;
Expand Down
3 changes: 0 additions & 3 deletions src/Admin/CommentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ public function postUpdate($object): void
$this->updateCountsComment();
}

/**
* @param ManagerInterface $commentManager
*/
public function setCommentManager(ManagerInterface $commentManager): void
{
if (!$commentManager instanceof CommentManagerInterface) {
Expand Down
6 changes: 0 additions & 6 deletions src/Admin/PostAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ public function setUserManager($userManager): void
$this->userManager = $userManager;
}

/**
* @param FormatterPool $formatterPool
*/
public function setPoolFormatter(FormatterPool $formatterPool): void
{
$this->formatterPool = $formatterPool;
Expand All @@ -82,9 +79,6 @@ public function preUpdate($post): void
$post->setContent($this->formatterPool->transform($post->getContentFormatter(), $post->getRawContent()));
}

/**
* @param PermalinkInterface $permalinkGenerator
*/
public function setPermalinkGenerator(PermalinkInterface $permalinkGenerator): void
{
$this->permalinkGenerator = $permalinkGenerator;
Expand Down
8 changes: 2 additions & 6 deletions src/Block/Breadcrumb/NewsPostBreadcrumbBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@ class NewsPostBreadcrumbBlockService extends BaseNewsBreadcrumbBlockService
protected $blog;

/**
* @param string $context
* @param string $name
* @param EngineInterface $templating
* @param MenuProviderInterface $menuProvider
* @param FactoryInterface $factory
* @param BlogInterface $blog
* @param string $context
* @param string $name
*/
public function __construct($context, $name, EngineInterface $templating, MenuProviderInterface $menuProvider, FactoryInterface $factory, BlogInterface $blog)
{
Expand Down
6 changes: 2 additions & 4 deletions src/Block/RecentCommentsBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ class RecentCommentsBlockService extends AbstractAdminBlockService
protected $adminPool;

/**
* @param string $name
* @param EngineInterface $templating
* @param ManagerInterface $commentManager
* @param Pool $adminPool
* @param string $name
* @param Pool $adminPool
*/
public function __construct($name, EngineInterface $templating, ManagerInterface $commentManager, Pool $adminPool = null)
{
Expand Down
6 changes: 2 additions & 4 deletions src/Block/RecentPostsBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ class RecentPostsBlockService extends AbstractAdminBlockService
private $adminPool;

/**
* @param string $name
* @param EngineInterface $templating
* @param ManagerInterface $postManager
* @param Pool $adminPool
* @param string $name
* @param Pool $adminPool
*/
public function __construct($name, EngineInterface $templating, ManagerInterface $postManager, Pool $adminPool = null)
{
Expand Down
16 changes: 2 additions & 14 deletions src/Controller/Api/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ class PostController
*/
protected $formatterPool;

/**
* @param PostManagerInterface $postManager
* @param CommentManagerInterface $commentManager
* @param MailerInterface $mailer
* @param FormFactoryInterface $formFactory
* @param FormatterPool $formatterPool
*/
public function __construct(PostManagerInterface $postManager, CommentManagerInterface $commentManager, MailerInterface $mailer, FormFactoryInterface $formFactory, FormatterPool $formatterPool)
{
$this->postManager = $postManager;
Expand Down Expand Up @@ -98,8 +91,6 @@ public function __construct(PostManagerInterface $postManager, CommentManagerInt
*
* @REST\Route(requirements={"_format"="json|xml"})
*
* @param ParamFetcherInterface $paramFetcher
*
* @return PagerInterface
*/
public function getPostsAction(ParamFetcherInterface $paramFetcher)
Expand Down Expand Up @@ -250,8 +241,7 @@ public function deletePostAction($id)
*
* @REST\View(serializerGroups={"sonata_api_read"}, serializerEnableMaxDepthChecks=true)
*
* @param int $id A post identifier
* @param ParamFetcherInterface $paramFetcher
* @param int $id A post identifier
*
* @return PagerInterface
*/
Expand Down Expand Up @@ -292,8 +282,7 @@ public function getPostCommentsAction($id, ParamFetcherInterface $paramFetcher)
*
* @REST\Route(requirements={"_format"="json|xml"})
*
* @param int $id A post identifier
* @param Request $request
* @param int $id A post identifier
*
* @throws HttpException
*
Expand Down Expand Up @@ -395,7 +384,6 @@ public function putPostCommentsAction($postId, $commentId, Request $request)
/**
* Filters criteria from $paramFetcher to be compatible with the Pager criteria.
*
* @param ParamFetcherInterface $paramFetcher
*
* @return array The filtered criteria
*/
Expand Down
7 changes: 1 addition & 6 deletions src/Controller/CommentAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
class CommentAdminController extends CRUDController
{
/**
* @param ProxyQueryInterface $query
*
* @return RedirectResponse
*/
public function batchActionEnabled(ProxyQueryInterface $query)
Expand All @@ -31,8 +29,6 @@ public function batchActionEnabled(ProxyQueryInterface $query)
}

/**
* @param ProxyQueryInterface $query
*
* @return RedirectResponse
*/
public function batchActionDisabled(ProxyQueryInterface $query)
Expand All @@ -41,8 +37,7 @@ public function batchActionDisabled(ProxyQueryInterface $query)
}

/**
* @param ProxyQueryInterface $query
* @param $status
* @param $status
*
* @throws AccessDeniedException
*
Expand Down
4 changes: 0 additions & 4 deletions src/Controller/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ public function homeAction()
}

/**
* @param array $criteria
* @param array $parameters
* @param Request $request
*
* @return Response
Expand Down Expand Up @@ -190,8 +188,6 @@ public function addCommentFormAction($postId, $form = false)
}

/**
* @param PostInterface $post
*
* @return FormInterface
*/
public function getCommentForm(PostInterface $post)
Expand Down
12 changes: 2 additions & 10 deletions src/DependencyInjection/SonataNewsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
class SonataNewsExtension extends Extension
{
/**
* @param array $configs
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
*
* @throws \InvalidArgumentException
*/
public function load(array $configs, ContainerBuilder $container): void
Expand Down Expand Up @@ -103,8 +100,7 @@ public function load(array $configs, ContainerBuilder $container): void
}

/**
* @param array $config
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* @param array $config
*/
public function configureClass($config, ContainerBuilder $container): void
{
Expand All @@ -118,8 +114,7 @@ public function configureClass($config, ContainerBuilder $container): void
}

/**
* @param array $config
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* @param array $config
*/
public function configureAdmin($config, ContainerBuilder $container): void
{
Expand All @@ -132,9 +127,6 @@ public function configureAdmin($config, ContainerBuilder $container): void
$container->setParameter('sonata.news.admin.comment.translation_domain', $config['admin']['comment']['translation']);
}

/**
* @param array $config
*/
public function registerDoctrineMapping(array $config): void
{
$collector = DoctrineCollector::getInstance();
Expand Down
6 changes: 2 additions & 4 deletions src/Document/CommentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
class CommentManager extends BaseDocumentManager implements CommentManagerInterface
{
/**
* @param array $criteria
* @param int $page
* @param int $limit
* @param array $sort
* @param int $page
* @param int $limit
*
* @return Pager
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Document/PostManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
class PostManager extends BaseDocumentManager implements PostManagerInterface
{
/**
* @param string $permalink
* @param BlogInterface $blog
* @param string $permalink
*
* @return PostInterface|null
*/
Expand Down
6 changes: 2 additions & 4 deletions src/Entity/CommentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ class CommentManager extends BaseEntityManager implements CommentManagerInterfac
protected $postManager;

/**
* @param string $class
* @param ManagerRegistry $registry
* @param ManagerInterface $postManager
* @param string $class
*/
public function __construct($class, ManagerRegistry $registry, ManagerInterface $postManager)
{
Expand All @@ -52,7 +50,7 @@ public function save($comment, $andFlush = true): void
}

/**
* {@inheritdoc}
* Update the number of comment for a comment.
*/
public function updateCommentsCount(PostInterface $post = null): void
{
Expand Down
3 changes: 1 addition & 2 deletions src/Entity/PostManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
class PostManager extends BaseEntityManager implements PostManagerInterface
{
/**
* @param string $permalink
* @param BlogInterface $blog
* @param string $permalink
*
* @return PostInterface|null
*/
Expand Down
7 changes: 1 addition & 6 deletions src/Mailer/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ class Mailer implements MailerInterface
protected $blog;

/**
* @param \Swift_Mailer $mailer
* @param BlogInterface $blog
* @param HashGeneratorInterface $generator
* @param RouterInterface $router
* @param EngineInterface $templating
* @param array $emails
* @param \Swift_Mailer $mailer
*/
public function __construct($mailer, BlogInterface $blog, HashGeneratorInterface $generator, RouterInterface $router, EngineInterface $templating, array $emails)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Mailer/MailerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
interface MailerInterface
{
/**
* @param CommentInterface $comment
*
* @return mixed
*/
public function sendCommentNotification(CommentInterface $comment);
Expand Down
7 changes: 3 additions & 4 deletions src/Model/Blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ class Blog implements BlogInterface
protected $permalinkGenerator;

/**
* @param string $title
* @param string $link
* @param string $description
* @param PermalinkInterface $permalinkGenerator
* @param string $title
* @param string $link
* @param string $description
*/
public function __construct($title, $link, $description, PermalinkInterface $permalinkGenerator)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Model/CommentManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ interface CommentManagerInterface extends ManagerInterface, PageableManagerInter
{
/**
* Update the number of comment for a comment.
*
* @param PostInterface|null $post
*/
public function updateCommentsCount(PostInterface $post = null);
}
11 changes: 0 additions & 11 deletions src/Model/PostInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public function getSlug();

/**
* Set publication_date_start.
*
* @param \DateTime|null $publicationDateStart
*/
public function setPublicationDateStart(\DateTime $publicationDateStart = null);

Expand Down Expand Up @@ -140,8 +138,6 @@ public function getUpdatedAt();

/**
* Add comments.
*
* @param CommentInterface $comments
*/
public function addComments(CommentInterface $comments);

Expand All @@ -159,8 +155,6 @@ public function getComments();

/**
* Add tags.
*
* @param TagInterface $tags
*/
public function addTags(TagInterface $tags);

Expand Down Expand Up @@ -207,8 +201,6 @@ public function getCommentsEnabled();

/**
* Set comments_close_at.
*
* @param \DateTime|null $commentsCloseAt
*/
public function setCommentsCloseAt(\DateTime $commentsCloseAt = null);

Expand Down Expand Up @@ -282,9 +274,6 @@ public function getImage();
*/
public function getCollection();

/**
* @param CollectionInterface|null $collection
*/
public function setCollection(CollectionInterface $collection = null);

/**
Expand Down
Loading

0 comments on commit 53b10c4

Please sign in to comment.