[ticket/11930] Move path_helper in front of optional cache argument

Optional method arguments should be after any mandatory ones.

PHPBB3-11930
This commit is contained in:
Marc Alexander 2013-10-21 10:20:12 +02:00
parent 3f0ce78a25
commit d7bf50bc80
3 changed files with 7 additions and 7 deletions

View file

@ -5,8 +5,8 @@ services:
- @config - @config
- %core.root_path% - %core.root_path%
- %core.php_ext% - %core.php_ext%
- @cache.driver
- @path_helper - @path_helper
- @cache.driver
calls: calls:
- [set_name, [avatar.driver.gravatar]] - [set_name, [avatar.driver.gravatar]]
tags: tags:
@ -18,8 +18,8 @@ services:
- @config - @config
- %core.root_path% - %core.root_path%
- %core.php_ext% - %core.php_ext%
- @cache.driver
- @path_helper - @path_helper
- @cache.driver
calls: calls:
- [set_name, [avatar.driver.local]] - [set_name, [avatar.driver.local]]
tags: tags:
@ -31,8 +31,8 @@ services:
- @config - @config
- %core.root_path% - %core.root_path%
- %core.php_ext% - %core.php_ext%
- @cache.driver
- @path_helper - @path_helper
- @cache.driver
calls: calls:
- [set_name, [avatar.driver.remote]] - [set_name, [avatar.driver.remote]]
tags: tags:
@ -44,8 +44,8 @@ services:
- @config - @config
- %core.root_path% - %core.root_path%
- %core.php_ext% - %core.php_ext%
- @cache.driver
- @path_helper - @path_helper
- @cache.driver
calls: calls:
- [set_name, [avatar.driver.upload]] - [set_name, [avatar.driver.upload]]
tags: tags:

View file

@ -83,7 +83,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
* @param string $php_ext PHP file extension * @param string $php_ext PHP file extension
* @param \phpbb\cache\driver\driver_interface $cache Cache driver * @param \phpbb\cache\driver\driver_interface $cache Cache driver
*/ */
public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\cache\driver\driver_interface $cache = null, \phpbb\path_helper $path_helper) public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null)
{ {
$this->config = $config; $this->config = $config;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;

View file

@ -35,7 +35,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
); );
// $this->avatar_foobar will be needed later on // $this->avatar_foobar will be needed later on
$this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $cache));
$this->avatar_foobar->expects($this->any()) $this->avatar_foobar->expects($this->any())
->method('get_name') ->method('get_name')
->will($this->returnValue('avatar.driver.foobar')); ->will($this->returnValue('avatar.driver.foobar'));
@ -48,7 +48,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
foreach ($this->avatar_drivers() as $driver) foreach ($this->avatar_drivers() as $driver)
{ {
$cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache, $path_helper)); $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $cache));
$cur_avatar->expects($this->any()) $cur_avatar->expects($this->any())
->method('get_name') ->method('get_name')
->will($this->returnValue('avatar.driver.' . $driver)); ->will($this->returnValue('avatar.driver.' . $driver));