Skip to content
Snippets Groups Projects

Issue #3465500: Use GitLab CI

Files
2
@@ -2,6 +2,9 @@
@@ -2,6 +2,9 @@
namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer;
namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer;
 
use Pharborist\NodeCollection;
 
use Pharborist\NodeInterface;
 
/**
/**
* Trait used by fixers which loop through existing indexer objects and do
* Trait used by fixers which loop through existing indexer objects and do
* things with them.
* things with them.
@@ -9,8 +12,11 @@ namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer;
@@ -9,8 +12,11 @@ namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer;
trait NodeCollectorTrait {
trait NodeCollectorTrait {
protected function getObjects() {
protected function getObjects() {
/** @var \Pharborist\NodeCollection $objects */
$objects = $this->target->getIndexer($this->configuration['type'])->get($this->configuration['id']);
$objects = $this->target->getIndexer($this->configuration['type'])->get($this->configuration['id']);
 
if ($objects instanceof NodeInterface) {
 
$objects = new NodeCollection([$objects]);
 
}
 
/** @var \Pharborist\NodeCollection $objects */
if (isset($this->configuration['where'])) {
if (isset($this->configuration['where'])) {
$where = $this->configuration['where'];
$where = $this->configuration['where'];
Loading