Commit 340daaf7 authored by catch's avatar catch

Issue #2649892 by alexpott, mikey_p: Should typehint against...

Issue #2649892 by alexpott, mikey_p: Should typehint against DateFormatterInterface and not DateFormatter
parent 6722061d
......@@ -15,7 +15,7 @@
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Render\MarkupInterface;
use Drupal\Core\Datetime\DateFormatter;
use Drupal\Core\Datetime\DateFormatterInterface;
use Drupal\Core\Render\RenderableInterface;
use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Routing\UrlGeneratorInterface;
......@@ -55,7 +55,7 @@ class TwigExtension extends \Twig_Extension {
/**
* The date formatter.
*
* @var \Drupal\Core\Datetime\DateFormatter
* @var \Drupal\Core\Datetime\DateFormatterInterface
*/
protected $dateFormatter;
......@@ -118,7 +118,7 @@ public function setThemeManager(ThemeManagerInterface $theme_manager) {
*
* @return $this
*/
public function setDateFormatter(DateFormatter $date_formatter) {
public function setDateFormatter(DateFormatterInterface $date_formatter) {
$this->dateFormatter = $date_formatter;
return $this;
}
......
......@@ -7,7 +7,7 @@
namespace Drupal\node\Form;
use Drupal\Core\Datetime\DateFormatter;
use Drupal\Core\Datetime\DateFormatterInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\ConfirmFormBase;
use Drupal\Core\Form\FormStateInterface;
......@@ -37,7 +37,7 @@ class NodeRevisionRevertForm extends ConfirmFormBase {
/**
* The date formatter service.
*
* @var \Drupal\Core\Datetime\DateFormatter
* @var \Drupal\Core\Datetime\DateFormatterInterface
*/
protected $dateFormatter;
......@@ -46,10 +46,10 @@ class NodeRevisionRevertForm extends ConfirmFormBase {
*
* @param \Drupal\Core\Entity\EntityStorageInterface $node_storage
* The node storage.
* @param \Drupal\Core\Datetime\DateFormatter $date_formatter
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter service.
*/
public function __construct(EntityStorageInterface $node_storage, DateFormatter $date_formatter) {
public function __construct(EntityStorageInterface $node_storage, DateFormatterInterface $date_formatter) {
$this->nodeStorage = $node_storage;
$this->dateFormatter = $date_formatter;
}
......
......@@ -7,7 +7,7 @@
namespace Drupal\node\Form;
use Drupal\Core\Datetime\DateFormatter;
use Drupal\Core\Datetime\DateFormatterInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageManagerInterface;
......@@ -38,12 +38,12 @@ class NodeRevisionRevertTranslationForm extends NodeRevisionRevertForm {
*
* @param \Drupal\Core\Entity\EntityStorageInterface $node_storage
* The node storage.
* @param \Drupal\Core\Datetime\DateFormatter $date_formatter
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter service.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/
public function __construct(EntityStorageInterface $node_storage, DateFormatter $date_formatter, LanguageManagerInterface $language_manager) {
public function __construct(EntityStorageInterface $node_storage, DateFormatterInterface $date_formatter, LanguageManagerInterface $language_manager) {
parent::__construct($node_storage, $date_formatter);
$this->languageManager = $language_manager;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment