1 <?php 2 3 declare(strict_types=1); 4 5 namespace OpenSpout\Common\Entity\Style; 6 7 /** 8 * This class provides constants to work with text vertical alignment. 9 */ 10 final class CellVerticalAlignment 11 { 12 public const AUTO = 'auto'; 13 public const BASELINE = 'baseline'; 14 public const BOTTOM = 'bottom'; 15 public const CENTER = 'center'; 16 public const DISTRIBUTED = 'distributed'; 17 public const JUSTIFY = 'justify'; 18 public const TOP = 'top'; 19 20 private const VALID_ALIGNMENTS = [ 21 self::AUTO => 1, 22 self::BASELINE => 1, 23 self::BOTTOM => 1, 24 self::CENTER => 1, 25 self::DISTRIBUTED => 1, 26 self::JUSTIFY => 1, 27 self::TOP => 1, 28 ]; 29 30 /** 31 * @return bool Whether the given cell vertical alignment is valid 32 */ 33 public static function isValid(string $cellVerticalAlignment): bool 34 { 35 return isset(self::VALID_ALIGNMENTS[$cellVerticalAlignment]); 36 } 37 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body