optimization, break early

This commit is contained in:
Sebastien Barre 2017-03-25 09:30:34 -04:00
parent 02a946b17b
commit e285df4f82

View file

@ -617,6 +617,7 @@ class CakeSchema extends CakeObject {
foreach ($fields as $value) {
if (isset($value['key']) && $value['key'] === 'primary') {
$hasPrimaryAlready = true;
break;
}
}