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']); } /** * Previously the RBAC permissions names were stored instead of the public scopes names, * so the scopes are normalized on read. * * @return list */ public function getScopes(): array { return ScopesMapper::normalizeScopes((array)$this->scopes); } }