Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
66.67% covered (warning)
66.67%
10 / 15
CRAP
90.42% covered (success)
90.42%
151 / 167
path_helper
0.00% covered (danger)
0.00%
0 / 1
66.67% covered (warning)
66.67%
10 / 15
57.66
90.42% covered (success)
90.42%
151 / 167
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
7 / 7
 get_phpbb_root_path
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 get_adm_relative_path
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 get_php_ext
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 update_web_root_path
0.00% covered (danger)
0.00%
0 / 1
5.07
85.71% covered (warning)
85.71%
12 / 14
 remove_web_root_path
0.00% covered (danger)
0.00%
0 / 1
2.26
60.00% covered (warning)
60.00%
3 / 5
 get_web_root_path
0.00% covered (danger)
0.00%
0 / 1
9.59
80.65% covered (warning)
80.65%
25 / 31
 get_web_root_path_from_ajax_referer
0.00% covered (danger)
0.00%
0 / 1
7.12
86.67% covered (warning)
86.67%
26 / 30
 clean_url
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
7 / 7
 glue_url_params
100.00% covered (success)
100.00%
1 / 1
3
100.00% covered (success)
100.00%
9 / 9
 get_url_parts
100.00% covered (success)
100.00%
1 / 1
8
100.00% covered (success)
100.00%
27 / 27
 strip_url_params
100.00% covered (success)
100.00%
1 / 1
5
100.00% covered (success)
100.00%
13 / 13
 append_url_params
100.00% covered (success)
100.00%
1 / 1
3
100.00% covered (success)
100.00%
9 / 9
 get_valid_page
100.00% covered (success)
100.00%
1 / 1
6
100.00% covered (success)
100.00%
10 / 10
 is_router_used
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb;
/**
* A class with various functions that are related to paths, files and the filesystem
*/
class path_helper
{
    /** @var \phpbb\symfony_request */
    protected $symfony_request;
    /** @var \phpbb\filesystem\filesystem_interface */
    protected $filesystem;
    /** @var \phpbb\request\request_interface */
    protected $request;
    /** @var string */
    protected $phpbb_root_path;
    /** @var string */
    protected $adm_relative_path;
    /** @var string */
    protected $php_ext;
    /** @var string */
    protected $web_root_path;
    /**
    * Constructor
    *
    * @param \phpbb\symfony_request $symfony_request
    * @param \phpbb\filesystem\filesystem_interface $filesystem
    * @param \phpbb\request\request_interface $request
    * @param string $phpbb_root_path Relative path to phpBB root
    * @param string $php_ext PHP file extension
    * @param mixed $adm_relative_path Relative path admin path to adm/ root
    */
    public function __construct(\phpbb\symfony_request $symfony_request, \phpbb\filesystem\filesystem_interface $filesystem, \phpbb\request\request_interface $request, $phpbb_root_path, $php_ext, $adm_relative_path = null)
    {
        $this->symfony_request = $symfony_request;
        $this->filesystem = $filesystem;
        $this->request = $request;
        $this->phpbb_root_path = $phpbb_root_path;
        $this->php_ext = $php_ext;
        $this->adm_relative_path = $adm_relative_path;