Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bf8a7feb1 | |||
| 52d26c4481 | |||
| dd369d348c |
@@ -17,6 +17,7 @@ use Kiri\ToArray;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
|
use ReturnTypeWillChange;
|
||||||
use Traversable;
|
use Traversable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -91,7 +92,7 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
|
|||||||
*/
|
*/
|
||||||
public function addItem($item)
|
public function addItem($item)
|
||||||
{
|
{
|
||||||
array_push($this->_item, $item);
|
$this->_item[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -143,7 +144,7 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
|
|||||||
* @param mixed $offset
|
* @param mixed $offset
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
*/
|
*/
|
||||||
public function offsetSet(mixed $offset, mixed $value)
|
#[ReturnTypeWillChange] public function offsetSet(mixed $offset, mixed $value)
|
||||||
{
|
{
|
||||||
$this->_item[$offset] = $value;
|
$this->_item[$offset] = $value;
|
||||||
}
|
}
|
||||||
@@ -152,7 +153,7 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
|
|||||||
/**
|
/**
|
||||||
* @param mixed $offset
|
* @param mixed $offset
|
||||||
*/
|
*/
|
||||||
public function offsetUnset(mixed $offset)
|
#[ReturnTypeWillChange] public function offsetUnset(mixed $offset)
|
||||||
{
|
{
|
||||||
if ($this->offsetExists($offset)) {
|
if ($this->offsetExists($offset)) {
|
||||||
unset($this->_item[$offset]);
|
unset($this->_item[$offset]);
|
||||||
|
|||||||
+3
-2
@@ -33,6 +33,7 @@ use Kiri\Exception\NotFindClassException;
|
|||||||
use Kiri\Kiri;
|
use Kiri\Kiri;
|
||||||
use Kiri\ToArray;
|
use Kiri\ToArray;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
|
use ReturnTypeWillChange;
|
||||||
use validator\Validator;
|
use validator\Validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1000,7 +1001,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function offsetSet(mixed $offset, mixed $value)
|
#[ReturnTypeWillChange] public function offsetSet(mixed $offset, mixed $value)
|
||||||
{
|
{
|
||||||
$this->__set($offset, $value);
|
$this->__set($offset, $value);
|
||||||
}
|
}
|
||||||
@@ -1009,7 +1010,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
* @param mixed $offset
|
* @param mixed $offset
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function offsetUnset(mixed $offset)
|
#[ReturnTypeWillChange] public function offsetUnset(mixed $offset)
|
||||||
{
|
{
|
||||||
if (!isset($this->_attributes[$offset])
|
if (!isset($this->_attributes[$offset])
|
||||||
&& !isset($this->_oldAttributes[$offset])) {
|
&& !isset($this->_oldAttributes[$offset])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user