isInverse() public method

Returns whether the text is reversed.
public isInverse ( ) : boolean
return boolean Returns `true` if text is formatted reversed and `false` otherwise.
Esempio n. 1
0
 public function testDefaults()
 {
     $style = new Style();
     $this->assertNull($style->getTag());
     $this->assertNull($style->getForegroundColor());
     $this->assertNull($style->getBackgroundColor());
     $this->assertFalse($style->isBold());
     $this->assertFalse($style->isUnderlined());
     $this->assertFalse($style->isBlinking());
     $this->assertFalse($style->isHidden());
     $this->assertFalse($style->isInverse());
 }
Esempio n. 2
0
 /**
  * Converts a {@link Style} instance to an {@link OutputFormatterStyle}.
  *
  * @param Style $style The style to convert.
  *
  * @return OutputFormatterStyle The converted style.
  */
 public static function convert(Style $style)
 {
     $options = array();
     if ($style->isBold()) {
         $options[] = 'bold';
     }
     if ($style->isBlinking()) {
         $options[] = 'blink';
     }
     if ($style->isUnderlined()) {
         $options[] = 'underscore';
     }
     if ($style->isInverse()) {
         $options[] = 'reverse';
     }
     if ($style->isHidden()) {
         $options[] = 'conceal';
     }
     return new OutputFormatterStyle($style->getForegroundColor(), $style->getBackgroundColor(), $options);
 }