Update syntax for styleci (#1700)

This commit is contained in:
Lance Pioch 2019-09-23 15:30:51 -04:00 committed by Dane Everitt
parent 67ff67a1bd
commit 513965dac7

View file

@ -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();