PropertyPath.php
20 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Symfony\Component\Validator\Util; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | class PropertyPath |
| 5 | { |
| 6 | public static function append(string $basePath, string $subPath) |
| 7 | { |
| 8 | if ('' !== $subPath) { |
| 9 | if ('[' === $subPath[0]) { |
| 10 | return $basePath . $subPath; |
| 11 | } |
| 12 | return '' !== $basePath ? $basePath . '.' . $subPath : $subPath; |
| 13 | } |
| 14 | return $basePath; |
| 15 | } |
| 16 | private function __construct() |
| 17 | { |
| 18 | } |
| 19 | } |
| 20 |