@@ -4,11 +4,8 @@ |
||
| 4 | 4 | */ |
| 5 | 5 | defined('PH7') or exit('Restricted access'); |
| 6 | 6 | |
| 7 | -use |
|
| 8 | -PH7\Framework\Translate\Adapter\Gettext\StreamReader, |
|
| 9 | -PH7\Framework\Translate\Adapter\Gettext\StringReader, |
|
| 10 | -PH7\Framework\Translate\Adapter\Gettext\FileReader, |
|
| 11 | -PH7\Framework\Translate\Adapter\Gettext\CachedFileReader; |
|
| 7 | +use PH7\Framework\Translate\Adapter\Gettext\StreamReader; |
|
| 8 | +use PH7\Framework\Translate\Adapter\Gettext\FileReader; |
|
| 12 | 9 | |
| 13 | 10 | |
| 14 | 11 | /* |
@@ -14,7 +14,8 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | defined('PH7') or exit('Restricted access'); |
| 16 | 16 | |
| 17 | - use PH7\Framework\Config\Config, PH7\Framework\Cookie\Cookie; |
|
| 17 | + use PH7\Framework\Config\Config; |
|
| 18 | + use PH7\Framework\Cookie\Cookie; |
|
| 18 | 19 | |
| 19 | 20 | class Lang |
| 20 | 21 | { |
@@ -177,7 +178,8 @@ discard block |
||
| 177 | 178 | namespace |
| 178 | 179 | { |
| 179 | 180 | |
| 180 | - use PH7\Framework\Registry\Registry, PH7\Framework\Parse\SysVar; |
|
| 181 | + use PH7\Framework\Registry\Registry; |
|
| 182 | + use PH7\Framework\Parse\SysVar; |
|
| 181 | 183 | |
| 182 | 184 | /** |
| 183 | 185 | * Check if GetText PHP extension exists, if not, it'll includes the GetText library. |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * Set the default language name. |
| 49 | 49 | * |
| 50 | 50 | * @param string $sNewDefLang Prefix of the language. |
| 51 | - * @return object $this |
|
| 51 | + * @return Lang $this |
|
| 52 | 52 | */ |
| 53 | 53 | public function setDefaultLang($sNewDefLang) |
| 54 | 54 | { |
@@ -60,8 +60,7 @@ discard block |
||
| 60 | 60 | /** |
| 61 | 61 | * Set the user language name. |
| 62 | 62 | * |
| 63 | - * @param string $sNewDefaultLang Prefix of the language. |
|
| 64 | - * @return object $this |
|
| 63 | + * @return Lang $this |
|
| 65 | 64 | */ |
| 66 | 65 | public function setUserLang($sNewUserLang) |
| 67 | 66 | { |
@@ -120,7 +119,7 @@ discard block |
||
| 120 | 119 | * |
| 121 | 120 | * @param string $sFileName The language filename (e.g., "global"). |
| 122 | 121 | * @param string $sPath If you want to change the default path (the path to the current module), you can specify the path. Default NULL |
| 123 | - * @return object $this |
|
| 122 | + * @return Lang $this |
|
| 124 | 123 | */ |
| 125 | 124 | public function load($sFileName, $sPath = null) |
| 126 | 125 | { |
@@ -134,7 +133,7 @@ discard block |
||
| 134 | 133 | /** |
| 135 | 134 | * Loading language files. |
| 136 | 135 | * |
| 137 | - * @return object $this |
|
| 136 | + * @return Lang $this |
|
| 138 | 137 | * @throws \PH7\Framework\Translate\Exception If the language file is not found. |
| 139 | 138 | */ |
| 140 | 139 | public function init() |
@@ -202,7 +201,6 @@ discard block |
||
| 202 | 201 | /** |
| 203 | 202 | * Language helper function. |
| 204 | 203 | * |
| 205 | - * @param string $sVar [, string $... ] |
|
| 206 | 204 | * @return string Returns the text with gettext function or language in an array (this depends on whether a key language was found in the language table). |
| 207 | 205 | */ |
| 208 | 206 | function t(...$aTokens) |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | * |
| 60 | 60 | * @access public |
| 61 | 61 | * @param array $aItems |
| 62 | - * @return object this |
|
| 62 | + * @return Rss this |
|
| 63 | 63 | */ |
| 64 | 64 | public function addItem($aItems) |
| 65 | 65 | { |
@@ -27,6 +27,10 @@ discard block |
||
| 27 | 27 | private $privateKey; |
| 28 | 28 | |
| 29 | 29 | // Creates a new signer from a .p12 file. |
| 30 | + |
|
| 31 | + /** |
|
| 32 | + * @param string $password |
|
| 33 | + */ |
|
| 30 | 34 | function __construct($p12, $password) { |
| 31 | 35 | if (!function_exists('openssl_x509_read')) { |
| 32 | 36 | throw new Exception( |
@@ -57,6 +61,9 @@ discard block |
||
| 57 | 61 | } |
| 58 | 62 | } |
| 59 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $data |
|
| 66 | + */ |
|
| 60 | 67 | function sign($data) { |
| 61 | 68 | if(version_compare(PHP_VERSION, '5.3.0') < 0) { |
| 62 | 69 | throw new Google_AuthException( |
@@ -51,8 +51,8 @@ |
||
| 51 | 51 | * Verifies the signature on data. |
| 52 | 52 | * |
| 53 | 53 | * Returns true if the signature is valid, false otherwise. |
| 54 | - * @param $data |
|
| 55 | - * @param $signature |
|
| 54 | + * @param string $data |
|
| 55 | + * @param string $signature |
|
| 56 | 56 | * @throws Google_AuthException |
| 57 | 57 | * @return bool |
| 58 | 58 | */ |
@@ -37,6 +37,9 @@ discard block |
||
| 37 | 37 | return file_exists($storageFile . '.lock'); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $storageFile |
|
| 42 | + */ |
|
| 40 | 43 | private function createLock($storageFile) { |
| 41 | 44 | $storageDir = dirname($storageFile); |
| 42 | 45 | if (! is_dir($storageDir)) { |
@@ -57,6 +60,9 @@ discard block |
||
| 57 | 60 | @unlink($storageFile . '.lock'); |
| 58 | 61 | } |
| 59 | 62 | |
| 63 | + /** |
|
| 64 | + * @param string $storageFile |
|
| 65 | + */ |
|
| 60 | 66 | private function waitForLock($storageFile) { |
| 61 | 67 | // 20 x 250 = 5 seconds |
| 62 | 68 | $tries = 20; |
@@ -81,6 +87,9 @@ discard block |
||
| 81 | 87 | return $this->path . '/' . substr($hash, 0, 2); |
| 82 | 88 | } |
| 83 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $hash |
|
| 92 | + */ |
|
| 84 | 93 | private function getCacheFile($hash) { |
| 85 | 94 | return $this->getCacheDir($hash) . '/' . $hash; |
| 86 | 95 | } |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | * Retrieves the authenticated user's list of accounts. (accounts.list) |
| 94 | 94 | * |
| 95 | 95 | * @param array $optParams Optional parameters. |
| 96 | - * @return Google_AccountsList |
|
| 96 | + * @return Google_Accounts |
|
| 97 | 97 | */ |
| 98 | 98 | public function listAccounts($optParams = array()) { |
| 99 | 99 | $params = array(); |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | * @opt_param string filter Filters to be run on the report. |
| 213 | 213 | * @opt_param string startIndex Index of the first row of report data to return. |
| 214 | 214 | * @opt_param string dimension Dimensions to base the report on. |
| 215 | - * @return Google_Report |
|
| 215 | + * @return Google_AdsenseReportsGenerateResponse |
|
| 216 | 216 | */ |
| 217 | 217 | public function generate($endDate, $startDate, $optParams = array()) { |
| 218 | 218 | $params = array('endDate' => $endDate, 'startDate' => $startDate); |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | /** |
| 258 | 258 | * Get information about the selected associated AdSense account. (accounts.get) |
| 259 | 259 | * |
| 260 | - * @param string $accountId Account to get information about. |
|
| 260 | + * @param integer $accountId Account to get information about. |
|
| 261 | 261 | * @param array $optParams Optional parameters. |
| 262 | 262 | * @return Google_Account |
| 263 | 263 | */ |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | * @opt_param string filter Filters to be run on the report. |
| 506 | 506 | * @opt_param string startIndex Index of the first row of report data to return. |
| 507 | 507 | * @opt_param string dimension Dimensions to base the report on. |
| 508 | - * @return Google_Report |
|
| 508 | + * @return Google_AdsenseReportsGenerateResponse |
|
| 509 | 509 | */ |
| 510 | 510 | public function generate($accountId, $startDate, $endDate, $optParams = array()) { |
| 511 | 511 | $params = array('accountId' => $accountId, 'startDate' => $startDate, 'endDate' => $endDate); |
@@ -241,7 +241,7 @@ |
||
| 241 | 241 | /** |
| 242 | 242 | * Get information about the selected AdSense account. (accounts.get) |
| 243 | 243 | * |
| 244 | - * @param string $accountId Account to get information about. |
|
| 244 | + * @param integer $accountId Account to get information about. |
|
| 245 | 245 | * @param array $optParams Optional parameters. |
| 246 | 246 | * |
| 247 | 247 | * @opt_param bool tree Whether the tree of sub accounts should be returned. |