Google Api, syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'

Есть вот такой скрипт для генерации данных из гугл таблицы в xml для avito.

<?php
require_once "/var/www/rndsite/data/www/avito.rnd-site.ru/googleApi/vendor/autoload.php";


// Путь к файлу ключа сервисного аккаунта
$googleAccountKeyFilePath = '/var/www/rndsite/data/www/avito.rnd-site.ru/private/rewrite.json';
putenv( 'GOOGLE_APPLICATION_CREDENTIALS=' . $googleAccountKeyFilePath );


// Документация https://developers.google.com/sheets/api/
$client = new Google_Client();
$client->useApplicationDefaultCredentials();

// Области, к которым будет доступ
// https://developers.google.com/identity/protocols/googlescopes
$client->addScope( 'https://www.googleapis.com/auth/spreadsheets' );

$service = new Google_Service_Sheets( $client );

// ID таблицы
$spreadsheetId = 'table_id';


$range = "list_name";
$response = $service->spreadsheets_values->get($spreadsheetId, $range);
$values = $response->getValues();


$xbrl = '<Ads formatVersion="3" target="Avito.ru">';
for($i=1; $i<count($values); $i++){
   //формирование xml
}
$xbrl .= '</Ads>';


file_put_contents("avito-septik_los_ru.xml", str_replace('<br>','<br/>', $xbrl));

echo "XML софрмирован! ";
?>

Используется google api Скрипт вызывается на сервере через крон При вызове скрипта возникает такая ошибка :

PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/rndsite/data/www/avito.rnd-site.ru/googleApi/vendor/guzzlehttp/guzzle/src/Utils.php on line 86 

google api брала тут


Ответы (0 шт):