@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | |
| 390 | 390 | /** |
| 391 | 391 | * Bind named and positional parameters to a PDOStatement. |
| 392 | - * @param PDOStatement $statement |
|
| 392 | + * @param \PDOStatement $statement |
|
| 393 | 393 | * @param array $params |
| 394 | 394 | * @return void |
| 395 | 395 | */ |
@@ -434,6 +434,12 @@ discard block |
||
| 434 | 434 | |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | + /** |
|
| 438 | + * @param string $option |
|
| 439 | + * @param string $default |
|
| 440 | + * |
|
| 441 | + * @return string |
|
| 442 | + */ |
|
| 437 | 443 | protected function getOption( $option, $default = null ) { |
| 438 | 444 | return isset($this->dsn->options[$option]) ? $this->dsn->options[$option] : $default; |
| 439 | 445 | } |
@@ -32,6 +32,9 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | protected $config; |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param string $config |
|
| 37 | + */ |
|
| 35 | 38 | public static function fromString( $config ) { |
| 36 | 39 | |
| 37 | 40 | // parse the string into some components |
@@ -85,7 +88,6 @@ discard block |
||
| 85 | 88 | * pass - user's password |
| 86 | 89 | * db - name of the database schema to connect to |
| 87 | 90 | * options - an array of database specific options |
| 88 | - * @param array $dsn |
|
| 89 | 91 | */ |
| 90 | 92 | public function __construct( array $config ) { |
| 91 | 93 | |
@@ -120,7 +122,7 @@ discard block |
||
| 120 | 122 | /** |
| 121 | 123 | * Dynamic property access. |
| 122 | 124 | * @param string $key |
| 123 | - * @return mixed |
|
| 125 | + * @return string|null |
|
| 124 | 126 | */ |
| 125 | 127 | public function __get( $key ) { |
| 126 | 128 | return isset($this->config[$key]) ? $this->config[$key] : null; |
@@ -92,6 +92,9 @@ discard block |
||
| 92 | 92 | return $this; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | + /** |
|
| 96 | + * @param string $operator |
|
| 97 | + */ |
|
| 95 | 98 | public function where( $column, $operator, $value = null ) { |
| 96 | 99 | |
| 97 | 100 | // shortcut for equals |
@@ -302,6 +305,11 @@ discard block |
||
| 302 | 305 | |
| 303 | 306 | } |
| 304 | 307 | |
| 308 | + /** |
|
| 309 | + * @param string $operator |
|
| 310 | + * |
|
| 311 | + * @return string |
|
| 312 | + */ |
|
| 305 | 313 | protected function getParameterName( $column, $operator ) { |
| 306 | 314 | |
| 307 | 315 | $suffixes = [ |