for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dallgoot\Yaml;
/**
*
* @author Stéphane Rebai <[email protected]>
* @license Apache 2.0
* @link TODO : url to specific online doc
*/
class NodeActions extends Node
{
public function __construct(string $nodeString, int $line)
parent::__construct($nodeString, $line);
$trimmed = ltrim($nodeString);
$pos = strpos($trimmed, ' ');
$name = $trimmed;
if (is_int($pos)) {
is_int($pos)
true
$name = strstr($trimmed, ' ', true);
$value = trim(substr($trimmed, $pos + 1));
if ($value !== '') {
$child = NodeFactory::get($value, $line);
$child->indent = null;
$this->add($child);
}
if ($this instanceof NodeTag) {
$this->tag = $name;
return;
$this->anchor = $name;
public function build(&$parent = null)
// Nothing to do here : on purpose