Style fixes.
This commit is contained in:
parent
a7a59b690a
commit
8b44550f06
42 changed files with 186 additions and 148 deletions
|
|
@ -44,10 +44,10 @@ class RandomId extends Behavior implements BehaviorInterface
|
|||
*/
|
||||
public function notify($type, \Phalcon\Mvc\ModelInterface $model)
|
||||
{
|
||||
switch($type) {
|
||||
case 'beforeValidationOnCreate' :
|
||||
$this->generateId($model);
|
||||
break;
|
||||
switch ($type) {
|
||||
case 'beforeValidationOnCreate':
|
||||
$this->generateId($model);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ class RandomId extends Behavior implements BehaviorInterface
|
|||
if ($model->$field === null) {
|
||||
|
||||
$random = new \Phalcon\Security\Random();
|
||||
for($i = 0; $i < 3; $i++) {
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
$id = substr($random->base64Safe(), 0, $len);
|
||||
|
||||
$count = $model->count(array(
|
||||
|
|
|
|||
Reference in a new issue