-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,7 @@ abstract class ActiveRecord | |
* It is preferable to use this method instead of the constructor because | ||
* it uses ORM services to create the entity. | ||
* | ||
* Equals to calling {@see ORMInterface::make()}. | ||
* | ||
* @param array<non-empty-string, mixed> $data An associative array where keys are property names | ||
* and values are property values. | ||
* @note Equals to calling {@see ORMInterface::make()}. | ||
* | ||
* Example: | ||
* | ||
|
@@ -35,6 +32,9 @@ abstract class ActiveRecord | |
* 'email' => '[email protected]', | ||
* ]); | ||
* ``` | ||
* | ||
* @param array<non-empty-string, mixed> $data An associative array where keys are property names | ||
* and values are property values. | ||
*/ | ||
public static function make(array $data): static | ||
{ | ||
|
@@ -51,6 +51,8 @@ final public static function findByPK(mixed $primaryKey): ?static | |
|
||
/** | ||
* Finds the first single record based on the given scope. | ||
* | ||
* @note Limit of 1 will be added to the query. | ||
*/ | ||
final public static function findOne(array $scope = []): ?static | ||
{ | ||
|