public function writeArguments(PhpArgumentCollection $arguments)
    {
        try {
            $argsCount = count($arguments);

            for ($i = 0; $i < $argsCount; $i++) {

                $this->writeArgument($arguments[$i]);

                if ($i < $argsCount - 1) {
                    $this->writeComma();
                }
            }
        } catch (Exception $e) {
            $msg = "An error occured while writing a sequence of arguments.";
            throw new StreamAccessException($msg, $this, 0, $e);
        }
    }