| @@ 66-73 (lines=8) @@ | ||
| 63 | * |
|
| 64 | * @return string |
|
| 65 | */ |
|
| 66 | public static function validateAlignment(string $alignment): string |
|
| 67 | { |
|
| 68 | if (!in_array($alignment, [self::ALIGNMENT_CENTER, self::ALIGNMENT_LEFT, self::ALIGNMENT_RIGHT], true)) { |
|
| 69 | throw new InvalidArgumentException(sprintf('Unknown alignment "%s"', $alignment)); |
|
| 70 | } |
|
| 71 | ||
| 72 | return $alignment; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * @param string $baseType |
|
| @@ 82-89 (lines=8) @@ | ||
| 79 | * |
|
| 80 | * @return string |
|
| 81 | */ |
|
| 82 | public static function validateBaseType(string $baseType): string |
|
| 83 | { |
|
| 84 | if (!in_array($baseType, [self::BASETYPE_FOOTER, self::BASETYPE_HEADER], true)) { |
|
| 85 | throw new InvalidArgumentException(sprintf('Unknown base type "%s"', $baseType)); |
|
| 86 | } |
|
| 87 | ||
| 88 | return $baseType; |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * @param string $baseType |
|