src: whitespace sweep over Google code

This commit is contained in:
Franco Fichtner 2015-03-24 14:22:15 +01:00
parent 9d8f39a165
commit 06bb0ec680
82 changed files with 114 additions and 116 deletions

View File

@ -68,7 +68,7 @@ class Google_Auth_AssertionCredentials
$this->prn = $sub;
$this->useCache = $useCache;
}
/**
* Generate a unique key to represent this credential.
* @return string

View File

@ -22,7 +22,7 @@
*/
abstract class Google_Cache_Abstract
{
abstract public function __construct(Google_Client $client);
/**

View File

@ -124,12 +124,12 @@ class Google_Client
$this->authenticated = true;
return $this->getAuth()->authenticate($code);
}
/**
* Loads a service account key and parameters from a JSON
* Loads a service account key and parameters from a JSON
* file from the Google Developer Console. Uses that and the
* given array of scopes to return an assertion credential for
* use with refreshTokenWithAssertionCredential.
* given array of scopes to return an assertion credential for
* use with refreshTokenWithAssertionCredential.
*
* @param string $jsonLocation File location of the project-key.json.
* @param array $scopes The scopes to assert.

View File

@ -380,8 +380,8 @@ class Google_Config
/**
* Set the hd (hosted domain) parameter streamlines the login process for
* Google Apps hosted accounts. By including the domain of the user, you
* restrict sign-in to accounts at that domain.
*
* restrict sign-in to accounts at that domain.
*
* This should not be used to ensure security on your application - check
* the hd values within an id token (@see Google_Auth_LoginTicket) after sign
* in to ensure that the user is from the domain you were expecting.

View File

@ -115,7 +115,7 @@ class Google_Http_REST
if ($response->getExpectedRaw()) {
return $body;
}
$decoded = json_decode($body, true);
if ($decoded === null || $decoded === "") {
$error = "Invalid json in service response: $body";

View File

@ -49,7 +49,7 @@ class Google_Http_Request
protected $responseHttpCode;
protected $responseHeaders;
protected $responseBody;
protected $expectedClass;
protected $expectedRaw = false;
@ -76,7 +76,7 @@ class Google_Http_Request
{
return $this->baseComponent;
}
/**
* Set the base URL that path and query parameters will be added to.
* @param $baseComponent string
@ -85,7 +85,7 @@ class Google_Http_Request
{
$this->baseComponent = $baseComponent;
}
/**
* Enable support for gzipped responses with this request.
*/
@ -95,7 +95,7 @@ class Google_Http_Request
$this->canGzip = true;
$this->setUserAgent($this->userAgent);
}
/**
* Disable support for gzip responses with this request.
*/
@ -110,7 +110,7 @@ class Google_Http_Request
$this->canGzip = false;
$this->userAgent = str_replace(self::GZIP_UA, "", $this->userAgent);
}
/**
* Can this request accept a gzip response?
* @return bool
@ -130,7 +130,7 @@ class Google_Http_Request
return $this->queryParams;
}
/**
/**
* Set a new query parameter.
* @param $key - string to set, does not need to be URL encoded
* @param $value - string to set, does not need to be URL encoded
@ -171,7 +171,7 @@ class Google_Http_Request
{
return $this->responseBody;
}
/**
* Set the class the response to this request should expect.
*
@ -181,7 +181,7 @@ class Google_Http_Request
{
$this->expectedClass = $class;
}
/**
* Retrieve the expected class the response should expect.
* @return string class name
@ -427,7 +427,7 @@ class Google_Http_Request
$str .= "\n";
$str .= $this->getPostBody();
}
$headers = '';
foreach ($this->batchHeaders as $key => $val) {
$headers .= $key . ': ' . $val . "\n";
@ -438,10 +438,10 @@ class Google_Http_Request
return $str;
}
/**
* Our own version of parse_str that allows for multiple variables
* with the same name.
* with the same name.
* @param $string - the query string to parse
*/
private function parseQuery($string)
@ -462,10 +462,10 @@ class Google_Http_Request
}
return $return;
}
/**
* A version of build query that allows for multiple
* duplicate keys.
* duplicate keys.
* @param $parts array of key value pairs
*/
private function buildQuery($parts)
@ -482,8 +482,8 @@ class Google_Http_Request
}
return implode('&', $return);
}
/**
/**
* If we're POSTing and have no body to send, we can send the query
* parameters in there, which avoids length issues with longer query
* params.

View File

@ -81,12 +81,12 @@ class Google_IO_Curl extends Google_IO_Abstract
if ($request->canGzip()) {
curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
}
$options = $this->client->getClassConfig('Google_IO_Curl', 'options');
if (is_array($options)) {
$this->setOptions($options);
}
foreach ($this->options as $key => $var) {
curl_setopt($curl, $key, $var);
}

View File

@ -25,7 +25,7 @@ class Google_Model implements ArrayAccess
{
/**
* If you need to specify a NULL JSON value, use Google_Model::NULL_VALUE
* instead - it will be replaced when converting to JSON with a real null.
* instead - it will be replaced when converting to JSON with a real null.
*/
const NULL_VALUE = "{}gapi-php-null";
protected $internal_gapi_mappings = array();
@ -175,7 +175,7 @@ class Google_Model implements ArrayAccess
}
return $value;
}
/**
* Check whether the value is the null placeholder and return true null.
*/

View File

@ -42,7 +42,7 @@ class Google_Service_AdExchangeBuyer extends Google_Service
public $directDeals;
public $performanceReport;
public $pretargetingConfig;
/**
* Constructs the internal representation of the AdExchangeBuyer service.

View File

@ -48,7 +48,7 @@ class Google_Service_AdExchangeSeller extends Google_Service
public $accounts_reports;
public $accounts_reports_saved;
public $accounts_urlchannels;
/**
* Constructs the internal representation of the AdExchangeSeller service.

View File

@ -63,7 +63,7 @@ class Google_Service_AdSense extends Google_Service
public $reports_saved;
public $savedadstyles;
public $urlchannels;
/**
* Constructs the internal representation of the AdSense service.

View File

@ -44,7 +44,7 @@ class Google_Service_AdSenseHost extends Google_Service
public $customchannels;
public $reports;
public $urlchannels;
/**
* Constructs the internal representation of the AdSenseHost service.

View File

@ -35,7 +35,7 @@ class Google_Service_Admin extends Google_Service
"https://www.googleapis.com/auth/email.migration";
public $mail;
/**
* Constructs the internal representation of the Admin service.

View File

@ -72,7 +72,7 @@ class Google_Service_Analytics extends Google_Service
public $management_webpropertyUserLinks;
public $metadata_columns;
public $provisioning;
/**
* Constructs the internal representation of the Analytics service.

View File

@ -46,7 +46,7 @@ class Google_Service_AndroidEnterprise extends Google_Service
public $permissions;
public $products;
public $users;
/**
* Constructs the internal representation of the AndroidEnterprise service.

View File

@ -46,7 +46,7 @@ class Google_Service_AndroidPublisher extends Google_Service
public $inappproducts;
public $purchases_products;
public $purchases_subscriptions;
/**
* Constructs the internal representation of the AndroidPublisher service.

View File

@ -35,7 +35,7 @@ class Google_Service_AppState extends Google_Service
"https://www.googleapis.com/auth/appstate";
public $states;
/**
* Constructs the internal representation of the AppState service.

View File

@ -44,7 +44,7 @@ class Google_Service_Appsactivity extends Google_Service
"https://www.googleapis.com/auth/drive.readonly";
public $activities;
/**
* Constructs the internal representation of the Appsactivity service.

View File

@ -34,7 +34,7 @@ class Google_Service_Audit extends Google_Service
public $activities;
/**
* Constructs the internal representation of the Audit service.

View File

@ -41,7 +41,7 @@ class Google_Service_Autoscaler extends Google_Service
public $autoscalers;
public $zoneOperations;
public $zones;
/**
* Constructs the internal representation of the Autoscaler service.

View File

@ -54,7 +54,7 @@ class Google_Service_Bigquery extends Google_Service
public $projects;
public $tabledata;
public $tables;
/**
* Constructs the internal representation of the Bigquery service.

View File

@ -45,7 +45,7 @@ class Google_Service_Blogger extends Google_Service
public $postUserInfos;
public $posts;
public $users;
/**
* Constructs the internal representation of the Blogger service.

View File

@ -53,7 +53,7 @@ class Google_Service_Books extends Google_Service
public $volumes_mybooks;
public $volumes_recommended;
public $volumes_useruploaded;
/**
* Constructs the internal representation of the Books service.

View File

@ -45,7 +45,7 @@ class Google_Service_Calendar extends Google_Service
public $events;
public $freebusy;
public $settings;
/**
* Constructs the internal representation of the Calendar service.

View File

@ -35,7 +35,7 @@ class Google_Service_CivicInfo extends Google_Service
public $divisions;
public $elections;
public $representatives;
/**
* Constructs the internal representation of the CivicInfo service.

View File

@ -37,7 +37,7 @@ class Google_Service_CloudMonitoring extends Google_Service
public $metricDescriptors;
public $timeseries;
public $timeseriesDescriptors;
/**
* Constructs the internal representation of the CloudMonitoring service.

View File

@ -35,7 +35,7 @@ class Google_Service_Cloudlatencytest extends Google_Service
"https://www.googleapis.com/auth/monitoring.readonly";
public $statscollection;
/**
* Constructs the internal representation of the Cloudlatencytest service.

View File

@ -76,7 +76,7 @@ class Google_Service_Compute extends Google_Service
public $urlMaps;
public $zoneOperations;
public $zones;
/**
* Constructs the internal representation of the Compute service.

View File

@ -39,7 +39,7 @@ class Google_Service_Container extends Google_Service
public $projects_operations;
public $projects_zones_clusters;
public $projects_zones_operations;
/**
* Constructs the internal representation of the Container service.

View File

@ -43,7 +43,7 @@ class Google_Service_Coordinate extends Google_Service
public $schedule;
public $team;
public $worker;
/**
* Constructs the internal representation of the Coordinate service.

View File

@ -33,7 +33,7 @@ class Google_Service_Customsearch extends Google_Service
public $cse;
/**
* Constructs the internal representation of the Customsearch service.

View File

@ -33,7 +33,7 @@ class Google_Service_Dataflow extends Google_Service
/**
* Constructs the internal representation of the Dataflow service.
@ -49,7 +49,3 @@ class Google_Service_Dataflow extends Google_Service
}
}

View File

@ -41,7 +41,7 @@ class Google_Service_Datastore extends Google_Service
"https://www.googleapis.com/auth/userinfo.email";
public $datasets;
/**
* Constructs the internal representation of the Datastore service.

View File

@ -46,7 +46,7 @@ class Google_Service_Deploymentmanager extends Google_Service
public $operations;
public $resources;
public $types;
/**
* Constructs the internal representation of the Deploymentmanager service.

View File

@ -87,7 +87,7 @@ class Google_Service_Dfareporting extends Google_Service
public $userRolePermissionGroups;
public $userRolePermissions;
public $userRoles;
/**
* Constructs the internal representation of the Dfareporting service.

View File

@ -105,7 +105,7 @@ class Google_Service_Directory extends Google_Service
public $users_aliases;
public $users_photos;
public $verificationCodes;
/**
* Constructs the internal representation of the Directory service.

View File

@ -45,7 +45,7 @@ class Google_Service_Dns extends Google_Service
public $managedZones;
public $projects;
public $resourceRecordSets;
/**
* Constructs the internal representation of the Dns service.

View File

@ -35,7 +35,7 @@ class Google_Service_DoubleClickBidManager extends Google_Service
public $lineitems;
public $queries;
public $reports;
/**
* Constructs the internal representation of the DoubleClickBidManager

View File

@ -38,7 +38,7 @@ class Google_Service_Doubleclicksearch extends Google_Service
public $conversion;
public $reports;
public $savedColumns;
/**
* Constructs the internal representation of the Doubleclicksearch service.

View File

@ -65,7 +65,7 @@ class Google_Service_Drive extends Google_Service
public $realtime;
public $replies;
public $revisions;
/**
* Constructs the internal representation of the Drive service.

View File

@ -52,7 +52,7 @@ class Google_Service_Fitness extends Google_Service
public $users_dataSources;
public $users_dataSources_datasets;
public $users_sessions;
/**
* Constructs the internal representation of the Fitness service.

View File

@ -43,7 +43,7 @@ class Google_Service_Fusiontables extends Google_Service
public $table;
public $task;
public $template;
/**
* Constructs the internal representation of the Fusiontables service.

View File

@ -55,7 +55,7 @@ class Google_Service_Games extends Google_Service
public $scores;
public $snapshots;
public $turnBasedMatches;
/**
* Constructs the internal representation of the Games service.

View File

@ -37,7 +37,7 @@ class Google_Service_GamesConfiguration extends Google_Service
public $achievementConfigurations;
public $imageConfigurations;
public $leaderboardConfigurations;
/**
* Constructs the internal representation of the GamesConfiguration service.

View File

@ -45,7 +45,7 @@ class Google_Service_GamesManagement extends Google_Service
public $rooms;
public $scores;
public $turnBasedMatches;
/**
* Constructs the internal representation of the GamesManagement service.

View File

@ -57,7 +57,7 @@ class Google_Service_Genomics extends Google_Service
public $referencesets;
public $variants;
public $variantsets;
/**
* Constructs the internal representation of the Genomics service.

View File

@ -50,7 +50,7 @@ class Google_Service_Gmail extends Google_Service
public $users_messages;
public $users_messages_attachments;
public $users_threads;
/**
* Constructs the internal representation of the Gmail service.

View File

@ -35,7 +35,7 @@ class Google_Service_GroupsMigration extends Google_Service
"https://www.googleapis.com/auth/apps.groups.migration";
public $archive;
/**
* Constructs the internal representation of the GroupsMigration service.

View File

@ -35,7 +35,7 @@ class Google_Service_Groupssettings extends Google_Service
"https://www.googleapis.com/auth/apps.groups.settings";
public $groups;
/**
* Constructs the internal representation of the Groupssettings service.

View File

@ -33,7 +33,7 @@ class Google_Service_IdentityToolkit extends Google_Service
public $relyingparty;
/**
* Constructs the internal representation of the IdentityToolkit service.

View File

@ -35,7 +35,7 @@ class Google_Service_Licensing extends Google_Service
"https://www.googleapis.com/auth/apps.licensing";
public $licenseAssignments;
/**
* Constructs the internal representation of the Licensing service.

View File

@ -52,7 +52,7 @@ class Google_Service_Manager extends Google_Service
public $deployments;
public $templates;
/**
* Constructs the internal representation of the Manager service.

View File

@ -61,7 +61,7 @@ class Google_Service_MapsEngine extends Google_Service
public $tables_files;
public $tables_parents;
public $tables_permissions;
/**
* Constructs the internal representation of the MapsEngine service.

View File

@ -44,7 +44,7 @@ class Google_Service_Mirror extends Google_Service
public $subscriptions;
public $timeline;
public $timeline_attachments;
/**
* Constructs the internal representation of the Mirror service.

View File

@ -34,7 +34,7 @@ class Google_Service_Pagespeedonline extends Google_Service
public $pagespeedapi;
/**
* Constructs the internal representation of the Pagespeedonline service.

View File

@ -47,7 +47,7 @@ class Google_Service_Plus extends Google_Service
public $comments;
public $moments;
public $people;
/**
* Constructs the internal representation of the Plus service.

View File

@ -67,7 +67,7 @@ class Google_Service_PlusDomains extends Google_Service
public $comments;
public $media;
public $people;
/**
* Constructs the internal representation of the PlusDomains service.

View File

@ -46,7 +46,7 @@ class Google_Service_Prediction extends Google_Service
public $hostedmodels;
public $trainedmodels;
/**
* Constructs the internal representation of the Prediction service.

View File

@ -39,7 +39,7 @@ class Google_Service_Pubsub extends Google_Service
public $subscriptions;
public $topics;
/**
* Constructs the internal representation of the Pubsub service.

View File

@ -34,7 +34,7 @@ class Google_Service_QPXExpress extends Google_Service
public $trips;
/**
* Constructs the internal representation of the QPXExpress service.

View File

@ -43,7 +43,7 @@ class Google_Service_Replicapool extends Google_Service
public $instanceGroupManagers;
public $zoneOperations;
/**
* Constructs the internal representation of the Replicapool service.

View File

@ -43,7 +43,7 @@ class Google_Service_Replicapoolupdater extends Google_Service
public $rollingUpdates;
public $zoneOperations;
/**
* Constructs the internal representation of the Replicapoolupdater service.

View File

@ -42,7 +42,7 @@ class Google_Service_Reports extends Google_Service
public $channels;
public $customerUsageReports;
public $userUsageReport;
/**
* Constructs the internal representation of the Reports service.

View File

@ -39,7 +39,7 @@ class Google_Service_Reseller extends Google_Service
public $customers;
public $subscriptions;
/**
* Constructs the internal representation of the Reseller service.

View File

@ -49,7 +49,7 @@ class Google_Service_Resourceviews extends Google_Service
public $zoneOperations;
public $zoneViews;
/**
* Constructs the internal representation of the Resourceviews service.

View File

@ -45,7 +45,7 @@ class Google_Service_SQLAdmin extends Google_Service
public $sslCerts;
public $tiers;
public $users;
/**
* Constructs the internal representation of the SQLAdmin service.

View File

@ -44,7 +44,7 @@ class Google_Service_ShoppingContent extends Google_Service
public $inventory;
public $products;
public $productstatuses;
/**
* Constructs the internal representation of the ShoppingContent service.

View File

@ -38,7 +38,7 @@ class Google_Service_SiteVerification extends Google_Service
"https://www.googleapis.com/auth/siteverification.verify_only";
public $webResource;
/**
* Constructs the internal representation of the SiteVerification service.

View File

@ -33,7 +33,7 @@ class Google_Service_Spectrum extends Google_Service
public $paws;
/**
* Constructs the internal representation of the Spectrum service.

View File

@ -49,7 +49,7 @@ class Google_Service_Storage extends Google_Service
public $defaultObjectAccessControls;
public $objectAccessControls;
public $objects;
/**
* Constructs the internal representation of the Storage service.

View File

@ -61,7 +61,7 @@ class Google_Service_TagManager extends Google_Service
public $accounts_containers_variables;
public $accounts_containers_versions;
public $accounts_permissions;
/**
* Constructs the internal representation of the TagManager service.

View File

@ -39,7 +39,7 @@ class Google_Service_Taskqueue extends Google_Service
public $taskqueues;
public $tasks;
/**
* Constructs the internal representation of the Taskqueue service.

View File

@ -39,7 +39,7 @@ class Google_Service_Tasks extends Google_Service
public $tasklists;
public $tasks;
/**
* Constructs the internal representation of the Tasks service.

View File

@ -35,7 +35,7 @@ class Google_Service_Translate extends Google_Service
public $detections;
public $languages;
public $translations;
/**
* Constructs the internal representation of the Translate service.

View File

@ -35,7 +35,7 @@ class Google_Service_Urlshortener extends Google_Service
"https://www.googleapis.com/auth/urlshortener";
public $url;
/**
* Constructs the internal representation of the Urlshortener service.

View File

@ -33,7 +33,7 @@ class Google_Service_Webfonts extends Google_Service
public $webfonts;
/**
* Constructs the internal representation of the Webfonts service.

View File

@ -41,7 +41,7 @@ class Google_Service_Webmasters extends Google_Service
public $sites;
public $urlcrawlerrorscounts;
public $urlcrawlerrorssamples;
/**
* Constructs the internal representation of the Webmasters service.

View File

@ -66,7 +66,7 @@ class Google_Service_YouTube extends Google_Service
public $videoCategories;
public $videos;
public $watermarks;
/**
* Constructs the internal representation of the YouTube service.

View File

@ -51,7 +51,7 @@ class Google_Service_YouTubeAnalytics extends Google_Service
public $groupItems;
public $groups;
public $reports;
/**
* Constructs the internal representation of the YouTubeAnalytics service.

View File

@ -16,7 +16,7 @@
*/
/**
* Implementation of levels 1-3 of the URI Template spec.
* Implementation of levels 1-3 of the URI Template spec.
* @see http://tools.ietf.org/html/rfc6570
*/
class Google_Utils_URITemplate
@ -26,7 +26,7 @@ class Google_Utils_URITemplate
const TYPE_SCALAR = "4";
/**
* @var $operators array
* @var $operators array
* These are valid at the start of a template block to
* modify the way in which the variables inside are
* processed.
@ -64,7 +64,7 @@ class Google_Utils_URITemplate
/**
* This function finds the first matching {...} block and
* executes the replacement. It then calls itself to find
* subsequent blocks, if any.
* subsequent blocks, if any.
*/
private function resolveNextSection($string, $parameters)
{
@ -181,7 +181,7 @@ class Google_Utils_URITemplate
);
}
}
public function combine(
$key,
$parameters,
@ -200,17 +200,17 @@ class Google_Utils_URITemplate
if (strpos($key, ":") !== false) {
list($key, $length) = explode(":", $key);
}
// Check for explode parameter.
if ($key[strlen($key) - 1] == "*") {
$explode = true;
$key = substr($key, 0, -1);
$skip_final_combine = true;
}
// Define the list separator.
$list_sep = $explode ? $sep : ",";
if (isset($parameters[$key])) {
$data_type = $this->getDataType($parameters[$key]);
switch($data_type) {
@ -267,11 +267,11 @@ class Google_Utils_URITemplate
if (!$combine || $skip_final_combine) {
return $value;
}
// Else we combine the key name: foo=bar, if value is not the empty string.
return $key . ($value != '' || $combine_on_empty ? $combine . $value : '');
}
/**
* Return the type of a passed in value
*/
@ -286,7 +286,7 @@ class Google_Utils_URITemplate
}
return self::TYPE_SCALAR;
}
/**
* Utility function that merges multiple combine calls
* for multi-key templates.
@ -318,7 +318,7 @@ class Google_Utils_URITemplate
}
return implode($sep, $ret);
}
/**
* Utility function to encode and trim values
*/

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
if (!class_exists('Google_Client')) {
require_once dirname(__FILE__) . '/../autoload.php';
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace Google\API;
/**
@ -147,4 +149,4 @@ class Drive
{
$this->service->files->delete($fileHandle['id']);
}
}
}