Skip to content

Commit

Permalink
PHP Linting (Pint) - Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi authored and github-actions[bot] committed Jan 7, 2024
1 parent 9cdc466 commit c493ad1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Classes/AbstractRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ protected function prepareModel(string $modelClass): void
$model->bindEvent('model.setAttribute', [$this, 'setModelAttribute']);

foreach ([
'beforeCreate', 'afterCreate',
'beforeUpdate', 'afterUpdate',
'beforeSave', 'afterSave',
'beforeDelete', 'afterDelete',
] as $method) {
'beforeCreate', 'afterCreate',
'beforeUpdate', 'afterUpdate',
'beforeSave', 'afterSave',
'beforeDelete', 'afterDelete',
] as $method) {
$model->bindEvent('model.'.$method, function () use ($model, $method) {
if (method_exists($this, $method)) {
$this->$method($model);
Expand Down Expand Up @@ -286,9 +286,9 @@ protected function setModelAttributes($model, $saveData)
}

$isNested = ($attribute == 'pivot' || (
$model->hasRelation($attribute) &&
in_array($model->getRelationType($attribute), $singularTypes)
));
$model->hasRelation($attribute) &&
in_array($model->getRelationType($attribute), $singularTypes)
));

if ($isNested && is_array($value) && $model->{$attribute}) {
$this->setModelAttributes($model->{$attribute}, $value);
Expand Down

0 comments on commit c493ad1

Please sign in to comment.