@@ -23,27 +23,27 @@ |
||
| 23 | 23 | |
| 24 | 24 | $lastError = json_last_error(); |
| 25 | 25 | switch ($lastError) { |
| 26 | - case JSON_ERROR_NONE: |
|
| 27 | - $lastErrorDesc = 'No errors'; |
|
| 28 | - break; |
|
| 29 | - case JSON_ERROR_DEPTH: |
|
| 30 | - $lastErrorDesc = 'Maximum stack depth exceeded'; |
|
| 31 | - break; |
|
| 32 | - case JSON_ERROR_STATE_MISMATCH: |
|
| 33 | - $lastErrorDesc = 'Underflow or the modes mismatch'; |
|
| 34 | - break; |
|
| 35 | - case JSON_ERROR_CTRL_CHAR: |
|
| 36 | - $lastErrorDesc = 'Unexpected control character found'; |
|
| 37 | - break; |
|
| 38 | - case JSON_ERROR_SYNTAX: |
|
| 39 | - $lastErrorDesc = 'Syntax error, malformed JSON'; |
|
| 40 | - break; |
|
| 41 | - case JSON_ERROR_UTF8: |
|
| 42 | - $lastErrorDesc = 'Malformed UTF-8 characters, possibly incorrectly encoded'; |
|
| 43 | - break; |
|
| 44 | - default: |
|
| 45 | - $lastErrorDesc = 'Unknown error'; |
|
| 46 | - break; |
|
| 26 | + case JSON_ERROR_NONE: |
|
| 27 | + $lastErrorDesc = 'No errors'; |
|
| 28 | + break; |
|
| 29 | + case JSON_ERROR_DEPTH: |
|
| 30 | + $lastErrorDesc = 'Maximum stack depth exceeded'; |
|
| 31 | + break; |
|
| 32 | + case JSON_ERROR_STATE_MISMATCH: |
|
| 33 | + $lastErrorDesc = 'Underflow or the modes mismatch'; |
|
| 34 | + break; |
|
| 35 | + case JSON_ERROR_CTRL_CHAR: |
|
| 36 | + $lastErrorDesc = 'Unexpected control character found'; |
|
| 37 | + break; |
|
| 38 | + case JSON_ERROR_SYNTAX: |
|
| 39 | + $lastErrorDesc = 'Syntax error, malformed JSON'; |
|
| 40 | + break; |
|
| 41 | + case JSON_ERROR_UTF8: |
|
| 42 | + $lastErrorDesc = 'Malformed UTF-8 characters, possibly incorrectly encoded'; |
|
| 43 | + break; |
|
| 44 | + default: |
|
| 45 | + $lastErrorDesc = 'Unknown error'; |
|
| 46 | + break; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | if ($lastError != JSON_ERROR_NONE) { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * @param $idDocument |
| 102 | - * @param null $collection |
|
| 102 | + * @param string $collection |
|
| 103 | 103 | * @return \ByJG\AnyDataset\NoSqlDocument|null |
| 104 | 104 | * @throws \MongoDB\Driver\Exception\Exception |
| 105 | 105 | * @throws \ByJG\Serializer\Exception\InvalidArgumentException |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | 121 | * @param \ByJG\AnyDataset\Dataset\IteratorFilter $filter |
| 122 | - * @param null $collection |
|
| 122 | + * @param null|string $collection |
|
| 123 | 123 | * @return \ByJG\AnyDataset\NoSqlDocument[]|null |
| 124 | 124 | * @throws \MongoDB\Driver\Exception\Exception |
| 125 | 125 | * @throws \ByJG\Serializer\Exception\InvalidArgumentException |