Skip to content
Snippets Groups Projects

Issue #3473697: Add .gitlab-ci.yml file from template

Merged Eric Smith requested to merge issue/chunker-3473697:3473697-add--.gitlab-ci.yml into 2.x
Files
2
@@ -3,8 +3,8 @@
namespace Drupal\chunker\Plugin\Field\FieldFormatter;
use Drupal\Component\Utility\Html;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Form\FormStateInterface;
/**
@@ -145,7 +145,7 @@ class ChunkerFormatter extends FormatterBase {
$dom = Html::load($text);
// Html load wraps text in <body>, so lets pull out the body element.
$bodies = $dom->getElementsByTagName('body');
/* @var $scope DOMElement */
/** @var \DOMElement $scope */
$scope = $bodies->item(0);
// To get it all sorted, recursively re-run the process for several depths.
@@ -158,7 +158,7 @@ class ChunkerFormatter extends FormatterBase {
}
/**
* Create div-based sections around document contents based on headings, e.g. h2s.
* Create sections around document contents based on headings, e.g. h2s.
*/
public function enwrap($scope, $start_level, array $settings) {
@@ -179,7 +179,7 @@ class ChunkerFormatter extends FormatterBase {
$current_section_content = $scope;
// Jiggling the domnodelist in realtime confuses PHP tragically.
// Enumerate the childnodes into a simpler array before moving them around;.
// Enumerate the child nodes into a simpler array before moving them around.
$child_nodes = [];
foreach ($scope->childNodes as $item) {
$child_nodes[] = $item;
@@ -238,7 +238,7 @@ class ChunkerFormatter extends FormatterBase {
if (!empty($settings['heading_class'])) {
$heading_class = implode(' ', [
$settings['heading_class'],
$item->getAttribute('class')
$item->getAttribute('class'),
]);
$item->setAttribute('class', $heading_class);
}
Loading