public function setBodyFromAst(array $nodes) { // This slightly confusing code simply type-checks the $sourceLocators // array by unpacking them and splatting them in the closure. $validator = function (Node ...$node) { return $node; }; $this->node->stmts = $validator(...$nodes); }