public function toArray(): array
    {
        if (empty($this->output)) {
            $problem = [
                'type' => $this->type ? (string)$this->type : 'about:blank'
            ];
            if ($this->title) {
                $problem['title'] = $this->title;
            }
            if ($this->status) {
                $problem['status'] = $this->status;
            }
            if ($this->detail) {
                $problem['detail'] = $this->detail;
            }
            if ($this->instance) {
                $problem['instance'] = (string)$this->instance;
            }
            $this->output = array_merge($problem, $this->extensions);
        }
        return $this->output;
    }
public function toArray(): array
    {
        if (empty($this->output)) {
            $problem = [
                'type' => $this->type ? (string)$this->type : 'about:blank'
            ];
            if ($this->title) {
                $problem['title'] = $this->title;
            }
            if ($this->status) {
                $problem['status'] = $this->status;
            }
            if ($this->detail) {
                $problem['detail'] = $this->detail;
            }
            if ($this->instance) {
                $problem['instance'] = (string)$this->instance;
            }
            $this->output = array_merge($problem, $this->extensions);
        }
        return $this->output;
    }
public function toArray ( ) : array { if ( empty ( $ this -> output ) ) { $ problem = [ 'type' => $ this -> type ? ( string ) $ this -> type : 'about:blank' ] ; if ( $ this -> title ) { $ problem [ 'title' ] = $ this -> title ; } if ( $ this -> status ) { $ problem [ 'status' ] = $ this -> status ; } if ( $ this -> detail ) { $ problem [ 'detail' ] = $ this -> detail ; } if ( $ this -> instance ) { $ problem [ 'instance' ] = ( string ) $ this -> instance ; } $ this -> output = array_merge ( $ problem , $ this -> extensions ) ; } return $ this -> output ; }
Gets a serializable representation of this problem.

@return array<string,mixed> This problem detail as an associative array
Gets a serializable representation of this problem .