Browse Source

fixed spaces in doc parsers

develop
Robin Thoni 8 years ago
parent
commit
4875cff0bc

+ 1
- 1
src/Utils/Business/LuMethodDocParser.php View File

99
                     if ($command == "param") {
99
                     if ($command == "param") {
100
                         $currentParam = new LuParameterDbo();
100
                         $currentParam = new LuParameterDbo();
101
                         $paramMatches = [];
101
                         $paramMatches = [];
102
-                        if (preg_match("/([^ ]+) *([^ ]+) *(.*)/", $line, $paramMatches) === 1) {
102
+                        if (preg_match("/([^ ]+) +([^ ]+) *(.*)/", $line, $paramMatches) === 1) {
103
                             if ($paramMatches[1][0] == "$") {
103
                             if ($paramMatches[1][0] == "$") {
104
                                 $currentParam->setName(substr($paramMatches[1], 1, strlen($paramMatches[1]) - 1));
104
                                 $currentParam->setName(substr($paramMatches[1], 1, strlen($paramMatches[1]) - 1));
105
                                 $currentParam->setType($paramMatches[2]);
105
                                 $currentParam->setType($paramMatches[2]);

+ 1
- 1
src/Utils/Business/LuPropertyDocParser.php View File

49
                     $line = $commandMatches[2];
49
                     $line = $commandMatches[2];
50
                     if ($command == "var") {
50
                     if ($command == "var") {
51
                         $paramMatches = [];
51
                         $paramMatches = [];
52
-                        if (preg_match("/([^ ]+) *([^ ]+) *(.*)/", $line, $paramMatches) === 1) {
52
+                        if (preg_match("/([^ ]+) +([^ ]+) *(.*)/", $line, $paramMatches) === 1) {
53
                             if ($paramMatches[1][0] == "$") {
53
                             if ($paramMatches[1][0] == "$") {
54
                                 $currentParam->setName(substr($paramMatches[1], 1, strlen($paramMatches[1]) - 1));
54
                                 $currentParam->setName(substr($paramMatches[1], 1, strlen($paramMatches[1]) - 1));
55
                                 $currentParam->setType($paramMatches[2]);
55
                                 $currentParam->setType($paramMatches[2]);

Loading…
Cancel
Save