Commit 33f6ca4d authored by Jeremy Mikola's avatar Jeremy Mikola

PHPLIB-75: Use package BadMethodCallException for IndexInfo

Also change "read-only" language to "immutable".
parent 2083eede
<?php
namespace MongoDB\Exception;
class BadMethodCallException extends \BadMethodCallException implements Exception
{
}
......@@ -2,8 +2,8 @@
namespace MongoDB\Model;
use MongoDB\Exception\BadMethodCallException;
use ArrayAccess;
use BadMethodCallException;
/**
* Index information model class.
......@@ -140,21 +140,21 @@ class IndexInfo implements ArrayAccess
* Not supported.
*
* @see http://php.net/arrayaccess.offsetset
* @throws BadMethodCallException IndexInfo is read-only
* @throws BadMethodCallException IndexInfo is immutable
*/
public function offsetSet($key, $value)
{
throw new BadMethodCallException('IndexInfo is read-only');
throw new BadMethodCallException('IndexInfo is immutable');
}
/**
* Not supported.
*
* @see http://php.net/arrayaccess.offsetunset
* @throws BadMethodCallException IndexInfo is read-only
* @throws BadMethodCallException IndexInfo is immutable
*/
public function offsetUnset($key)
{
throw new BadMethodCallException('IndexInfo is read-only');
throw new BadMethodCallException('IndexInfo is immutable');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment