@@ -301,6 +301,9 @@ |
||
| 301 | 301 | { |
| 302 | 302 | private $refresher; |
| 303 | 303 | |
| 304 | + /** |
|
| 305 | + * @param \Closure $refresher |
|
| 306 | + */ |
|
| 304 | 307 | public function __construct($refresher) |
| 305 | 308 | { |
| 306 | 309 | $this->refresher = $refresher; |
@@ -108,6 +108,9 @@ |
||
| 108 | 108 | return new $exClass($resultHandler, $query); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | + /** |
|
| 112 | + * @param resource $resultHandler |
|
| 113 | + */ |
|
| 111 | 114 | private function inferExceptionClass($resultHandler, StatementExceptionFactory $fallbackFactory = null) |
| 112 | 115 | { |
| 113 | 116 | if ($this->bySqlStateCodeAndMessage || $this->bySqlStateCode || $this->bySqlStateClass) { |
@@ -29,6 +29,10 @@ |
||
| 29 | 29 | { |
| 30 | 30 | private $decSepRetriever; |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $schemaName |
|
| 34 | + * @param string $name |
|
| 35 | + */ |
|
| 32 | 36 | public function __construct($schemaName, $name, IConnection $connection) |
| 33 | 37 | { |
| 34 | 38 | parent::__construct($schemaName, $name, $connection); |
@@ -45,6 +45,10 @@ |
||
| 45 | 45 | |
| 46 | 46 | private $dateStyleRetriever; |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $schemaName |
|
| 50 | + * @param string $name |
|
| 51 | + */ |
|
| 48 | 52 | public function __construct($schemaName, $name, IConnection $connection) |
| 49 | 53 | { |
| 50 | 54 | parent::__construct($schemaName, $name, $connection); |
@@ -28,6 +28,10 @@ discard block |
||
| 28 | 28 | private $dateStyleRetriever; |
| 29 | 29 | private $localMeanTimeZoneRetriever; |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param string $schemaName |
|
| 33 | + * @param string $name |
|
| 34 | + */ |
|
| 31 | 35 | public function __construct($schemaName, $name, IConnection $connection) |
| 32 | 36 | { |
| 33 | 37 | parent::__construct($schemaName, $name, $connection); |
@@ -38,6 +42,10 @@ discard block |
||
| 38 | 42 | $this->localMeanTimeZoneRetriever = new ConnConfigValueRetriever( |
| 39 | 43 | $connection->getConfig(), |
| 40 | 44 | ConfigParam::TIME_ZONE, |
| 45 | + |
|
| 46 | + /** |
|
| 47 | + * @param string $timeZone |
|
| 48 | + */ |
|
| 41 | 49 | function ($timeZone) use ($connection) { |
| 42 | 50 | try { |
| 43 | 51 | $tz = new \DateTimeZone($timeZone); |
@@ -56,6 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * @internal Only for the purpose of Ivory itself. |
| 59 | + * @param integer $inf |
|
| 59 | 60 | */ |
| 60 | 61 | final protected function __construct($inf, \DateTimeImmutable $dt = null) |
| 61 | 62 | { |
@@ -178,7 +179,7 @@ discard block |
||
| 178 | 179 | |
| 179 | 180 | /** |
| 180 | 181 | * @param \DateTimeZone $timezone timezone to create the {@link \DateTime} object with |
| 181 | - * @return \DateTime|null the date/time represented as a {@link \DateTimeImmutable} object; |
|
| 182 | + * @return null|\DateTimeImmutable the date/time represented as a {@link \DateTimeImmutable} object; |
|
| 182 | 183 | * <tt>null</tt> iff the date/time is not finite |
| 183 | 184 | */ |
| 184 | 185 | public function toDateTimeImmutable(\DateTimeZone $timezone = null) |
@@ -233,6 +234,13 @@ discard block |
||
| 233 | 234 | } |
| 234 | 235 | |
| 235 | 236 | |
| 237 | + /** |
|
| 238 | + * @param integer $years |
|
| 239 | + * @param integer $months |
|
| 240 | + * @param integer $days |
|
| 241 | + * @param integer $hours |
|
| 242 | + * @param integer $minutes |
|
| 243 | + */ |
|
| 236 | 244 | final protected function addPartsImpl($years, $months, $days, $hours, $minutes, $seconds) |
| 237 | 245 | { |
| 238 | 246 | if ($this->inf) { |
@@ -287,7 +287,7 @@ |
||
| 287 | 287 | $i += $lzsLen - 1; |
| 288 | 288 | continue; |
| 289 | 289 | } |
| 290 | - $result .= (ltrim($fields[$i], '0') ? : '0'); |
|
| 290 | + $result .= (ltrim($fields[$i], '0') ?: '0'); |
|
| 291 | 291 | } |
| 292 | 292 | if ($lzsStart + $lzsLen == 8) { |
| 293 | 293 | $result .= ':'; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | throw new \InvalidArgumentException('Invalid syntax of hstore value'); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - $k = ($m[2][0] ? : $this->unescapeAtom($m[1][0])); |
|
| 39 | + $k = ($m[2][0] ?: $this->unescapeAtom($m[1][0])); |
|
| 40 | 40 | $v = (!empty($m[4][0]) ? null : (!empty($m[5][0]) ? $m[5][0] : $this->unescapeAtom($m[3][0]))); |
| 41 | 41 | $result[$k] = $v; |
| 42 | 42 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | public function defineTypeAlias(string $alias, string $schemaName, string $typeName) |
| 63 | 63 | { |
| 64 | - $this->nameTypeMap[$alias] =& $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 64 | + $this->nameTypeMap[$alias] = & $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | foreach ($this->typeSearchPath as $schemaName) { |
| 92 | 92 | foreach (($this->qualNameTypeMap[$schemaName] ?? []) as $typeName => $converter) { |
| 93 | 93 | if (!isset($this->searchedNameCache[$typeName])) { |
| 94 | - $this->searchedNameCache[$typeName] =& $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 94 | + $this->searchedNameCache[$typeName] = & $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | } |