Update file a/c/m times

@param  Node $node
@return Node
776383
public function updateFileTimes(Node $node)
    {
        $time = time();
        $node->setAccessTime($time);
        $node->setModificationTime($time);
        $node->setChangeTime($time);

        return $node;
    }
1185858
public function addNode($node) {
		$src=false;
		// find src
		if (array_key_exists('src',$node))
			$src = $node['src'];
		elseif (array_key_exists('href',$node))
			$src = $node['href'];
		if ($src) {
			// find type
			if (!isset($node['type'])) {
				if (preg_match('/.*\.(css|js)(?=[?#].*|$)/i',$src,$match))
					$node['type'] = $match[1];
				elseif (array_key_exists('src',$node))
					$node['type'] = 'js';
				elseif (array_key_exists('href',$node))
					$node['type'] = 'css';
				elseif(empty($type))
					// unknown file type
					return "";
			}
			$type = $node['type'];
			// default slot is based on the type
			if (!isset($node['group']))
				$node['group'] = ($node['type'] == 'js')
					? 'footer' : 'head';
			if (!isset($node['priority']))
				$node['priority'] = 5;
			if (!isset($node['slot']))
				$node['slot'] = null;
			$group = $node['group'];
			$prio = $node['priority'];
			$slot = $node['slot'];
			unset($node['priority'],$node['src'],$node['href'],
				$node['group'],$node['type'],$node['slot']);
			$this->add($src,$type,$group,$prio,$slot,$node);
		}
	}
659372
public function addChild(Node $node)
    {
        if($node instanceof NodeWrapper)
        {
            if($node == $this)
            {
                throw new \InvalidArgumentException('Cannot insert node as a child of itself');
            }

            $node->insertAsLastChildOf($this);
            return $node;
        }

        $node->setLeftValue($this->getRightValue());
        $node->setRightValue($this->getRightValue() + 1);
        if($this->hasManyRoots())
        {
            $node->setRootValue($this->getRootValue());
        }

        $em = $this->getManager()->getEntityManager();

        // beginTransaction
        $em->getConnection()->beginTransaction();
        try
        {
            $this->shiftRLRange($this->getRightValue(), 0, 2, ($this->hasManyRoots() ? $this->getRootValue() : null));

            $em->persist($node);

            $em->flush();
            $em->getConnection()->commit();
        }
        catch (\Exception $e)
        {
            // @codeCoverageIgnoreStart
            $em->close();
            $em->getConnection()->rollback();
            throw $e;
            // @codeCoverageIgnoreEnd
        }
        // endTransaction

        return $this->getManager()->wrapNode($node);
    }
391191
public function mutate(Node $node)
    {
        return new Node\Expr\AssignOp\Div($node->var, $node->expr, $node->getAttributes());
    }
1024431
protected function handleBlocks(Node $node)
    {

        $this->blocks = $node->findArray('block');
        foreach ($this->blocks as $blockNode)
            $this->handleBlock($blockNode);

        return $this;
    }
624637
public function enterNode(Node $node)
    {
        if ($node instanceof Namespace_) {
            $this->resetContext($node->name);
        }

        $this->recordDoc($node->getAttribute('comments', []));

        return $node;
    }
832093
protected function reloadDocument($node = null)
    {
        $reloadDocument = new ReloadDocument();
        if ($node) {
            $reloadDocument->setNode($node);
        }

        $this->feedbackCollection->add($reloadDocument);
    }
1159030
public function mutate(Node $node)
    {
        $node->value = new Node\Expr\BinaryOp\Greater($node->key, $node->value, $node->getAttributes());
        $node->key = null;

        return $node;
    }
1322576
public function changeIcon(ResourceNode $node, File $file)
    {
        $this->om->startFlushSuite();
        $icon = $this->iconManager->createCustomIcon($file, $node->getWorkspace());
        $this->iconManager->replace($node, $icon);
        $this->logChangeSet($node);
        $this->om->endFlushSuite();

        return $icon;
    }
1158208
final public function setNode(Node $node)
    {
        $this->node = $node;
        foreach ($node->getParams() as $key => $value) {
            $this->$key = $value;
        }
    }
618171
public function refactor(Node $node): ?Node
    {
        if (! $this->isName($node, 'parse')) {
            return null;
        }

        if (! $this->isType($node->class, 'Symfony\Component\Yaml\Yaml')) {
            return null;
        }

        if (! $this->isArgumentYamlFile($node)) {
            return null;
        }

        $fileGetContentsFunCallNode = $this->createFunction('file_get_contents', [$node->args[0]]);
        $node->args[0] = new Arg($fileGetContentsFunCallNode);

        return $node;
    }
1094713
public function mutate(Node $node)
    {
        $currentFunctionName = $this->getNormalizedFunctionName($node->name);

        $mutateToFunctions = array_diff(self::MUTATORS_MAP, [$currentFunctionName]);

        foreach ($mutateToFunctions as $functionName) {
            yield new Node\Expr\FuncCall(
                new Node\Name($functionName),
                [$node->args[0]],
                $node->getAttributes()
            );
        }
    }
995286
public function mutate(Node $node)
    {
        if ($node->value === 0.0) {
            return new Node\Scalar\DNumber(1.0);
        }

        return new Node\Scalar\DNumber(0.0);
    }
145567
public function leaveNode(Node $node)
    {
        if ($node instanceof Expr\ClassConstFetch
            && $node->name === 'class'
        ) {
            $class = $node->class;
            if (strcmp($class->toString(), 'static') === 0
                || strcmp($class->toString(), 'self') === 0
            ) {
                $name = Name::concat($this->namespaceNode, $this->classNode->name);
                return new Scalar\String_(trim($name->toString(), '\\'));
                // return new Expr\FuncCall(new Name('get_class'));
            }
            if ($class->isFullyQualified()) {
                return new Scalar\String_(trim($class->toString(), '\\'));
            }
            $prefix = $this->namespaceNode;
            foreach ($this->importNodes as $import) {
                if (strcmp($class->getFirst(), $import->getLast()) === 0) {
                    $prefix = $import->toString();
                    array_shift($class->parts);
                    break;
                }
            }
            $name = Name::concat($prefix, $class);
            return new Scalar\String_(trim($name->toString(), '\\'));
        }
    }
929845
public static function fromNode(Node $node): self
    {
        return new self($node::schema()->getQName(), (string)$node->get('_id'));
    }
124245
public function mutate(Node $node)
    {
        return new Node\Expr\AssignOp\Mul($node->var, $node->expr, $node->getAttributes());
    }
1121022
public function &detach(Node $node)
    {
        foreach ($this->links as $linked_node) {
            if ($linked_node == $node) {
                $this->links->detach($node);
            }
        }

        return $this;
    }