Update syntax for styleci (#1700)
This commit is contained in:
parent
67ff67a1bd
commit
513965dac7
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ abstract class Validable extends Model
|
||||||
public static function getRulesForUpdate($id, string $primaryKey = 'id')
|
public static function getRulesForUpdate($id, string $primaryKey = 'id')
|
||||||
{
|
{
|
||||||
if ($id instanceof Model) {
|
if ($id instanceof Model) {
|
||||||
list($primaryKey, $id) = [$id->getKeyName(), $id->getKey()];
|
[$primaryKey, $id] = [$id->getKeyName(), $id->getKey()];
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules = static::getRules();
|
$rules = static::getRules();
|
||||||
|
@ -118,7 +118,7 @@ abstract class Validable extends Model
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
list(, $args) = explode(':', $datum);
|
[, $args] = explode(':', $datum);
|
||||||
$args = explode(',', $args);
|
$args = explode(',', $args);
|
||||||
|
|
||||||
$datum = Rule::unique($args[0], $args[1] ?? $key)->ignore($id, $primaryKey)->__toString();
|
$datum = Rule::unique($args[0], $args[1] ?? $key)->ignore($id, $primaryKey)->__toString();
|
||||||
|
|
Loading…
Reference in a new issue