Fix PHPStan issues

This commit is contained in:
Oliver Davies 2020-09-04 20:49:23 +01:00
parent a08f93c188
commit 98fba9306f
6 changed files with 10 additions and 8 deletions

View file

@ -31,7 +31,7 @@ final class UpdateTalkNodeBeforeSave implements EventSubscriberInterface {
return;
}
/** @var \Drupal\opdavies_blog\Entity\Node\Talk $talk */
/** @var Talk $talk */
$talk = $event->getEntity();
$this->reorderEvents($talk);
$this->updateCreatedDate($talk);

View file

@ -19,8 +19,8 @@ final class Event extends Date {
public function __construct(
array $configuration,
$pluginId,
$pluginDefinition,
string $pluginId,
array $pluginDefinition,
TimeInterface $time
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
@ -42,7 +42,7 @@ final class Event extends Date {
);
}
public function query() {
public function query(): void {
$this->ensureMyTable();
$currentDate = Carbon::parse('today')->getTimestamp();

View file

@ -6,7 +6,7 @@ namespace Drupal\opdavies_talks\Repository;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\opdavies_blog\Entity\Node\Talk;
use Drupal\opdavies_talks\Entity\Node\Talk;
use Illuminate\Support\Collection;
final class TalkRepository {

View file

@ -30,7 +30,7 @@ final class TalkDateUpdater {
}
}
private function updateNextEventDate(Talk $talk) {
private function updateNextEventDate(Talk $talk): void {
if (!$nextDate = $this->findNextEventDate($talk)) {
return;
}