Skip to content

Commit 966cb96

Browse files
committed
PHPLIB-330: Apply manual fixes
1 parent 17bd7b7 commit 966cb96

11 files changed

+154
-104
lines changed

src/Exception/BadMethodCallException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
namespace MongoDB\Exception;
1919

20-
class BadMethodCallException extends \BadMethodCallException implements Exception
20+
use BadMethodCallException as BaseBadMethodCallException;
21+
22+
class BadMethodCallException extends BaseBadMethodCallException implements Exception
2123
{
2224
/**
2325
* Thrown when a mutable method is invoked on an immutable object.

src/Exception/Exception.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
namespace MongoDB\Exception;
1919

20-
interface Exception extends \MongoDB\Driver\Exception\Exception
20+
use MongoDB\Driver\Exception\Exception as DriverException;
21+
22+
interface Exception extends DriverException
2123
{
2224
}

src/Exception/InvalidArgumentException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
namespace MongoDB\Exception;
1919

20-
class InvalidArgumentException extends \MongoDB\Driver\Exception\InvalidArgumentException implements Exception
20+
use MongoDB\Driver\Exception\InvalidArgumentException as DriverInvalidArgumentException;
21+
22+
class InvalidArgumentException extends DriverInvalidArgumentException implements Exception
2123
{
2224
/**
2325
* Thrown when an argument or option has an invalid type.

src/Exception/RuntimeException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
namespace MongoDB\Exception;
1919

20-
class RuntimeException extends \MongoDB\Driver\Exception\RuntimeException implements Exception
20+
use MongoDB\Driver\Exception\RuntimeException as DriverRuntimeException;
21+
22+
class RuntimeException extends DriverRuntimeException implements Exception
2123
{
2224
}

src/Exception/UnexpectedValueException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
namespace MongoDB\Exception;
1919

20-
class UnexpectedValueException extends \MongoDB\Driver\Exception\UnexpectedValueException implements Exception
20+
use MongoDB\Driver\Exception\UnexpectedValueException as DriverUnexpectedValueException;
21+
22+
class UnexpectedValueException extends DriverUnexpectedValueException implements Exception
2123
{
2224
}

src/Operation/Explainable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
*/
2828
interface Explainable extends Executable
2929
{
30-
function getCommandDocument(Server $server);
30+
public function getCommandDocument(Server $server);
3131
}

src/Operation/MapReduce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function __construct($databaseName, $collectionName, JavascriptInterface
156156
}
157157

158158
if (isset($options['finalize']) && ! $options['finalize'] instanceof JavascriptInterface) {
159-
throw InvalidArgumentException::invalidType('"finalize" option', $options['finalize'], Javascript::class);
159+
throw InvalidArgumentException::invalidType('"finalize" option', $options['finalize'], JavascriptInterface::class);
160160
}
161161

162162
if (isset($options['jsMode']) && ! is_bool($options['jsMode'])) {

0 commit comments

Comments
 (0)