public function toArray(): array
    {
        if (!empty($this->warnings)) {
            $this->status = 'warning';
        } elseif (!empty($this->errors)) {
            $this->status = 'error';
        }

        return [
            'status' => $this->status,
            'errors' => array_merge(array_map(function($x) {
                return ['severity' => 'error', 'message' => $x];
            }, $this->errors), array_map(function($x) {
                return ['severity' => 'warning', 'message' => $x];
            }, $this->warnings)),
            'info' => $this->info
        ];
    }
public function toArray(): array
    {
        if (!empty($this->warnings)) {
            $this->status = 'warning';
        } elseif (!empty($this->errors)) {
            $this->status = 'error';
        }

        return [
            'status' => $this->status,
            'errors' => array_merge(array_map(function($x) {
                return ['severity' => 'error', 'message' => $x];
            }, $this->errors), array_map(function($x) {
                return ['severity' => 'warning', 'message' => $x];
            }, $this->warnings)),
            'info' => $this->info
        ];
    }
public function toArray ( ) : array { if ( ! empty ( $ this -> warnings ) ) { $ this -> status = 'warning' ; } elseif ( ! empty ( $ this -> errors ) ) { $ this -> status = 'error' ; } return [ 'status' => $ this -> status , 'errors' => array_merge ( array_map ( function ( $ x ) { return [ 'severity' => 'error' , 'message' => $ x ] ; } , $ this -> errors ) , array_map ( function ( $ x ) { return [ 'severity' => 'warning' , 'message' => $ x ] ; } , $ this -> warnings ) ) , 'info' => $ this -> info ] ; }
Convert check result to array

@return array
Convert check result to array