Skip to content

Commit ad63445

Browse files
committed
Fix errors reported by psalm.
1 parent b0d9eff commit ad63445

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

Association/BelongsToMany.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -1452,25 +1452,25 @@ protected function _junctionTableName(?string $name = null): string
14521452
/**
14531453
* Parse extra options passed in the constructor.
14541454
*
1455-
* @param array $opts original list of options passed in constructor
1455+
* @param array $options original list of options passed in constructor
14561456
* @return void
14571457
*/
1458-
protected function _options(array $opts): void
1458+
protected function _options(array $options): void
14591459
{
1460-
if (!empty($opts['targetForeignKey'])) {
1461-
$this->setTargetForeignKey($opts['targetForeignKey']);
1460+
if (!empty($options['targetForeignKey'])) {
1461+
$this->setTargetForeignKey($options['targetForeignKey']);
14621462
}
1463-
if (!empty($opts['joinTable'])) {
1464-
$this->_junctionTableName($opts['joinTable']);
1463+
if (!empty($options['joinTable'])) {
1464+
$this->_junctionTableName($options['joinTable']);
14651465
}
1466-
if (!empty($opts['through'])) {
1467-
$this->setThrough($opts['through']);
1466+
if (!empty($options['through'])) {
1467+
$this->setThrough($options['through']);
14681468
}
1469-
if (!empty($opts['saveStrategy'])) {
1470-
$this->setSaveStrategy($opts['saveStrategy']);
1469+
if (!empty($options['saveStrategy'])) {
1470+
$this->setSaveStrategy($options['saveStrategy']);
14711471
}
1472-
if (isset($opts['sort'])) {
1473-
$this->setSort($opts['sort']);
1472+
if (isset($options['sort'])) {
1473+
$this->setSort($options['sort']);
14741474
}
14751475
}
14761476
}

Association/HasMany.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -637,16 +637,16 @@ public function defaultRowValue(array $row, bool $joined): array
637637
/**
638638
* Parse extra options passed in the constructor.
639639
*
640-
* @param array $opts original list of options passed in constructor
640+
* @param array $options original list of options passed in constructor
641641
* @return void
642642
*/
643-
protected function _options(array $opts): void
643+
protected function _options(array $options): void
644644
{
645-
if (!empty($opts['saveStrategy'])) {
646-
$this->setSaveStrategy($opts['saveStrategy']);
645+
if (!empty($options['saveStrategy'])) {
646+
$this->setSaveStrategy($options['saveStrategy']);
647647
}
648-
if (isset($opts['sort'])) {
649-
$this->setSort($opts['sort']);
648+
if (isset($options['sort'])) {
649+
$this->setSort($options['sort']);
650650
}
651651
}
652652

0 commit comments

Comments
 (0)