20250203-1
This commit is contained in:
@@ -27,7 +27,7 @@ trait ObjectArrayBasicTrait
|
||||
*/
|
||||
public function offsetGet (mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
return $this->Container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -66,9 +66,9 @@ trait ObjectArraySearchAndSortTrait
|
||||
* @param string $objectProperty Имя свойства объекта
|
||||
* @param bool $descending Направление сортировки
|
||||
*
|
||||
* @return array Отсортированный массив объектов
|
||||
* @return void
|
||||
*/
|
||||
public function Sort (string $objectProperty, bool $descending = false): array
|
||||
public function Sort (string $objectProperty, bool $descending = false): void
|
||||
{
|
||||
// Создаём результирующий массив
|
||||
$result = array_merge($this->Container, []);
|
||||
@@ -80,8 +80,8 @@ trait ObjectArraySearchAndSortTrait
|
||||
? $a->$objectProperty <=> $b->$objectProperty
|
||||
: $b->$objectProperty <=> $a->$objectProperty);
|
||||
|
||||
// Возвращаем результат
|
||||
return $result;
|
||||
// Присваиваем результат
|
||||
$this->Container = $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user