Webmozart\Console\Api\Formatter\StyleSet::isEmpty PHP Method

isEmpty() public method

Returns whether the style set is empty.
public isEmpty ( ) : boolean
return boolean Returns `true` if the set contains no styles and `false` otherwise.
    public function isEmpty()
    {
        return 0 === count($this->styles);
    }

Usage Example

Example #1
0
 public function testIsEmpty()
 {
     $styleSet = new StyleSet();
     $this->assertTrue($styleSet->isEmpty());
     $styleSet->add(Style::tag('style'));
     $this->assertFalse($styleSet->isEmpty());
 }