fix whitespace and newline for bloc content in _fixphpheader_
parent
99638fcd92
commit
02949af33a
|
@ -4,6 +4,7 @@
|
||||||
- [x] use _requires_ or dc_min in _fixdcstore_
|
- [x] use _requires_ or dc_min in _fixdcstore_
|
||||||
- [x] fix unwanted translation of module name in _fixdcstore_
|
- [x] fix unwanted translation of module name in _fixdcstore_
|
||||||
- [x] add modifier _first upper case_ : _\u_ in _fixphpheader_
|
- [x] add modifier _first upper case_ : _\u_ in _fixphpheader_
|
||||||
|
- [x] fix whitespace and newline for bloc content in _fixphpheader_
|
||||||
|
|
||||||
0.0.1
|
0.0.1
|
||||||
- First pre-release
|
- First pre-release
|
|
@ -155,6 +155,8 @@ class ImproveActionPhpheader extends ImproveAction
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bloc = trim(str_replace("\r\n", "\n", $bloc));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->bloc = preg_replace_callback(
|
$this->bloc = preg_replace_callback(
|
||||||
// use \u in bloc content for first_upper_case
|
// use \u in bloc content for first_upper_case
|
||||||
|
@ -196,7 +198,7 @@ class ImproveActionPhpheader extends ImproveAction
|
||||||
private function deleteDocBloc($content)
|
private function deleteDocBloc($content)
|
||||||
{
|
{
|
||||||
return preg_replace(
|
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",
|
"<?php\n",
|
||||||
$content
|
$content
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue