From ec91d656608f2389acc963dbe86d012236e4e952 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Mon, 20 May 2024 11:53:34 +0700 Subject: [PATCH] Rename `BaseActiveRecord` to `AbstractActiveRecord` --- src/{BaseActiveRecord.php => AbstractActiveRecord.php} | 2 +- src/ActiveRecord.php | 2 +- src/Trait/ArrayableTrait.php | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) rename src/{BaseActiveRecord.php => AbstractActiveRecord.php} (99%) diff --git a/src/BaseActiveRecord.php b/src/AbstractActiveRecord.php similarity index 99% rename from src/BaseActiveRecord.php rename to src/AbstractActiveRecord.php index 74910b636..2cba5d96a 100644 --- a/src/BaseActiveRecord.php +++ b/src/AbstractActiveRecord.php @@ -40,7 +40,7 @@ * * See {@see ActiveRecord} for a concrete implementation. */ -abstract class BaseActiveRecord implements ActiveRecordInterface +abstract class AbstractActiveRecord implements ActiveRecordInterface { private array|null $oldAttributes = null; private array $related = []; diff --git a/src/ActiveRecord.php b/src/ActiveRecord.php index d2a254d78..5df15c5ff 100644 --- a/src/ActiveRecord.php +++ b/src/ActiveRecord.php @@ -92,7 +92,7 @@ * @template-implements ArrayAccess * @template-implements IteratorAggregate */ -class ActiveRecord extends BaseActiveRecord implements ArrayableInterface, ArrayAccess, IteratorAggregate +class ActiveRecord extends AbstractActiveRecord implements ArrayableInterface, ArrayAccess, IteratorAggregate { use ArrayableTrait; use ArrayAccessTrait; diff --git a/src/Trait/ArrayableTrait.php b/src/Trait/ArrayableTrait.php index ce9481ffc..91aa58ecb 100644 --- a/src/Trait/ArrayableTrait.php +++ b/src/Trait/ArrayableTrait.php @@ -5,7 +5,8 @@ namespace Yiisoft\ActiveRecord\Trait; use Closure; -use Yiisoft\ActiveRecord\BaseActiveRecord; +use Yiisoft\ActiveRecord\AbstractActiveRecord; +use Yiisoft\ActiveRecord\ActiveRecordInterface; use function array_combine; use function array_keys; @@ -14,10 +15,10 @@ * Trait to implement {@see \Yiisoft\Arrays\ArrayableTrait} interface for ActiveRecord. * * @method string[] attributes() - * @see BaseActiveRecord::attributes() + * @see ActiveRecordInterface::attributes() * * @method array getRelatedRecords() - * @see BaseActiveRecord::getRelatedRecords() + * @see AbstractActiveRecord::getRelatedRecords() */ trait ArrayableTrait {