@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * http://php.net/manual/en/mongoresultexception.getdocument.php |
| 26 | 26 | * @return array <p>The full result document as an array, including partial data if available and additional keys.</p> |
| 27 | 27 | */ |
| 28 | - public function getDocument () {} |
|
| 28 | + public function getDocument() {} |
|
| 29 | 29 | |
| 30 | 30 | public $document; |
| 31 | 31 | |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | use Alcaeus\MongoDbAdapter\TypeInterface; |
| 17 | 17 | use MongoDB\BSON\Binary; |
| 18 | -use MongoDB\BSON\Type; |
|
| 19 | 18 | |
| 20 | 19 | class MongoBinData implements TypeInterface |
| 21 | 20 | { |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | use Alcaeus\MongoDbAdapter\AbstractCursor; |
| 17 | 17 | use MongoDB\Driver\Cursor; |
| 18 | -use MongoDB\Driver\ReadPreference; |
|
| 19 | 18 | use MongoDB\Operation\Find; |
| 20 | 19 | |
| 21 | 20 | /** |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | public function hasNext() |
| 223 | 223 | { |
| 224 | - if (! $this->startedIterating) { |
|
| 224 | + if ( ! $this->startedIterating) { |
|
| 225 | 225 | $this->ensureIterator(); |
| 226 | 226 | $this->startedIterating = true; |
| 227 | 227 | $this->storeIteratorState(); |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | */ |
| 406 | 406 | protected function convertCursorType() |
| 407 | 407 | { |
| 408 | - if (! $this->tailable) { |
|
| 408 | + if ( ! $this->tailable) { |
|
| 409 | 409 | return null; |
| 410 | 410 | } |
| 411 | 411 | |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | protected function wrapTraversable(\Traversable $traversable) |
| 447 | 447 | { |
| 448 | 448 | foreach ($traversable as $key => $value) { |
| 449 | - if (isset($value->_id) && ($value->_id instanceof \MongoDB\BSON\ObjectID || !is_object($value->_id))) { |
|
| 449 | + if (isset($value->_id) && ($value->_id instanceof \MongoDB\BSON\ObjectID || ! is_object($value->_id))) { |
|
| 450 | 450 | $key = (string) $value->_id; |
| 451 | 451 | } |
| 452 | 452 | yield $key => $value; |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | * @param bool $ok |
| 102 | 102 | * @return bool returns the former value of slaveOkay for this instance. |
| 103 | 103 | */ |
| 104 | - public function setSlaveOkay ($ok) |
|
| 104 | + public function setSlaveOkay($ok) |
|
| 105 | 105 | { |
| 106 | 106 | $this->notImplemented(); |
| 107 | 107 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | */ |
| 78 | 78 | public static function get($db, $ref) |
| 79 | 79 | { |
| 80 | - if (! static::isRef($ref)) { |
|
| 80 | + if ( ! static::isRef($ref)) { |
|
| 81 | 81 | return null; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | return; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if (! preg_match('#^/(.*)/([imxslu]*)$#', $regex, $matches)) { |
|
| 46 | + if ( ! preg_match('#^/(.*)/([imxslu]*)$#', $regex, $matches)) { |
|
| 47 | 47 | throw new MongoException('invalid regex', 9); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | * <ul> |
| 120 | 120 | * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. |
| 121 | 121 | */ |
| 122 | - public static function setCallback(callable $log_function ) |
|
| 122 | + public static function setCallback(callable $log_function) |
|
| 123 | 123 | { |
| 124 | 124 | self::$callback = $log_function; |
| 125 | 125 | return true; |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | $filename = 'file'; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - if (! $handle = fopen($filename, 'w')) { |
|
| 78 | + if ( ! $handle = fopen($filename, 'w')) { |
|
| 79 | 79 | trigger_error(E_ERROR, 'Can not open the destination file'); |
| 80 | 80 | return 0; |
| 81 | 81 | } |
@@ -65,6 +65,6 @@ |
||
| 65 | 65 | public function key() |
| 66 | 66 | { |
| 67 | 67 | $file = $this->current(); |
| 68 | - return ($file !== null) ? (string)$file->file['_id'] : null; |
|
| 68 | + return ($file !== null) ? (string) $file->file['_id'] : null; |
|
| 69 | 69 | } |
| 70 | 70 | } |