public function getStatus()
    {
        $status = self::STATUS_OK;

        foreach ($this->getItems() as $item) {
            if ($item->getStatus() === self::STATUS_ERROR) {
                return self::STATUS_ERROR;
            }

            if ($item->getStatus() === self::STATUS_WARNING) {
                $status = self::STATUS_WARNING;
            }
        }

        return $status;
    }
public function getStatus()
    {
        $status = self::STATUS_OK;

        foreach ($this->getItems() as $item) {
            if ($item->getStatus() === self::STATUS_ERROR) {
                return self::STATUS_ERROR;
            }

            if ($item->getStatus() === self::STATUS_WARNING) {
                $status = self::STATUS_WARNING;
            }
        }

        return $status;
    }
public function getStatus ( ) { $ status = self :: STATUS_OK ; foreach ( $ this -> getItems ( ) as $ item ) { if ( $ item -> getStatus ( ) === self :: STATUS_ERROR ) { return self :: STATUS_ERROR ; } if ( $ item -> getStatus ( ) === self :: STATUS_WARNING ) { $ status = self :: STATUS_WARNING ; } } return $ status ; }
Returns the worst status of the items.

@return string One of the `STATUS_*` constants.
Returns the worst status of the items .