diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-20 14:28:09 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-20 14:28:09 +0200 |
commit | b83a555da5df5b6916e4ae15aee10815bdac65d5 (patch) | |
tree | 86eb88567e0636910e371a25615feff95eaadd19 /phpBB/phpbb/event | |
parent | 8ddc9ff185527128d74b618107edde2f57637dde (diff) | |
download | forums-b83a555da5df5b6916e4ae15aee10815bdac65d5.tar forums-b83a555da5df5b6916e4ae15aee10815bdac65d5.tar.gz forums-b83a555da5df5b6916e4ae15aee10815bdac65d5.tar.bz2 forums-b83a555da5df5b6916e4ae15aee10815bdac65d5.tar.xz forums-b83a555da5df5b6916e4ae15aee10815bdac65d5.zip |
[ticket/12273] Move phpBB test to new file and use a data provider
PHPBB3-12273
Diffstat (limited to 'phpBB/phpbb/event')
-rw-r--r-- | phpBB/phpbb/event/php_exporter.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php index 9044168980..1e680ec896 100644 --- a/phpBB/phpbb/event/php_exporter.php +++ b/phpBB/phpbb/event/php_exporter.php @@ -163,7 +163,8 @@ class php_exporter } /** - * @param $file + * @param string $file + * @return int Number of events found in this file * @throws \LogicException */ public function crawl_php_file($file) @@ -171,6 +172,7 @@ class php_exporter $this->current_file = $file; $this->file_lines = array(); $content = file_get_contents($this->root_path . $this->current_file); + $num_events_found = 0; if (strpos($content, "dispatcher->trigger_event('") || strpos($content, "dispatcher->dispatch('")) { @@ -227,9 +229,12 @@ class php_exporter 'since' => $since, 'description' => $description, ); + $num_events_found++; } } } + + return $num_events_found; } /** |