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