Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
28.57% |
4 / 14 |
CRAP | |
13.89% |
40 / 288 |
user | |
0.00% |
0 / 1 |
|
50.00% |
10 / 20 |
8707.99 | |
13.89% |
40 / 288 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
6 / 6 |
|||
is_setup | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
__get | |
100.00% |
1 / 1 |
3 | |
100.00% |
0 / 0 |
|||
setup | |
0.00% |
0 / 1 |
3598.64 | |
0.57% |
1 / 175 |
|||
lang | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
get_plural_form | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
add_lang | |
100.00% |
1 / 1 |
7 | |
100.00% |
0 / 0 |
|||
set_lang | |
100.00% |
1 / 1 |
6 | |
100.00% |
0 / 0 |
|||
add_lang_ext | |
100.00% |
1 / 1 |
2 | |
100.00% |
0 / 0 |
|||
format_date | |
0.00% |
0 / 1 |
3.00 | |
93.75% |
15 / 16 |
|||
create_timezone | |
0.00% |
0 / 1 |
15.55 | |
25.00% |
3 / 12 |
|||
create_datetime | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 2 |
|||
get_timestamp_from_format | |
100.00% |
1 / 1 |
3 | |
100.00% |
3 / 3 |
|||
get_iso_lang_id | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 14 |
|||
get_profile_fields | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 10 |
|||
img | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 6 |
|||
optionget | |
100.00% |
1 / 1 |
2 | |
100.00% |
2 / 2 |
|||
optionset | |
0.00% |
0 / 1 |
4.02 | |
90.00% |
9 / 10 |
|||
leave_newly_registered | |
0.00% |
0 / 1 |
20 | |
0.00% |
0 / 15 |
|||
get_passworded_forums | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 16 |
<?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; | |
/** | |
* Base user class | |
* | |
* This is the overarching class which contains (through session extend) | |
* all methods utilised for user functionality during a session. | |
*/ | |
class user extends \phpbb\session | |
{ | |
/** | |
* @var \phpbb\language\language | |
*/ | |
protected $language; | |
var $style = array(); | |
var $date_format; | |
/** | |
* DateTimeZone object holding the timezone of the user | |
*/ | |
public $timezone; | |
/** | |
* @var string Class name of datetime object | |
*/ | |
protected $datetime; | |
var $lang_name = false; | |
var $lang_id = false; | |
var $lang_path; | |
var $img_lang; | |
var $img_array = array(); | |
/** @var bool */ | |
protected $is_setup_flag; | |
// Able to add new options (up to id 31) | |
var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17); | |
/** | |
* Constructor to set the lang path | |
* | |
* @param \phpbb\language\language $lang phpBB's Language loader | |
* @param string $datetime_class Class name of datetime class | |
*/ | |
function __construct(\phpbb\language\language $lang, $datetime_class) | |
{ | |
global $phpbb_root_path; | |
$this->lang_path = $phpbb_root_path . 'language/'; | |
$this->language = $lang; | |
$this->datetime = $datetime_class; | |