function jsonSerialize()
    {
        $array = [
            'arguments' => $this->arguments,
            'children' => array()
        ];

        foreach ($this->children as $child) {
            if (!$child instanceof WhiteLine & !$child instanceof Comment) {
                $array['children'][$child->getName()] = $child->jsonSerialize();
            }
        }

        return $array;
    }
function jsonSerialize()
    {
        $array = [
            'arguments' => $this->arguments,
            'children' => array()
        ];

        foreach ($this->children as $child) {
            if (!$child instanceof WhiteLine & !$child instanceof Comment) {
                $array['children'][$child->getName()] = $child->jsonSerialize();
            }
        }

        return $array;
    }
function jsonSerialize ( ) { $ array = [ 'arguments' => $ this -> arguments , 'children' => array ( ) ] ; foreach ( $ this -> children as $ child ) { if ( ! $ child instanceof WhiteLine & ! $ child instanceof Comment ) { $ array [ 'children' ] [ $ child -> getName ( ) ] = $ child -> jsonSerialize ( ) ; } } return $ array ; }
Return an array ready for serialization. Ignores comments and whitelines

@link http://php.net/manual/en/jsonserializable.jsonserialize.php
@return mixed data which can be serialized by <b>json_encode</b>,
which is a argument of any type other than a resource.
Return an array ready for serialization . Ignores comments and whitelines