@@ -204,7 +204,7 @@ |
||
| 204 | 204 | * @param bool $backup_original_files [optional] <p>If original files should be backed up.</p> |
| 205 | 205 | * @return array <p>Returns db response.</p> |
| 206 | 206 | */ |
| 207 | - public function repair($preserve_cloned_files = FALSE, $backup_original_files = FALSE) |
|
| 207 | + public function repair($preserve_cloned_files = false, $backup_original_files = false) |
|
| 208 | 208 | { |
| 209 | 209 | return []; |
| 210 | 210 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | throw ExceptionConverter::toLegacy($e); |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - $getCollectionInfo = function (CollectionInfo $collectionInfo) { |
|
| 141 | + $getCollectionInfo = function(CollectionInfo $collectionInfo) { |
|
| 142 | 142 | return [ |
| 143 | 143 | 'name' => $collectionInfo->getName(), |
| 144 | 144 | 'options' => $collectionInfo->getOptions(), |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | throw ExceptionConverter::toLegacy($e); |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - $getCollectionName = function (CollectionInfo $collectionInfo) { |
|
| 178 | + $getCollectionName = function(CollectionInfo $collectionInfo) { |
|
| 179 | 179 | return $collectionInfo->getName(); |
| 180 | 180 | }; |
| 181 | 181 | |
@@ -344,13 +344,13 @@ discard block |
||
| 344 | 344 | if ($document_or_id instanceof \MongoId) { |
| 345 | 345 | $id = $document_or_id; |
| 346 | 346 | } elseif (is_object($document_or_id)) { |
| 347 | - if (! isset($document_or_id->_id)) { |
|
| 347 | + if ( ! isset($document_or_id->_id)) { |
|
| 348 | 348 | $id = $document_or_id; |
| 349 | 349 | } else { |
| 350 | 350 | $id = $document_or_id->_id; |
| 351 | 351 | } |
| 352 | 352 | } elseif (is_array($document_or_id)) { |
| 353 | - if (! isset($document_or_id['_id'])) { |
|
| 353 | + if ( ! isset($document_or_id['_id'])) { |
|
| 354 | 354 | return null; |
| 355 | 355 | } |
| 356 | 356 | |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | * @return Closure |
| 542 | 542 | */ |
| 543 | 543 | private function getSystemCollectionFilterClosure($includeSystemCollections = false) { |
| 544 | - return function (CollectionInfo $collectionInfo) use ($includeSystemCollections) { |
|
| 544 | + return function(CollectionInfo $collectionInfo) use ($includeSystemCollections) { |
|
| 545 | 545 | return $includeSystemCollections || ! preg_match('#^system\.#', $collectionInfo->getName()); |
| 546 | 546 | }; |
| 547 | 547 | } |
@@ -540,7 +540,8 @@ |
||
| 540 | 540 | * @param bool $includeSystemCollections |
| 541 | 541 | * @return Closure |
| 542 | 542 | */ |
| 543 | - private function getSystemCollectionFilterClosure($includeSystemCollections = false) { |
|
| 543 | + private function getSystemCollectionFilterClosure($includeSystemCollections = false) |
|
| 544 | + { |
|
| 544 | 545 | return function (CollectionInfo $collectionInfo) use ($includeSystemCollections) { |
| 545 | 546 | return $includeSystemCollections || ! preg_match('#^system\.#', $collectionInfo->getName()); |
| 546 | 547 | }; |
@@ -511,6 +511,9 @@ discard block |
||
| 511 | 511 | } |
| 512 | 512 | } |
| 513 | 513 | |
| 514 | + /** |
|
| 515 | + * @param string $name |
|
| 516 | + */ |
|
| 514 | 517 | private function checkDatabaseName($name) |
| 515 | 518 | { |
| 516 | 519 | if (empty($name)) { |
@@ -543,7 +546,7 @@ discard block |
||
| 543 | 546 | } |
| 544 | 547 | |
| 545 | 548 | /** |
| 546 | - * @return array |
|
| 549 | + * @return string[] |
|
| 547 | 550 | */ |
| 548 | 551 | public function __sleep() |
| 549 | 552 | { |
@@ -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 | |
@@ -17,6 +17,7 @@ |
||
| 17 | 17 | * <p>(PECL mongo >= 1.5.0)</p> |
| 18 | 18 | * @link http://php.net/manual/en/class.mongoduplicatekeyexception.php |
| 19 | 19 | */ |
| 20 | -class MongoDuplicateKeyException extends MongoWriteConcernException { |
|
| 20 | +class MongoDuplicateKeyException extends MongoWriteConcernException |
|
| 21 | +{ |
|
| 21 | 22 | |
| 22 | 23 | } |
@@ -13,5 +13,6 @@ |
||
| 13 | 13 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -class MongoException extends Exception { |
|
| 16 | +class MongoException extends Exception |
|
| 17 | +{ |
|
| 17 | 18 | } |
@@ -17,4 +17,6 @@ |
||
| 17 | 17 | * <p>(PECL mongo >= 1.5.0)</p> |
| 18 | 18 | * @link http://php.net/manual/en/class.mongoexecutiontimeoutexception.php |
| 19 | 19 | */ |
| 20 | -class MongoExecutionTimeoutException extends MongoException {} |
|
| 20 | +class MongoExecutionTimeoutException extends MongoException |
|
| 21 | +{ |
|
| 22 | +} |
|
@@ -13,6 +13,7 @@ |
||
| 13 | 13 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -class MongoGridFSException extends MongoException { |
|
| 16 | +class MongoGridFSException extends MongoException |
|
| 17 | +{ |
|
| 17 | 18 | |
| 18 | 19 | } |
@@ -16,4 +16,6 @@ |
||
| 16 | 16 | /** |
| 17 | 17 | * <p>(PECL mongo >= 1.5.0)</p> |
| 18 | 18 | */ |
| 19 | -class MongoProtocolException extends MongoException {} |
|
| 19 | +class MongoProtocolException extends MongoException |
|
| 20 | +{ |
|
| 21 | +} |
|
@@ -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 | |
@@ -17,11 +17,14 @@ |
||
| 17 | 17 | * <p>(PECL mongo >= 1.5.0)</p> |
| 18 | 18 | * @link http://php.net/manual/en/class.mongowriteconcernexception.php#class.mongowriteconcernexception |
| 19 | 19 | */ |
| 20 | -class MongoWriteConcernException extends MongoCursorException { |
|
| 20 | +class MongoWriteConcernException extends MongoCursorException |
|
| 21 | +{ |
|
| 21 | 22 | /** |
| 22 | 23 | * Get the error document |
| 23 | 24 | * @link http://php.net/manual/en/mongowriteconcernexception.getdocument.php |
| 24 | 25 | * @return array <p>A MongoDB document, if available, as an array.</p> |
| 25 | 26 | */ |
| 26 | - public function getDocument() {} |
|
| 27 | + public function getDocument() |
|
| 28 | + { |
|
| 29 | +} |
|
| 27 | 30 | } |