pug-php/js-phpize

View on GitHub
src/JsPhpize/Nodes/DynamicValue.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace JsPhpize\Nodes;

/**
 * Class DynamicValue.
 *
 * @property-read array $children List of sub-variables (properties of object/values of array)
 */
abstract class DynamicValue extends Value
{
    /**
     * @var array
     */
    protected $children;

    protected function mergeVariables(array $variables, array $nodes)
    {
        foreach ($nodes as $node) {
            $variables = array_merge($variables, $node->getReadVariables());
        }

        return $variables;
    }
}