for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* Advertisement management. An extension for the phpBB Forum Software package.
* @copyright (c) 2017 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*/
namespace phpbb\ads\analyser;
class manager
{
/** @var array Ad code analysis tests */
protected $tests;
* Construct an ad code analysis manager object
* @param array $tests Ad code analysis tests passed via the service container
public function __construct($tests)
$this->tests = $tests;
}
public function test($ad_code)
$result = array(
'notice' => array(),
'warning' => array(),
'error' => array(),
);
foreach ($this->tests as $test)
$result = array_merge_recursive($result, $test->test($ad_code));
// TODO: return in reasonable way