This commit is contained in:
Manish Verma
2016-12-13 18:18:25 +05:30
parent fc98add11c
commit 2d8e640e9b
2314 changed files with 97798 additions and 75664 deletions

View File

@@ -180,16 +180,14 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
*/
public function exchangeArray($data)
{
if (! is_array($data) && ! is_object($data)) {
throw new Exception\InvalidArgumentException(
'Passed variable is not an array or object, using empty array instead'
);
if (!is_array($data) && !is_object($data)) {
throw new Exception\InvalidArgumentException('Passed variable is not an array or object, using empty array instead');
}
if (is_object($data) && ($data instanceof self || $data instanceof \ArrayObject)) {
$data = $data->getArrayCopy();
}
if (! is_array($data)) {
if (!is_array($data)) {
$data = (array) $data;
}
@@ -292,7 +290,7 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
public function &offsetGet($key)
{
$ret = null;
if (! $this->offsetExists($key)) {
if (!$this->offsetExists($key)) {
return $ret;
}
$ret =& $this->storage[$key];