src/DataCollector/CacheDataCollector.php
private function cloneData($var)
    {
        if (method_exists($this, 'cloneVar')) {
            // Symfony 3.2 or higher
            return $this->cloneVar($var);
        }

        if (null === $this->cloner) {
            $this->cloner = new VarCloner();
            $this->cloner->setMaxItems(-1);
            $this->cloner->addCasters($this->getCloneCasters());
        }

        return $this->cloner->cloneVar($var);
    }
private function cloneData($var)
    {
        if (method_exists($this, 'cloneVar')) {
            // Symfony 3.2 or higher
            return $this->cloneVar($var);
        }

        if (null === $this->cloner) {
            $this->cloner = new VarCloner();
            $this->cloner->setMaxItems(-1);
            $this->cloner->addCasters($this->getCloneCasters());
        }

        return $this->cloner->cloneVar($var);
    }
private function cloneData ( $ var ) { if ( method_exists ( $ this , 'cloneVar' ) ) { // Symfony 3.2 or higher return $ this -> cloneVar ( $ var ) ; } if ( null === $ this -> cloner ) { $ this -> cloner = new VarCloner ( ) ; $ this -> cloner -> setMaxItems ( - 1 ) ; $ this -> cloner -> addCasters ( $ this -> getCloneCasters ( ) ) ; } return $ this -> cloner -> cloneVar ( $ var ) ; }
To be compatible with many versions of Symfony.

@param $var
To be compatible with many versions of Symfony .