Skip to content

Commit 9986f03

Browse files
committed
[Validator] Added inline documentation for the PropertyPath utility class
1 parent be7f055 commit 9986f03

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/Symfony/Component/Validator/Util/PropertyPath.php

+22-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,29 @@
1212
namespace Symfony\Component\Validator\Util;
1313

1414
/**
15-
* @since %%NextVersion%%
15+
* Contains utility methods for dealing with property paths.
16+
*
17+
* For more extensive functionality, use Symfony's PropertyAccess component.
18+
*
19+
* @since 2.5
1620
* @author Bernhard Schussek <bschussek@gmail.com>
1721
*/
1822
class PropertyPath
1923
{
24+
/**
25+
* Appends a path to a given property path.
26+
*
27+
* If the base path is empty, the appended path will be returned unchanged.
28+
* If the base path is not empty, and the appended path starts with a
29+
* squared opening bracket ("["), the concatenation of the two paths is
30+
* returned. Otherwise, the concatenation of the two paths is returned,
31+
* separated by a dot (".").
32+
*
33+
* @param string $basePath The base path
34+
* @param string $subPath The path to append
35+
*
36+
* @return string The concatenation of the two property paths
37+
*/
2038
public static function append($basePath, $subPath)
2139
{
2240
if ('' !== (string) $subPath) {
@@ -30,6 +48,9 @@ public static function append($basePath, $subPath)
3048
return $basePath;
3149
}
3250

51+
/**
52+
* Not instantiable.
53+
*/
3354
private function __construct()
3455
{
3556
}

0 commit comments

Comments
 (0)