Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Barryvdh/Reflection/DocBlock/Tag/ParamTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function setContent($content)
$parts = preg_split(
'/(\s+)/Su',
$this->description,
3,
4,
PREG_SPLIT_DELIM_CAPTURE
);

Expand Down
40 changes: 40 additions & 0 deletions tests/Barryvdh/Reflection/DocBlock/Tag/ParamTagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,46 @@ public function provideDataForConstructor()
array('int'),
'$bob',
"Type on a new line"
),
array(
'param',
"array \$arrayNoGenericsDescription Some text",
'array',
array('array'),
'$arrayNoGenericsDescription',
"Some text"
),
array(
'param',
"array<int, string> \$arrayGenericsNoDescription",
'array<int, string>',
array('array<int, string>'),
'$arrayGenericsNoDescription',
""
),
array(
'param',
"array<int,string> \$arrayGenericsNoSpaceDescription Description goes here",
'array<int,string>',
array('array<int,string>'),
'$arrayGenericsNoSpaceDescription',
"Description goes here"
),
array(
'param',
"array<int, string> \$arrayGenericsDescription Description goes here",
'array<int, string>',
array('array<int, string>'),
'$arrayGenericsDescription',
"Description goes here"
),
array(
'param',
"array<int, string> \$arrayGenericsDescription Description multiline\n goes\n here",
'array<int, string>',
array('array<int, string>'),
'$arrayGenericsDescription',
"Description multiline\n goes\n here"
)
);
}
Expand Down