The message activeRecord below is the leading example of code:
```
class Message extends ActiveRecord
{
	use BitmaskTrait;
	
	/**
	* You have 16 bits in a SMALLINT, 32 bits in INT, etc.
	* Use powers of two only:
	*
	* 	const STATUS_DELETED = 1;// 2^0
	* 	const STATUS_INACTIVE = 2;// 2^1
	* 	const STATUS_ACTIVE = 4;// 2^2
	* 	const STATUS_LOCKED = 8;// 2^3
	*
	* Expand later:
	*
	*	const STATUS_PASSWORD_EXPIRED = 16; // 2^4
	* etc.
	*/
	public const STATUS_UNREAD = 1;// 2^0
	public const STATUS_READ = 2;// 2^1
	public const STATUS_IMPORTANT = 4;
	public const STATUS_RESOLVED = 8;
	public const STATUS_SPAM = 16;
	public const STATUS_ARCHIVED = 32;
	public const STATUS_FLAGGED = 64;
	public const STATUS_REPLIED = 128;
	
	/**
	* Virtual attribute; used to interact with form checkboxes.
	* @var int[]|null
	*/
	private ?array $_statusArray = null;
	
	public function rules(): array
	{
		return [
			/**
			* Status
			*/
			['status', 'default', 'value' => self::STATUS_UNREAD],
			/**
			* ValidateStatus Status
			* if your model's status can be modified programmatically or by other 
			* means (e.g., via APIs, CLI, direct attribute assignment, or batch processes), then 
			* you need a final validation on the integer field itself, so calling validateStatus('status') is a 
			* good safety net.
			*
			* In your controller's action or wherever you save a Message, you can do this:
			*
			* 	$message->validateStatus('status');
			*	if ($message->hasErrors('status'))
			*	{
			*		// handle errors
			*	}
			*/
			['status', 'validateStatus'],
			['statusArray', 'safe'],// safe for mass assignment & form binding
			['statusArray', 'validateStatusArray'],
		]
	}
	
	/**
	* Validation for statusArray input from checkboxes.
	* @param string $attribute
	* @param array $params
	*
	* Note: Do NOT add parameter(s) type hints. This method overrides an interface 
	* without type hints on parameters, adding types will cause PHP compatibility errors. 
	* Only docblock types to indicate expected input types.
	*/
	public function validateStatusArray($attribute, $params = []): void
	{
		$values = $this->$attribute;
		
		if (!is_array($values))
		{
			$this->addError($attribute, 'Invalid status selection.');
			
			return;
		}
		
		$bitmask = $this->arrayToBitmask($values);
		
		/**
		* Note: array_sum works here because flags are powers of two,
		* but bitwise OR better reflects bitmask intent and is safer.
		*
		* 	$validFlags = array_sum(self::getStatusFlags()); 
		*/
		$validFlags = 0;
		
		// Combine flags using bitwise OR
		foreach (self::getStatusFlags() as $flag)
		{
			$validFlags |= $flag;
		}
		
		if (($bitmask & ~$validFlags) !== 0)
		{
			$this->addError($attribute, \Yii::t('app', 'Status contains invalid flags.'));
			
			return;
		}
		
		// Conflicting status checks:
		
		// Cannot be both UNREAD and READ
		if (($bitmask & self::STATUS_UNREAD) && ($bitmask & self::STATUS_READ))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both unread and read.'));
		}
		// Cannot be both IMPORTANT and RESOLVED
		if (($bitmask & self::STATUS_IMPORTANT) && ($bitmask & self::STATUS_RESOLVED))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both important and resolved.'));
		}
		// IMPORTANT conflicts with SPAM
		if (($bitmask & self::STATUS_IMPORTANT) && ($bitmask & self::STATUS_SPAM))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both important and spam.'));
		}
		// RESOLVED conflicts with SPAM
		if (($bitmask & self::STATUS_RESOLVED) && ($bitmask & self::STATUS_SPAM))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both resolved and spam.'));
		}
		// ARCHIVED conflicts with SPAM
		if (($bitmask & self::STATUS_ARCHIVED) && ($bitmask & self::STATUS_SPAM))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both archived and spam.'));
		}
	}
	
	/**
	* Validation for the raw status integer attribute (before save).
	* Validates possible invalid/unknown bits and conflicting combinations.
	* @param string $attribute
	* @param array $params
	*/
	public function validateStatus($attribute, $params = []): void
	{
		$statusVal = $this->$attribute;
		
		/**
		* Note: array_sum works here because flags are powers of two,
		* but bitwise OR better reflects bitmask intent and is safer.
		*
		* 	$validFlags = array_sum(self::getStatusFlags()); 
		*/
		$validFlags = 0;
		
		// Combine flags using bitwise OR
		foreach (self::getStatusFlags() as $flag)
		{
			$validFlags |= $flag;
		}
		
		// If any bit outside validFlags is set, invalid
		if (($statusVal & ~$validFlags) !== 0)
		{
			$this->addError($attribute, \Yii::t('app', 'Status contains invalid flags.'));
			
			return;
		}
		
		// Check conflicts same as validateStatusArray
		
		if (($statusVal & self::STATUS_UNREAD) && ($statusVal & self::STATUS_READ))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both unread and read.'));
		}
		if (($statusVal & self::STATUS_IMPORTANT) && ($statusVal & self::STATUS_RESOLVED))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both important and resolved.'));
		}
		if (($statusVal & self::STATUS_IMPORTANT) && ($statusVal & self::STATUS_SPAM))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both important and spam.'));
		}
		if (($statusVal & self::STATUS_RESOLVED) && ($statusVal & self::STATUS_SPAM))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both resolved and spam.'));
		}
		if (($statusVal & self::STATUS_ARCHIVED) && ($statusVal & self::STATUS_SPAM))
		{
			$this->addError($attribute, \Yii::t('app', 'Status cannot be both archived and spam.'));
		}
	}
	
	/**
	* Get all valid status flags.
	* @return int[]
	*/
	public static function getStatusFlags(): array
	{
		return [
			self::STATUS_UNREAD,
			self::STATUS_READ,
			self::STATUS_IMPORTANT,
			self::STATUS_RESOLVED,
			self::STATUS_SPAM,
			self::STATUS_ARCHIVED,
			self::STATUS_FLAGGED,
			self::STATUS_REPLIED
		];
	}
	
	/**
	* Get concatenated statuses as readable string for display.
	* @return string
	*/
	public function getStatusLabel(): string
	{
		$labels = [];
		
		foreach (self::getStatusLabels() as $flag => $label)
		{
			if ($this->hasStatus($flag))
			{
				$labels[] = $label;
			}
		}
		
		return !empty($labels) ? implode(', ', $labels) : \Yii::t('app', 'Unknown');
	}
	
	/**
	* Defensive getter for status with default.
	* @return int
	*/
	public function getStatus(): int
	{
		return $this->status ?? self::STATUS_UNREAD;
	}
	
	/**
	* Return status as array of active flags for checkbox inputs.
	* @return int[]
	*/
	public function getStatusForCheckboxes(): array
	{
		return $this->bitmaskToArray($this->getStatus(), self::getStatusFlags());
	}
	
	/**
	* Virtual status array getter - used for form checkbox binding.
	* @return int[]
	*/
	public function getStatusArray(): array
	{
		if ($this->_statusArray === null)
		{
			$this->_statusArray = $this->getStatusForCheckboxes();
		}
		
		return $this->_statusArray;
	}
	
	/**
	* Virtual status array setter - to be called by forms.
	* @param int[] $values
	*/
	public function setStatusArray(array $values): void
	{
		$this->_statusArray = $values;
		$this->status = $this->arrayToBitmask($values);
	}
	
	/**
	* Set the internal "status" bitmask from a list of flags.
	* Useful on form submit.
	* @param int[] $checkboxes
	*/
	public function setStatusFromCheckboxes(array $checkboxes): void
	{
		$this->status = $this->arrayToBitmask($checkboxes);
		$this->_statusArray = $checkboxes;
	}
	
	/**
	* Has Status
	* @param int $flag
	* @return bool
	*
	* Instead of calling hasStatus() twice in the if condition, you can directly 
	* check using a bitwise operation:
	*
	* 	$user = User::findOne($id);// Fetch the message with a specific ID.
	* 	if (($user->status & (User::STATUS_ACTIVE | User::STATUS_LOCKED)) === 
	*		(User::STATUS_ACTIVE | User::STATUS_LOCKED))
	*	{
	*
	*		echo "This product is inquire only.";
	*	}
	*
	* In this alternative approach:
	*
	* 	The expression User::STATUS_ACTIVE  | User::STATUS_LOCKED
	*	combines both statuses (using the bitwise OR).
	*
	* 	The condition checks if both statuses are set within the status field of 
	*	the message.
	*/
	public function hasStatus(int $flag): bool
	{
		return ($this->getStatus() & $flag) === $flag;
	}
	
	/**
	* Add Status
	* @param int $flag
	*
	* Set Statuses (make sure to save):
	*
	*	$user->addStatus(User::STATUS_ACTIVE);
	*	$user->save();// Save changes to the database.
	*/
	public function addStatus(int $flag): void
	{
		$this->status = ($this->getStatus() | $flag);
		$this->_statusArray = null;// reset cache
	}
	
	/**
	* Remove Status
	* @param int $flag
	*
	* Removing Statuses:
	*	
	*	$user->removeStatus(User::STATUS_ACTIVE);
	*/
	public function removeStatus(int $flag): void
	{
		$this->status = ($this->getStatus() & (~$flag));
		$this->_statusArray = null;// reset cache
	}
	
	/**
	* Get all active status flags of this order as an array.
	* Uses your BitmaskTrait for cleaner bit-wise operations.
	*
	* Example: [1, 4, 8]
	*/
	public function getActiveStatuses(): array
	{
		return $this->bitmaskToArray(
			$this->status ?? 0,
			array_keys(self::getStatusLabels())
		);
	}
	
	/**
	* Set status bitmask from an array of flags.
	* Example: [1, 4, 8]
	*/
	public function setStatusesFromArray(array $flags): void
	{
		$this->status = $this->arrayToBitmask($flags);
	}
	
	/**
	* Getter User Statuses
	* How to use:
	*
	*	$user->isActive();
	*/
	public function isUnread(): bool
	{
		return $this->hasStatus(self::STATUS_UNREAD);
	}
	
	public function isRead(): bool
	{
		return $this->hasStatus(self::STATUS_READ);
	}
	
	public function isImportant(): bool
	{
		return $this->hasStatus(self::STATUS_IMPORTANT);
	}
	
	public function isResolved(): bool
	{
		return $this->hasStatus(self::STATUS_RESOLVED);
	}
	
	public function isSpam(): bool
	{
		return $this->hasStatus(self::STATUS_SPAM);
	}
	
	public function isArchived(): bool
	{
		return $this->hasStatus(self::STATUS_ARCHIVED);
	}
	
	public function isFlagged(): bool
	{
		return $this->hasStatus(self::STATUS_FLAGGED);
	}
	
	public function isReplied(): bool
	{
		return $this->hasStatus(self::STATUS_REPLIED);
	}
	
	/**
	* Setters User Statuses
	* How to use:
	*
	*	$user->activateAccount();
	*/
	public function setUnread(): void
	{
		$this->addStatus(self::STATUS_UNREAD);
	}
	
	public function setRead(): void
	{
		$this->addStatus(self::STATUS_READ);
	}
	public function setImportant(): void
	{
		$this->addStatus(self::STATUS_IMPORTANT);
	}
	
	public function setResolved(): void
	{
		$this->addStatus(self::STATUS_RESOLVED);
	}
	
	public function setSpam(): void
	{
		$this->addStatus(self::STATUS_SPAM);
	}
	public function setArchived(): void
	{
		$this->addStatus(self::STATUS_ARCHIVED);
	}
	
	public function setFlagged(): void
	{
		$this->addStatus(self::STATUS_FLAGGED);
	}
	
	public function setReplied(): void
	{
		$this->addStatus(self::STATUS_REPLIED);
	}
}

<?php
declare(strict_types=1);

namespace app\components\traits;

trait BitmaskTrait
{
	/**
	* Convert integer bitmask to array of individual flags.
	* @param int $bitmask The bitmask integer.
	* @param int[] $allFlags List of all possible flags.
	* @return int[] Array of flags present in bitmask.
	*/
	public function bitmaskToArray(int $bitmask, array $allFlags): array
	{
		$flags = [];
		
		foreach ($allFlags as $flag)
		{
			if (($bitmask & $flag) === $flag)
			{
				$flags[] = $flag;
			}
		}
		
		return $flags;
	}
	
	/**
	* Convert array of flags to integer bitmask.
	* @param int[] $flags Array of flags.
	* @return int Combined bitmask integer.
	*/
	public function arrayToBitmask(array $flags): int
	{
		$bitmask = 0;
		
		foreach ($flags as $flag)
		{
			$bitmask |= (int) $flag;
		}
		
		return $bitmask;
	}
}
```

how status is used and I want to update/refactor, add to User activeRecord and do the same
```
class User extends ActiveRecord implements IdentityInterface, IpRateLimitInterface
{
	use BitmaskTrait;
	
	/**
	* You have 16 bits in a SMALLINT, 32 bits in INT, etc.
	* Use powers of two only:
	*
	* 	const STATUS_DELETED = 1;// 2^0
	* 	const STATUS_INACTIVE = 2;// 2^1
	* 	const STATUS_ACTIVE = 4;// 2^2
	* 	const STATUS_LOCKED = 8;// 2^3
	*
	* Expand later:
	*
	*	const STATUS_PASSWORD_EXPIRED = 16; // 2^4
	* etc.
	*/
	public const STATUS_DELETED = 1;// 2^0
	public const STATUS_INACTIVE = 2;// 2^1
	public const STATUS_ACTIVE = 4;
	public const STATUS_LOCKED  = 8;
	public const STATUS_BOT = 16;
	
	/**
	* Virtual attribute; used to interact with form checkboxes.
	* @var int[]|null
	*/
	private ?array $_statusArray = null;
	
	public function rules(): array
	{
		return [
			/**
			* Status
			*/
			['status', 'default', 'value' => self::STATUS_INACTIVE],
			/**
			* ValidateStatus Status
			* if your model's status can be modified programmatically or by other 
			* means (e.g., via APIs, CLI, direct attribute assignment, or batch processes), then 
			* you need a final validation on the integer field itself, so calling validateStatus('status') is a 
			* good safety net.
			*
			* In your controller's action or wherever you save a Message, you can do this:
			*
			* 	$message->validateStatus('status');
			*	if ($message->hasErrors('status'))
			*	{
			*		// handle errors
			*	}
			*/
			['statusArray', 'safe'],// safe for mass assignment & form binding
			['status', 'validateStatusArray'],
		];
	}
	
	/**
	* Validation for statusArray input from checkboxes.
	* @param string $attribute
	* @param array $params
	*
	* Note: Do NOT add parameter(s) type hints. This method overrides an interface 
	* without type hints on parameters, adding types will cause PHP compatibility errors. 
	* Only docblock types to indicate expected input types.
	*/
	public function validateStatus($attribute, $params = []): void
	{
		$validFlags = self::STATUS_DELETED | self::STATUS_INACTIVE | self::STATUS_ACTIVE | 
			self::STATUS_LOCKED;
		
		// If any bit outside validFlags is set, invalid
		if (($this->$attribute & ~$validFlags) !== 0)
		{
			$this->addError($attribute, 'Status contains invalid flags.');
			
			return;
		}
		
		// Deleted must be exclusive (only DELETED bit set)
		if ($this->isDeleted() && $this->status !== self::STATUS_DELETED)
		{
			$this->addError($attribute, 'Deleted user cannot have other statuses.');
		}
		
		// Active and Inactive cannot coexist
		if ($this->isActive() && $this->isInactive())
		{
			$this->addError($attribute, 'User cannot be both active and inactive.');
		}
		
		// If not deleted, must be either active or inactive (one of those)
		if (!$this->isDeleted() && !($this->isActive() || $this->isInactive()))
		{
			$this->addError($attribute, 'User must be either active or inactive if not deleted.');
		}
		
		// Locked can only exist combined with active or inactive
		if ($this->isLocked() && !($this->isActive() || $this->isInactive()))
		{
			$this->addError($attribute, 'Locked status must be combined with active or inactive.');
		}
	}
	
	/**
	* Get all valid status flags.
	* @return int[]
	*/
	public static function getStatusFlags(): array
	{
		return [
			self::STATUS_DELETED,
			self::STATUS_INACTIVE,
			self::STATUS_ACTIVE,
			self::STATUS_LOCKED,
			self::STATUS_BOT
		];
	}
	
	/**
	* Status Labels
	* @see app\views\user
	* @return array
	*/
	public static function getStatusLabels(): array
	{
		return [
			self::STATUS_BOT => \Yii::t('app', 'Bot'),
			self::STATUS_LOCKED => \Yii::t('app', 'Locked'),
			self::STATUS_DELETED => \Yii::t('app', 'Deleted'),
			self::STATUS_INACTIVE => \Yii::t('app', 'Inactive'),
			self::STATUS_ACTIVE => \Yii::t('app', 'Active'),
		];
	}
	
	/**
	* Get Status Label
	* @return string
	* Returns a comma-separated string of all active statuses.
	*
	* How to use these in dropdown to select a single status 
	* flag (no bitmask), you can use this in your form:
	*
	*	<?= $form->field($model, 'status')->dropDownList(
	*		User::getStatusLabels(),
	*		['prompt' => Yii::t('app', 'Select Status')]
	*	); ?>
	*
	* How to display the current user's status label?
	* 
	*	// e.g. displays: "Active" OR "Active, Locked"
	*	echo $user->getStatusLabel();
	*/
	public function getStatusLabel(): string
	{
		$labels = [];
		foreach (self::getStatusLabels() as $bit => $label)
		{
			if ($this->hasStatus($bit))
			{
				$labels[] = $label;
			}
		}
		
		return empty($labels) ? \Yii::t('app', 'Unknown') : implode(', ', $labels);
	}
	
	/**
	* Get Status List
	* @return string The label for the current type. If the type is valid, it 
	* returns the corresponding label from the type list.
	*
	* Example below on how to use:
	*
	*	$form = ActiveForm::begin();
	*	<?= $form->field($model, 'type')->dropDownList(
	*		Message::getStatusList(),
	*		['prompt' => 'Select Type']
	*	); ?>
	*/
	public function getStatusList(): string
	{
		$statuses = self::getStatusLabels();
		
		if (array_key_exists($this->status, $statuses))
		{
			return $statuses[$this->status];
		}
		
		return \Yii::t('app', 'Unknown');
	}
	
	/**
	* Get Status for Checkboxes
	* @return array An array
	*
	* This method checks the current status of the message using bitwise operations.
	* It constructs an array of statuses that are currently active while enforcing business rules
	* to avoid conflicts between certain statuses (e.g., a message cannot be both Unread and Read).
	*/
	public function getStatusForCheckboxes(): array
	{
		// Deleted is exclusive - if set, return Deleted only
		if ($this->hasStatus(self::STATUS_DELETED))
		{
			return [self::STATUS_DELETED];
		}
		
		$activeOptions = [];
		
		// Check for either Active or Inactive, only one allowed due to validation
		if ($this->hasStatus(self::STATUS_ACTIVE))
		{
			$activeOptions[] = self::STATUS_ACTIVE;
		}
		elseif ($this->hasStatus(self::STATUS_INACTIVE))
		{
			$activeOptions[] = self::STATUS_INACTIVE;
		}
		
		// Locked can appear with Active or Inactive
		if (!empty($activeOptions) && $this->hasStatus(self::STATUS_LOCKED))
		{
			$activeOptions[] = self::STATUS_LOCKED;
		}
			
		return $activeOptions;
	}
	
	/**
	* Set Status from Checkboxes
	* @param array $checkboxes An array of selected status values (integers)
	*	from the checkbox inputs. Each value corresponds 
	*	 to a defined status constant.
	*
	* This method takes an array of status values that have been selected through 
	* a form with checkboxes. It resets the current status to zero and then 
	* adds each of the selected statuses to the message status using bitwise 
	* OR operation. This allows for multiple statuses to coexist.
	*
	* After this call, the model's status will reflect the combination of 'unread' and 'important'. 
	* Example usage:
	*
	*	$form = ActiveForm::begin();
	*	echo $form->field($model, 'status')->checkboxList($model->getStatusOptions());
	*
	*	$model = new Message();
	*	if ($model->load(Yii::$app->request->post())) {
	* 		// Handling the checkboxes directly using the defined method.
        *		$model->setStatusFromCheckboxes(\Yii::$app->request->post('Message')['status'] ?? []);
        *	}
	*/
	public function setStatusFromCheckboxes(array $checkboxes): void
	{
		$this->status = 0;
		foreach ($checkboxes as $value)
		{
			$this->addStatus((int) $value);
		}
	}
	
	/**
	* Has Status
	* @param int $flag
	* @return bool
	*
	* For example, if the current status is 5 (00101) and we check for
	* the "Unread" status (1 or 00001), the function will return true, since 
	* the bit is set. Conversely, checking for the "Spam" status (16 or 10000)
	* will return false, as that bit is not set in this case.
	*
	* Instead of calling hasStatus() twice in the if condition, you can directly 
	* check using a bitwise operation:
	*
	* 	$user = User::findOne($id);// Fetch the message with a specific ID.
	* 	if (($user->status & (User::STATUS_ACTIVE | User::STATUS_LOCKED)) === 
	*		(User::STATUS_ACTIVE | User::STATUS_LOCKED))
	*	{
	*
	*		echo "This product is inquire only.";
	*	}
	*
	* In this alternative approach:
	*
	* 	The expression User::STATUS_ACTIVE  | User::STATUS_LOCKED
	*	combines both statuses (using the bitwise OR).
	*
	* 	The condition checks if both statuses are set within the status field of 
	*	the message.
	**
	* Original one line code:
	*
	*	return ($this->status & $flag) === $flag;
	*/
	public function hasStatus(int $flag): bool
	{
		$result = ($this->status & $flag) === $flag;
		
		if ($this->_debugMode)
		{
			LogHelper::debug(sprintf(
					'Checking status flag %d on status %d: result = %s',
					$flag,
					$this->status,
					$result ? 'true' : 'false'
				), [
				'flag' => $flag,
				'new status' => $this->status,
				'results' => $result,
				'method' => __METHOD__
			]);
		}
		
		return $result;
	}
	
	/**
	* Add Status
	* @param int $flag
	*
	* For example, if the current status is 1 (00001) and we want to add
	* the status for "Important" (which is 4 or 00100), the resulting
	* status will be 5 (00101).
	*
	* Set Statuses (make sure to save):
	*
	*	$user->addStatus(User::STATUS_ACTIVE);
	*	$user->save();// Save changes to the database.
	*
	**
	* Original one line code:
	*
	*	$this->status |= $flag;
	*/
	public function addStatus(int $flag): void
	{
		$oldStatus = $this->status;
		
		$this->status |= $flag;
		
		if ($this->_debugMode)
		{
			LogHelper::debug(sprintf(
					'Added status flag %d: status changed from %d to %d',
					$flag,
					$oldStatus,
					$this->status
				), [
				'flag' => $flag,
				'old status' => $oldStatus,
				'new status' => $this->status,
				'method' => __METHOD__
			]);
		}
	}
	
	/**
	* Remove Status
	* @param int $flag
	*
	* For example, if the current status is 5 (00101) and we want to remove 
	* the "Unread" status (1 or 00001), the resulting status will change to
	* 4 (00100).
	*
	* Removing Statuses:
	*	
	*	$user->removeStatus(User::STATUS_ACTIVE);
	**
	* Original one line code:
	*
	*	$this->status &= ~$flag;
	*/
	public function removeStatus(int $flag): void
	{
		$oldStatus = $this->status;
		
		$this->status &= ~$flag;
		
		if ($this->_debugMode)
		{
			LogHelper::debug(sprintf(
					'Removed status flag %d: status changed from %d to %d',
					$flag,
					$oldStatus,
					$this->status
				), [
				'flag' => $flag,
				'old status' => $oldStatus,
				'new status' => $this->status,
				'method' => __METHOD__
			]);
		}
	}
	
	/**
	* Getter User Statuses
	* How to use:
	*
	*	$user->isActive();
	*/
	public function isDeleted(): bool
	{
		return $this->hasStatus(self::STATUS_DELETED);
	}
	
	public function isInactive(): bool
	{
		return $this->hasStatus(self::STATUS_INACTIVE);
	}
	
	public function isActive(): bool
	{
		return $this->hasStatus(self::STATUS_ACTIVE);
	}
	
	public function isLocked(): bool
	{
		return $this->hasStatus(self::STATUS_LOCKED);
	}
	
	/**
	* Setters User Statuses
	* How to use:
	*
	*	$user->activateAccount();
	*
	* Note: Delete status is exclusive and clears all other flags.
	**
	* Original code:
	*
	*	$this->status = self::STATUS_DELETED;
	*/
	public function deleteAccount(): void
	{
		$oldStatus = $this->status;
		$this->status = self::STATUS_DELETED;
		
		if ($this->_debugMode)
		{
			LogHelper::debug(sprintf(
					'Account deleted: status changed from %d to %d',
					$oldStatus,
					$this->status
				), [
				'old status' => $oldStatus,
				'new status' => $this->status,
				'method' => __METHOD__
			]);
		}
	}
	
	/**
	* Original code:
	*
	*	$this->addStatus(self::STATUS_ACTIVE);
	*	$this->removeStatus(self::STATUS_INACTIVE);
	*/
	public function activateAccount(): void
	{
		$oldStatus = $this->status;
		
		$this->addStatus(self::STATUS_ACTIVE);
		$this->removeStatus(self::STATUS_INACTIVE);
		
		if ($this->_debugMode)
		{
			LogHelper::debug(sprintf(
					'Account activated: status changed from %d to %d',
					$oldStatus,
					$this->status
				), [
				'old status' => $oldStatus,
				'new status' => $this->status,
				'method' => __METHOD__
			]);
		}
	}
	
	/**
	* Original code:
	*
	*	$this->addStatus(self::STATUS_INACTIVE);
	*	$this->removeStatus(self::STATUS_ACTIVE);
	*/
	public function deactivateAccount(): void
	{
		$oldStatus = $this->status;
		
		$this->addStatus(self::STATUS_INACTIVE);
		$this->removeStatus(self::STATUS_ACTIVE);
		
		if ($this->_debugMode)
		{
			LogHelper::debug(sprintf(
					'Account deactivated: status changed from %d to %d',
					$oldStatus,
					$this->status
				), [
				'old status' => $oldStatus,
				'new status' => $this->status,
				'method' => __METHOD__
			]);
		}
	}
	
	/**
	* Original code:
	*
	*	if (!$this->isDeleted())
	*	{
	*		$this->addStatus(self::STATUS_LOCKED);
	*	}
	*/
	public function lockAccount(): void
	{
		if (!$this->isDeleted())
		{
			$oldStatus = $this->status;
			
			$this->addStatus(self::STATUS_LOCKED);
			
			if ($this->_debugMode)
			{
				LogHelper::debug(sprintf(
						'Account locked: status changed from %d to %d',
						$oldStatus,
						$this->status
					), [
					'old status' => $oldStatus,
					'new status' => $this->status,
					'method' => __METHOD__
				]);
			}
		}
		elseif ($this->_debugMode)
		{
			LogHelper::debug('Attempt to lock a deleted account ignored.', __METHOD__);
		}
	}
	
	/**
	* Original code:
	*
	*	$this->removeStatus(self::STATUS_LOCKED);
	*/
	public function unlockAccount(): void
	{
		$oldStatus = $this->status;
		
		$this->removeStatus(self::STATUS_LOCKED);
		
		if ($this->_debugMode)
		{
			LogHelper::debug(sprintf(
					'Account unlocked: status changed from %d to %d',
					$oldStatus,
					$this->status
				), [
				'old status' => $oldStatus,
				'new status' => $this->status,
				'method' => __METHOD__
			]);
		}
	}
}
```
Please look over the code and help with this task