private function resolveCurrentDevice()
    {
        if (0 == $viewportWidth = $this->editor->getViewportWidth()) {
            throw new RuntimeException('Unexpected editor viewport width.');
        }

        foreach (static::getDevices() as $device => $config) {
            if ($viewportWidth >= $config['max']) {
                return $device;
            }
        }

        return static::XS;
    }
private function resolveCurrentDevice()
    {
        if (0 == $viewportWidth = $this->editor->getViewportWidth()) {
            throw new RuntimeException('Unexpected editor viewport width.');
        }

        foreach (static::getDevices() as $device => $config) {
            if ($viewportWidth >= $config['max']) {
                return $device;
            }
        }

        return static::XS;
    }
private function resolveCurrentDevice ( ) { if ( 0 == $ viewportWidth = $ this -> editor -> getViewportWidth ( ) ) { throw new RuntimeException ( 'Unexpected editor viewport width.' ) ; } foreach ( static :: getDevices ( ) as $ device => $ config ) { if ( $ viewportWidth >= $ config [ 'max' ] ) { return $ device ; } } return static :: XS ; }
Resolves the current device constant regarding to the editor's viewport width.

@return string
@throws RuntimeException
Resolves the current device constant regarding to the editor s viewport width .