|
@@ -63,36 +63,36 @@ class LuPropertyDocParser
|
63
|
63
|
}
|
64
|
64
|
else {
|
65
|
65
|
$methodName = $command;
|
66
|
|
- $constraint = new LuParameterConstraintDbo();
|
67
|
|
- $constraint->setMethod($methodName);
|
68
|
|
- $args = [];
|
69
|
|
- $argMatches = [];
|
70
|
|
- if (preg_match_all('/ *(-?(?:\d*\.\d+|\d+|true|false|null|"[^"]*"|\'[^\']*\'))/', $line, $argMatches) !== false) {
|
71
|
|
- $args = $argMatches[1];
|
72
|
|
- foreach ($args as $key => $arg) {
|
73
|
|
- $argLower = strtolower($arg);
|
74
|
|
- if ($arg[0] == '"' || $arg[0] == "'") {
|
75
|
|
- $args[$key] = substr($arg, 1, count($arg) - 2);
|
76
|
|
- }
|
77
|
|
- else if ($argLower == "true") {
|
78
|
|
- $args[$key] = true;
|
79
|
|
- }
|
80
|
|
- else if ($argLower == "false") {
|
81
|
|
- $args[$key] = false;
|
82
|
|
- }
|
83
|
|
- else if ($argLower == "null") {
|
84
|
|
- $args[$key] = null;
|
85
|
|
- }
|
86
|
|
- else if (strpos($arg, ".") !== false) {
|
87
|
|
- $args[$key] = floatval($arg);
|
88
|
|
- }
|
89
|
|
- else {
|
90
|
|
- $args[$key] = intval($arg);
|
|
66
|
+ if ($methodName == "nullable") {
|
|
67
|
+ $currentParam->setNotNull(false);
|
|
68
|
+ }
|
|
69
|
+ else {
|
|
70
|
+ $constraint = new LuParameterConstraintDbo();
|
|
71
|
+ $constraint->setMethod($methodName);
|
|
72
|
+ $args = [];
|
|
73
|
+ $argMatches = [];
|
|
74
|
+ if (preg_match_all('/ *(-?(?:\d*\.\d+|\d+|true|false|null|"[^"]*"|\'[^\']*\'))/', $line, $argMatches) !== false) {
|
|
75
|
+ $args = $argMatches[1];
|
|
76
|
+ foreach ($args as $key => $arg) {
|
|
77
|
+ $argLower = strtolower($arg);
|
|
78
|
+ if ($arg[0] == '"' || $arg[0] == "'") {
|
|
79
|
+ $args[$key] = substr($arg, 1, strlen($arg) - 2);
|
|
80
|
+ } else if ($argLower == "true") {
|
|
81
|
+ $args[$key] = true;
|
|
82
|
+ } else if ($argLower == "false") {
|
|
83
|
+ $args[$key] = false;
|
|
84
|
+ } else if ($argLower == "null") {
|
|
85
|
+ $args[$key] = null;
|
|
86
|
+ } else if (strpos($arg, ".") !== false) {
|
|
87
|
+ $args[$key] = floatval($arg);
|
|
88
|
+ } else {
|
|
89
|
+ $args[$key] = intval($arg);
|
|
90
|
+ }
|
91
|
91
|
}
|
92
|
92
|
}
|
|
93
|
+ $constraint->setArguments($args);
|
|
94
|
+ $currentParam->addConstraint($constraint);
|
93
|
95
|
}
|
94
|
|
- $constraint->setArguments($args);
|
95
|
|
- $currentParam->addConstraint($constraint);
|
96
|
96
|
}
|
97
|
97
|
}
|
98
|
98
|
else {
|