Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base models, and do so with each "make composerupdate" #351

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ composershow:
composerupdate:
docker compose run --rm cli composer update
make composershow
make basemodels

db:
docker compose up -d db
Expand Down
4 changes: 2 additions & 2 deletions application/common/models/EmailLogBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function rules()
[['user_id'], 'integer'],
[['message_type'], 'string'],
[['sent_utc'], 'safe'],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id']],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::class, 'targetAttribute' => ['user_id' => 'id']],
];
}

Expand All @@ -58,6 +58,6 @@ public function attributeLabels()
*/
public function getUser()
{
return $this->hasOne(User::className(), ['id' => 'user_id']);
return $this->hasOne(User::class, ['id' => 'user_id']);
}
}
4 changes: 2 additions & 2 deletions application/common/models/InviteBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function rules()
[['user_id'], 'integer'],
[['created_utc', 'expires_on'], 'safe'],
[['uuid'], 'string', 'max' => 36],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id']],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::class, 'targetAttribute' => ['user_id' => 'id']],
];
}

Expand All @@ -60,6 +60,6 @@ public function attributeLabels()
*/
public function getUser()
{
return $this->hasOne(User::className(), ['id' => 'user_id']);
return $this->hasOne(User::class, ['id' => 'user_id']);
}
}
4 changes: 2 additions & 2 deletions application/common/models/MethodBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function rules()
[['uid'], 'unique'],
[['user_id', 'value'], 'unique', 'targetAttribute' => ['user_id', 'value']],
[['verification_code'], 'unique'],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id']],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::class, 'targetAttribute' => ['user_id' => 'id']],
];
}

Expand Down Expand Up @@ -73,6 +73,6 @@ public function attributeLabels()
*/
public function getUser()
{
return $this->hasOne(User::className(), ['id' => 'user_id']);
return $this->hasOne(User::class, ['id' => 'user_id']);
}
}
4 changes: 2 additions & 2 deletions application/common/models/MfaBackupcodeBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function rules()
[['mfa_id'], 'integer'],
[['created_utc', 'expires_utc'], 'safe'],
[['value'], 'string', 'max' => 255],
[['mfa_id'], 'exist', 'skipOnError' => true, 'targetClass' => Mfa::className(), 'targetAttribute' => ['mfa_id' => 'id']],
[['mfa_id'], 'exist', 'skipOnError' => true, 'targetClass' => Mfa::class, 'targetAttribute' => ['mfa_id' => 'id']],
];
}

Expand All @@ -60,6 +60,6 @@ public function attributeLabels()
*/
public function getMfa()
{
return $this->hasOne(Mfa::className(), ['id' => 'mfa_id']);
return $this->hasOne(Mfa::class, ['id' => 'mfa_id']);
}
}
10 changes: 5 additions & 5 deletions application/common/models/MfaBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function rules()
[['created_utc', 'last_used_utc'], 'safe'],
[['external_uuid', 'label'], 'string', 'max' => 64],
[['key_handle_hash'], 'string', 'max' => 255],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id']],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::class, 'targetAttribute' => ['user_id' => 'id']],
];
}

Expand Down Expand Up @@ -73,7 +73,7 @@ public function attributeLabels()
*/
public function getMfaBackupcodes()
{
return $this->hasMany(MfaBackupcode::className(), ['mfa_id' => 'id']);
return $this->hasMany(MfaBackupcode::class, ['mfa_id' => 'id']);
}

/**
Expand All @@ -83,7 +83,7 @@ public function getMfaBackupcodes()
*/
public function getMfaFailedAttempts()
{
return $this->hasMany(MfaFailedAttempt::className(), ['mfa_id' => 'id']);
return $this->hasMany(MfaFailedAttempt::class, ['mfa_id' => 'id']);
}

/**
Expand All @@ -93,7 +93,7 @@ public function getMfaFailedAttempts()
*/
public function getMfaWebauthns()
{
return $this->hasMany(MfaWebauthn::className(), ['mfa_id' => 'id']);
return $this->hasMany(MfaWebauthn::class, ['mfa_id' => 'id']);
}

/**
Expand All @@ -103,6 +103,6 @@ public function getMfaWebauthns()
*/
public function getUser()
{
return $this->hasOne(User::className(), ['id' => 'user_id']);
return $this->hasOne(User::class, ['id' => 'user_id']);
}
}
4 changes: 2 additions & 2 deletions application/common/models/MfaFailedAttemptBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function rules()
[['mfa_id', 'at_utc'], 'required'],
[['mfa_id'], 'integer'],
[['at_utc'], 'safe'],
[['mfa_id'], 'exist', 'skipOnError' => true, 'targetClass' => Mfa::className(), 'targetAttribute' => ['mfa_id' => 'id']],
[['mfa_id'], 'exist', 'skipOnError' => true, 'targetClass' => Mfa::class, 'targetAttribute' => ['mfa_id' => 'id']],
];
}

Expand All @@ -55,6 +55,6 @@ public function attributeLabels()
*/
public function getMfa()
{
return $this->hasOne(Mfa::className(), ['id' => 'mfa_id']);
return $this->hasOne(Mfa::class, ['id' => 'mfa_id']);
}
}
4 changes: 2 additions & 2 deletions application/common/models/MfaWebauthnBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function rules()
[['created_utc', 'last_used_utc'], 'safe'],
[['key_handle_hash'], 'string', 'max' => 255],
[['label'], 'string', 'max' => 64],
[['mfa_id'], 'exist', 'skipOnError' => true, 'targetClass' => Mfa::className(), 'targetAttribute' => ['mfa_id' => 'id']],
[['mfa_id'], 'exist', 'skipOnError' => true, 'targetClass' => Mfa::class, 'targetAttribute' => ['mfa_id' => 'id']],
];
}

Expand All @@ -63,6 +63,6 @@ public function attributeLabels()
*/
public function getMfa()
{
return $this->hasOne(Mfa::className(), ['id' => 'mfa_id']);
return $this->hasOne(Mfa::class, ['id' => 'mfa_id']);
}
}
2 changes: 1 addition & 1 deletion application/common/models/PasswordBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ public function attributeLabels()
*/
public function getUsers()
{
return $this->hasMany(User::className(), ['current_password_id' => 'id']);
return $this->hasMany(User::class, ['current_password_id' => 'id']);
}
}
12 changes: 6 additions & 6 deletions application/common/models/UserBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function rules()
[['employee_id'], 'unique'],
[['username'], 'unique'],
[['email'], 'unique'],
[['current_password_id'], 'exist', 'skipOnError' => true, 'targetClass' => Password::className(), 'targetAttribute' => ['current_password_id' => 'id']],
[['current_password_id'], 'exist', 'skipOnError' => true, 'targetClass' => Password::class, 'targetAttribute' => ['current_password_id' => 'id']],
];
}

Expand Down Expand Up @@ -109,7 +109,7 @@ public function attributeLabels()
*/
public function getCurrentPassword()
{
return $this->hasOne(Password::className(), ['id' => 'current_password_id']);
return $this->hasOne(Password::class, ['id' => 'current_password_id']);
}

/**
Expand All @@ -119,7 +119,7 @@ public function getCurrentPassword()
*/
public function getEmailLogs()
{
return $this->hasMany(EmailLog::className(), ['user_id' => 'id']);
return $this->hasMany(EmailLog::class, ['user_id' => 'id']);
}

/**
Expand All @@ -129,7 +129,7 @@ public function getEmailLogs()
*/
public function getInvites()
{
return $this->hasMany(Invite::className(), ['user_id' => 'id']);
return $this->hasMany(Invite::class, ['user_id' => 'id']);
}

/**
Expand All @@ -139,7 +139,7 @@ public function getInvites()
*/
public function getMethods()
{
return $this->hasMany(Method::className(), ['user_id' => 'id']);
return $this->hasMany(Method::class, ['user_id' => 'id']);
}

/**
Expand All @@ -149,6 +149,6 @@ public function getMethods()
*/
public function getMfas()
{
return $this->hasMany(Mfa::className(), ['user_id' => 'id']);
return $this->hasMany(Mfa::class, ['user_id' => 'id']);
}
}