aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-10-06 16:09:56 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-10-06 16:09:56 +0200
commit825af557ae97687ed4bfd417f25e3a24eec04d02 (patch)
tree263c14274bcd7094e73d24e90a649b9845317ddb /phpBB
parent5e86c89989b537c8a685841a139345d9cb6f6564 (diff)
downloadforums-825af557ae97687ed4bfd417f25e3a24eec04d02.tar
forums-825af557ae97687ed4bfd417f25e3a24eec04d02.tar.gz
forums-825af557ae97687ed4bfd417f25e3a24eec04d02.tar.bz2
forums-825af557ae97687ed4bfd417f25e3a24eec04d02.tar.xz
forums-825af557ae97687ed4bfd417f25e3a24eec04d02.zip
[ticket/13124] Also trim spaces in front of comments except for first line
PHPBB3-13124
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/event/php_exporter.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php
index badbbb48fd..35144eeeec 100644
--- a/phpBB/phpbb/event/php_exporter.php
+++ b/phpBB/phpbb/event/php_exporter.php
@@ -253,7 +253,7 @@ class php_exporter
public function get_event_name($event_line, $is_dispatch)
{
$event_text_line = $this->file_lines[$event_line];
- $event_text_line = ltrim($event_text_line, "\t");
+ $event_text_line = ltrim($event_text_line, "\t ");
if ($is_dispatch)
{
@@ -389,7 +389,7 @@ class php_exporter
$found_comment_end = false;
while (ltrim($this->file_lines[$this->current_event_line - $current_doc_line], "\t") !== '/**')
{
- if (ltrim($this->file_lines[$this->current_event_line - $current_doc_line], "\t") === '*/')
+ if (ltrim($this->file_lines[$this->current_event_line - $current_doc_line], "\t ") === '*/')
{
$found_comment_end = true;
}
@@ -471,7 +471,7 @@ class php_exporter
{
$find_tag_line = 0;
$found_comment_end = false;
- while (strpos(ltrim($this->file_lines[$this->current_event_line - $find_tag_line], "\t"), '* @' . $find_tag . ' ') !== 0)
+ while (strpos(ltrim($this->file_lines[$this->current_event_line - $find_tag_line], "\t "), '* @' . $find_tag . ' ') !== 0)
{
if ($found_comment_end && ltrim($this->file_lines[$this->current_event_line - $find_tag_line], "\t") === '/**')
{
@@ -482,7 +482,7 @@ class php_exporter
foreach ($disallowed_tags as $disallowed_tag)
{
- if ($found_comment_end && strpos(ltrim($this->file_lines[$this->current_event_line - $find_tag_line], "\t"), '* @' . $disallowed_tag) === 0)
+ if ($found_comment_end && strpos(ltrim($this->file_lines[$this->current_event_line - $find_tag_line], "\t "), '* @' . $disallowed_tag) === 0)
{
// Found @var after the @since
throw new \LogicException("Found '@{$disallowed_tag}' information after '@{$find_tag}' for event "
@@ -490,7 +490,7 @@ class php_exporter
}
}
- if (ltrim($this->file_lines[$this->current_event_line - $find_tag_line], "\t") === '*/')
+ if (ltrim($this->file_lines[$this->current_event_line - $find_tag_line], "\t ") === '*/')
{
$found_comment_end = true;
}
@@ -550,7 +550,7 @@ class php_exporter
public function validate_since($line)
{
$match = array();
- preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?)$#', ltrim($line, "\t"), $match);
+ preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?)$#', ltrim($line, "\t "), $match);
if (!isset($match[1]))
{
throw new \LogicException("Invalid '@since' information for event "
@@ -570,7 +570,7 @@ class php_exporter
*/
public function validate_event($event_name, $line)
{
- $event = substr(ltrim($line, "\t"), strlen('* @event '));
+ $event = substr(ltrim($line, "\t "), strlen('* @event '));
if ($event !== trim($event))
{