id = (int) $this->id; // F032 — B18 defensive cast. Post-migration invariant: server_id is NEVER NULL. $this->server_id = (int) $this->server_id; $this->user_id = (int) $this->user_id; $this->used = (int) $this->used; } /** * @return array */ public function to_array(): array { return array( 'id' => $this->id, 'code_hash' => $this->code_hash, 'client_id' => $this->client_id, 'server_id' => $this->server_id, 'user_id' => $this->user_id, 'redirect_uri' => $this->redirect_uri, 'code_challenge' => $this->code_challenge, 'code_challenge_method' => $this->code_challenge_method, 'scope' => $this->scope, 'resource' => $this->resource, 'used' => $this->used, 'expires_at' => $this->expires_at, 'created_at' => $this->created_at, ); } }