fix whitespace and newline for bloc content in _fixphpheader_
This commit is contained in:
parent
99638fcd92
commit
02949af33a
2 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
- [x] use _requires_ or dc_min in _fixdcstore_
|
||||
- [x] fix unwanted translation of module name in _fixdcstore_
|
||||
- [x] add modifier _first upper case_ : _\u_ in _fixphpheader_
|
||||
- [x] fix whitespace and newline for bloc content in _fixphpheader_
|
||||
|
||||
0.0.1
|
||||
- First pre-release
|
|
@ -155,6 +155,8 @@ class ImproveActionPhpheader extends ImproveAction
|
|||
return null;
|
||||
}
|
||||
|
||||
$bloc = trim(str_replace("\r\n", "\n", $bloc));
|
||||
|
||||
try {
|
||||
$this->bloc = preg_replace_callback(
|
||||
// use \u in bloc content for first_upper_case
|
||||
|
@ -196,7 +198,7 @@ class ImproveActionPhpheader extends ImproveAction
|
|||
private function deleteDocBloc($content)
|
||||
{
|
||||
return preg_replace(
|
||||
'/^(\<\?php[\n|\r\n]{0,1}\/\*\*.*?\s*\*\/\s*[\n|\r\n]+)/msi',
|
||||
'/^(\<\?php\s*[\n|\r\n]{0,1}\s*\/\*\*.*?\s*\*\/\s*[\n|\r\n]+)/msi',
|
||||
"<?php\n",
|
||||
$content
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue