Webmozart\Console\Api\Config\ApplicationConfig::getStyleSet PHP Method

getStyleSet() public method

Returns the configured style set.
See also: setStyleSet()
public getStyleSet ( ) : StyleSet
return Webmozart\Console\Api\Formatter\StyleSet The style set.
    public function getStyleSet()
    {
        if (!$this->styleSet) {
            $this->styleSet = new DefaultStyleSet();
        }
        return $this->styleSet;
    }

Usage Example

Ejemplo n.º 1
0
 public function testRemoveStyle()
 {
     $style1 = Style::tag('custom1');
     $style2 = Style::tag('custom2');
     $this->config->addStyles(array($style1, $style2));
     $this->config->removeStyle('custom1');
     $styleSet = new DefaultStyleSet();
     $styleSet->add($style2);
     $this->assertEquals($styleSet, $this->config->getStyleSet());
 }