AttributeTypecastBehavior::class, 'attributeTypes' => [ 'is_approved' => AttributeTypecastBehavior::TYPE_BOOLEAN, ], 'typecastAfterSave' => true, 'typecastAfterFind' => true, ], ]; } public function getClient(): OauthClientQuery { /** @noinspection PhpIncompatibleReturnTypeInspection */ return $this->hasOne(OauthClient::class, ['id' => 'client_id']); } }