diff --git a/src/Importer.php b/src/Importer.php index 40b43eb..5fe1f73 100644 --- a/src/Importer.php +++ b/src/Importer.php @@ -3,7 +3,6 @@ namespace Drupal\default_content; use Drupal\Component\Graph\Graph; -use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Config\Entity\ConfigEntityInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Session\AccountSwitcherInterface; diff --git a/src/Normalizer/TermEntityNormalizer.php b/src/Normalizer/TermEntityNormalizer.php index 0951a06..b3be84d 100644 --- a/src/Normalizer/TermEntityNormalizer.php +++ b/src/Normalizer/TermEntityNormalizer.php @@ -24,7 +24,7 @@ class TermEntityNormalizer extends ContentEntityNormalizer { /** * {@inheritdoc} */ - public function normalize($entity, $format = NULL, array $context = array()) { + public function normalize($entity, $format = NULL, array $context = []) { if ($parents = $this->getTermStorage()->loadParents($entity->id())) { $entity->parent->setValue(array_keys($parents)); } diff --git a/tests/src/Functional/DefaultContentTest.php b/tests/src/Functional/DefaultContentTest.php index a654104..68abb27 100644 --- a/tests/src/Functional/DefaultContentTest.php +++ b/tests/src/Functional/DefaultContentTest.php @@ -23,7 +23,7 @@ class DefaultContentTest extends BrowserTestBase { * * @var array */ - public static $modules = array('rest', 'taxonomy', 'hal', 'default_content'); + public static $modules = ['rest', 'taxonomy', 'hal', 'default_content']; /** * {@inheritdoc} @@ -38,7 +38,7 @@ class DefaultContentTest extends BrowserTestBase { 'mail' => 'user2@example.com', 'status' => TRUE, ])->save(); - $this->createContentType(array('type' => 'page')); + $this->createContentType(['type' => 'page']); } /** @@ -46,7 +46,7 @@ class DefaultContentTest extends BrowserTestBase { */ public function testImport() { // Enable the module and import the content. - \Drupal::service('module_installer')->install(array('default_content_test'), TRUE); + \Drupal::service('module_installer')->install(['default_content_test'], TRUE); $this->rebuildContainer(); $this->doPostInstallTests(); diff --git a/tests/src/Kernel/ExporterIntegrationTest.php b/tests/src/Kernel/ExporterIntegrationTest.php index ebcea32..688b7a1 100644 --- a/tests/src/Kernel/ExporterIntegrationTest.php +++ b/tests/src/Kernel/ExporterIntegrationTest.php @@ -199,7 +199,7 @@ class ExporterIntegrationTest extends KernelTestBase { $this->setExpectedException(\InvalidArgumentException::class); - // Should throw an exception for missing uuid in default_content_export_test + // Should throw an exception for missing uuid for the testing module. $this->defaultContentManager->exportModuleContent('default_content_export_test'); }