active-record icon indicating copy to clipboard operation
active-record copied to clipboard

Remove flag arguments from AR methods

Open Tigrov opened this issue 1 year ago • 0 comments

  • [ ] ActiveRecordInterface::getOldPrimaryKey(bool $asArray = false) split to

    • getOldPrimaryKey(): mixed equals to ActiveRecordInterface::getOldPrimaryKey(false)
    • getOldPrimaryKeys(): array equals to ActiveRecordInterface::getOldPrimaryKey(true)
  • [ ] ActiveRecordInterface::getPrimaryKey(bool $asArray = false) split to

    • getPrimaryKey(): mixed equals to ActiveRecordInterface::getPrimaryKey(false)
    • getPrimaryKeys(): array equals to ActiveRecordInterface::getPrimaryKey(true)
  • [x] BaseActiveRecord::isAttributeChanged(string $name, bool $identical = true) split to

    • isAttributeChanged(string $name) equals to BaseActiveRecord::isAttributeChanged(string $name, true)
    • isAttributeChangedEqual(string $name) equals to BaseActiveRecord::isAttributeChanged(string $name, false)

This removes extra check for these methods.

Tigrov avatar Jan 02 '24 09:01 Tigrov