@@ -23,4 +23,4 @@ |
||
23 | 23 | $error = "google-api-php-client's autoloader was moved to src/Google/autoload.php in 1.1.3. This "; |
24 | 24 | $error .= "redirect will be removed in 1.2. Please adjust your code to use the new location."; |
25 | 25 | trigger_error($error, E_USER_DEPRECATED); |
26 | -require_once dirname(__FILE__) . '/src/Google/autoload.php'; |
|
26 | +require_once dirname(__FILE__).'/src/Google/autoload.php'; |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | if (!class_exists('Google_Client')) { |
4 | - require_once dirname(__FILE__) . '/autoload.php'; |
|
4 | + require_once dirname(__FILE__).'/autoload.php'; |
|
5 | 5 | } |
6 | 6 | |
7 | 7 | /** |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | if (!class_exists('Google_Client')) { |
19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $hash = defined("OPENSSL_ALGO_SHA256") ? OPENSSL_ALGO_SHA256 : "sha256"; |
69 | 69 | $status = openssl_verify($data, $signature, $this->publicKey, $hash); |
70 | 70 | if ($status === -1) { |
71 | - throw new Google_Auth_Exception('Signature verification error: ' . openssl_error_string()); |
|
71 | + throw new Google_Auth_Exception('Signature verification error: '.openssl_error_string()); |
|
72 | 72 | } |
73 | 73 | return $status === 1; |
74 | 74 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | if (!class_exists('Google_Client')) { |
19 | - require_once dirname(__FILE__) . '/autoload.php'; |
|
19 | + require_once dirname(__FILE__).'/autoload.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | { |
77 | 77 | if (is_string($config) && strlen($config)) { |
78 | 78 | $config = new Google_Config($config); |
79 | - } else if ( !($config instanceof Google_Config)) { |
|
79 | + } else if (!($config instanceof Google_Config)) { |
|
80 | 80 | $config = new Google_Config(); |
81 | 81 | |
82 | 82 | if ($this->isAppEngine()) { |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | if ($request instanceof Google_Http_Request) { |
584 | 584 | $request->setUserAgent( |
585 | 585 | $this->getApplicationName() |
586 | - . " " . self::USER_AGENT_SUFFIX |
|
586 | + . " ".self::USER_AGENT_SUFFIX |
|
587 | 587 | . $this->getLibraryVersion() |
588 | 588 | ); |
589 | 589 | if (!$this->getClassConfig("Google_Http_Request", "disable_gzip")) { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | if (!class_exists('Google_Client')) { |
19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | public function __construct(Google_Client $client) |
38 | 38 | { |
39 | - if (! function_exists('apc_add') ) { |
|
39 | + if (!function_exists('apc_add')) { |
|
40 | 40 | $error = "Apc functions not available"; |
41 | 41 | |
42 | 42 | $client->getLogger()->error($error); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | if (!class_exists('Google_Client')) { |
19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $this->connection = memcache_pconnect($this->host, $this->port); |
175 | 175 | } |
176 | 176 | |
177 | - if (! $this->connection) { |
|
177 | + if (!$this->connection) { |
|
178 | 178 | $error = "Couldn't connect to memcache server"; |
179 | 179 | |
180 | 180 | $this->client->getLogger()->error($error); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | if (!class_exists('Google_Client')) { |
19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | if (!class_exists('Google_Client')) { |
19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /* |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if ($this->acquireReadLock($storageFile)) { |
73 | 73 | if (filesize($storageFile) > 0) { |
74 | 74 | $data = fread($this->fh, filesize($storageFile)); |
75 | - $data = unserialize($data); |
|
75 | + $data = unserialize($data); |
|
76 | 76 | } else { |
77 | 77 | $this->client->getLogger()->debug( |
78 | 78 | 'Cache file was empty', |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | private function getCacheFile($file, $forWrite = false) |
138 | 138 | { |
139 | - return $this->getCacheDir($file, $forWrite) . '/' . md5($file); |
|
139 | + return $this->getCacheDir($file, $forWrite).'/'.md5($file); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | private function getCacheDir($file, $forWrite) |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | // use the first 2 characters of the hash as a directory prefix |
145 | 145 | // this should prevent slowdowns due to huge directory listings |
146 | 146 | // and thus give some basic amount of scalability |
147 | - $storageDir = $this->path . '/' . substr(md5($file), 0, 2); |
|
148 | - if ($forWrite && ! is_dir($storageDir)) { |
|
149 | - if (! mkdir($storageDir, 0755, true)) { |
|
147 | + $storageDir = $this->path.'/'.substr(md5($file), 0, 2); |
|
148 | + if ($forWrite && !is_dir($storageDir)) { |
|
149 | + if (!mkdir($storageDir, 0755, true)) { |
|
150 | 150 | $this->client->getLogger()->error( |
151 | 151 | 'File cache creation failed', |
152 | 152 | array('dir' => $storageDir) |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | if (!class_exists('Google_Client')) { |
19 | - require_once dirname(__FILE__) . '/../autoload.php'; |
|
19 | + require_once dirname(__FILE__).'/../autoload.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | class Google_Cache_Exception extends Google_Exception |