Skip to content

Commit

Permalink
Remove useless PhpDoc comments and minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto authored and javiereguiluz committed Sep 6, 2017
1 parent f4a58f5 commit e406974
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 57 deletions.
8 changes: 0 additions & 8 deletions src/EventSubscriber/CheckRequirementsSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@
*/
class CheckRequirementsSubscriber implements EventSubscriberInterface
{
/** @var EntityManagerInterface */
private $entityManager;

/**
* @param EntityManagerInterface $entityManager
*/
public function __construct(EntityManagerInterface $entityManager)
{
$this->entityManager = $entityManager;
Expand All @@ -60,8 +56,6 @@ public static function getSubscribedEvents()
* This method checks if there has been an error in a command related to
* the database and then, it checks if the 'sqlite3' PHP extension is enabled
* or not to display a better error message.
*
* @param ConsoleErrorEvent $event
*/
public function handleConsoleError(ConsoleErrorEvent $event)
{
Expand All @@ -78,8 +72,6 @@ public function handleConsoleError(ConsoleErrorEvent $event)
/**
* This method checks if the triggered exception is related to the database
* and then, it checks if the required 'sqlite3' PHP extension is enabled.
*
* @param GetResponseForExceptionEvent $event
*/
public function handleKernelException(GetResponseForExceptionEvent $event)
{
Expand Down
26 changes: 0 additions & 26 deletions src/EventSubscriber/CommentNotificationSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,11 @@
*/
class CommentNotificationSubscriber implements EventSubscriberInterface
{
/**
* @var \Swift_Mailer
*/
private $mailer;

/**
* @var TranslatorInterface
*/
private $translator;

/**
* @var UrlGeneratorInterface
*/
private $urlGenerator;

/**
* @var string
*/
private $sender;

/**
* Constructor.
*
* @param \Swift_Mailer $mailer
* @param UrlGeneratorInterface $urlGenerator
* @param TranslatorInterface $translator
* @param string $sender
*/
public function __construct(\Swift_Mailer $mailer, UrlGeneratorInterface $urlGenerator, TranslatorInterface $translator, $sender)
{
$this->mailer = $mailer;
Expand All @@ -68,9 +45,6 @@ public static function getSubscribedEvents()
];
}

/**
* @param GenericEvent $event
*/
public function onCommentCreated(GenericEvent $event)
{
/** @var Comment $comment */
Expand Down
3 changes: 0 additions & 3 deletions src/EventSubscriber/RedirectToPreferredLocaleSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ public static function getSubscribedEvents()
];
}

/**
* @param GetResponseEvent $event
*/
public function onKernelRequest(GetResponseEvent $event)
{
$request = $event->getRequest();
Expand Down
22 changes: 9 additions & 13 deletions src/Twig/AppExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,14 @@
*/
class AppExtension extends \Twig_Extension
{
/**
* @var Markdown
*/
private $parser;

/**
* @var array
*/
private $localeCodes;
private $locales;

public function __construct(Markdown $parser, $locales)
{
$this->parser = $parser;
$this->locales = $locales;
$this->localeCodes = explode('|', $locales);
}

/**
Expand Down Expand Up @@ -86,13 +80,15 @@ public function markdownToHtml($content)
*/
public function getLocales()
{
$localeCodes = explode('|', $this->locales);
if (null !== $this->locales) {
return $this->locales;
}

$locales = [];
foreach ($localeCodes as $localeCode) {
$locales[] = ['code' => $localeCode, 'name' => Intl::getLocaleBundle()->getLocaleName($localeCode, $localeCode)];
$this->locales = [];
foreach ($this->localeCodes as $localeCode) {
$this->locales[] = ['code' => $localeCode, 'name' => Intl::getLocaleBundle()->getLocaleName($localeCode, $localeCode)];
}

return $locales;
return $this->locales;
}
}
7 changes: 0 additions & 7 deletions src/Utils/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@
*/
class Markdown
{
/**
* @var \Parsedown
*/
private $parser;

/**
* @var \HTMLPurifier
*/
private $purifier;

public function __construct()
Expand Down

0 comments on commit e406974

Please sign in to comment.