diff --git a/phpBB/includes/avatar/driver/driver.php b/phpBB/includes/avatar/driver/driver.php index c6b864bc9f..234186215b 100644 --- a/phpBB/includes/avatar/driver/driver.php +++ b/phpBB/includes/avatar/driver/driver.php @@ -21,53 +21,57 @@ if (!defined('IN_PHPBB')) */ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface { + /** + * Avatar driver name + * @var string + */ protected $name; /** * Current board configuration - * @type phpbb_config + * @var phpbb_config */ protected $config; /** * Request object - * @type phpbb_request + * @var phpbb_request */ protected $request; /** * Current $phpbb_root_path - * @type string + * @var string */ protected $phpbb_root_path; /** * Current $php_ext - * @type string + * @var string */ protected $php_ext; /** - * A cache driver - * @type phpbb_cache_driver_interface + * Cache driver + * @var phpbb_cache_driver_interface */ protected $cache; /** * This flag should be set to true if the avatar requires a nonstandard image * tag, and will generate the html itself. - * @type boolean + * @var boolean */ public $custom_html = false; /** * Construct a driver object * - * @param phpbb_config $config The phpBB configuration - * @param phpbb_request $request The request object - * @param string $phpbb_root_path The path to the phpBB root - * @param string $php_ext The php file extension - * @param phpbb_cache_driver_interface $cache A cache driver + * @param phpbb_config $config phpBB configuration + * @param phpbb_request $request Request object + * @param string $phpbb_root_path Path to the phpBB root + * @param string $php_ext PHP file extension + * @param phpbb_cache_driver_interface $cache Cache driver */ public function __construct(phpbb_config $config, phpbb_request $request, $phpbb_root_path, $php_ext, phpbb_cache_driver_interface $cache = null) { @@ -100,7 +104,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface /** * @inheritdoc - **/ + */ public function prepare_form($template, $row, &$error) { return false; @@ -108,7 +112,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface /** * @inheritdoc - **/ + */ public function prepare_form_acp() { return array(); @@ -116,7 +120,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface /** * @inheritdoc - **/ + */ public function process_form($template, $row, &$error) { return false; @@ -124,7 +128,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface /** * @inheritdoc - **/ + */ public function delete($row) { return true; @@ -132,7 +136,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface /** * @inheritdoc - **/ + */ public function is_enabled() { $driver = preg_replace('#^phpbb_avatar_driver_#', '', get_class($this)); @@ -142,7 +146,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface /** * @inheritdoc - **/ + */ public function get_template_name() { $driver = preg_replace('#^phpbb_avatar_driver_#', '', get_class($this)); @@ -162,7 +166,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface /** * Sets the name of the driver. * - * @param string $name The driver name + * @param string $name Driver name */ public function set_name($name) { diff --git a/phpBB/includes/avatar/driver/gravatar.php b/phpBB/includes/avatar/driver/gravatar.php index e21743242f..a90c0e3ce1 100644 --- a/phpBB/includes/avatar/driver/gravatar.php +++ b/phpBB/includes/avatar/driver/gravatar.php @@ -78,7 +78,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver /** * @inheritdoc - **/ + */ public function prepare_form_acp() { return array( @@ -170,7 +170,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver /** * Build gravatar URL for output on page * - * @return string The gravatar URL + * @return string Gravatar URL */ protected function get_gravatar_url($row) { diff --git a/phpBB/includes/avatar/driver/interface.php b/phpBB/includes/avatar/driver/interface.php index 28220d79f2..cc6b7edd17 100644 --- a/phpBB/includes/avatar/driver/interface.php +++ b/phpBB/includes/avatar/driver/interface.php @@ -24,7 +24,7 @@ interface phpbb_avatar_driver_interface /** * Returns the name of the driver. * - * @return string Name of wrapped driver. + * @return string Name of wrapped driver. */ public function get_name(); @@ -43,7 +43,7 @@ interface phpbb_avatar_driver_interface * Returns custom html for displaying this avatar. * Only called if $custom_html is true. * - * @param $ignore_config Whether this function should respect the users prefs + * @param bool $ignore_config Whether this function should respect the users prefs * and board configuration configuration option, or should just render * the avatar anyways. Useful for the ACP. * @return string HTML @@ -53,56 +53,56 @@ interface phpbb_avatar_driver_interface /** * Prepare form for changing the settings of this avatar * - * @param object $template The template object - * @param array $row The user data or group data that has been cleaned with + * @param object $template Template object + * @param array $row User data or group data that has been cleaned with * phpbb_avatar_manager::clean_row - * @param array &$error The reference to an error array + * @param array &$error Reference to an error array * - * @return bool Returns true if form has been successfully prepared - **/ + * @return bool True if form has been successfully prepared + */ public function prepare_form($template, $row, &$error); /** * Prepare form for changing the acp settings of this avatar * - * @return array Return the array containing the acp settings - **/ + * @return array Array containing the acp settings + */ public function prepare_form_acp(); /** * Process form data * - * @param object $template The template object - * @param array $row The user data or group data that has been cleaned with + * @param object $template Template object + * @param array $row User data or group data that has been cleaned with * phpbb_avatar_manager::clean_row - * @param array &$error The reference to an error array + * @param array &$error Reference to an error array * - * @return array An array containing the avatar data as follows: + * @return array Array containing the avatar data as follows: * ['avatar'], ['avatar_width'], ['avatar_height'] - **/ + */ public function process_form($template, $row, &$error); /** * Delete avatar * - * @param array $row The user data or group data that has been cleaned with + * @param array $row User data or group data that has been cleaned with * phpbb_avatar_manager::clean_row * * @return bool True if avatar has been deleted or there is no need to delete - **/ + */ public function delete($row); /** * Check if avatar is enabled * * @return bool True if avatar is enabled, false if it's disabled - **/ + */ public function is_enabled(); /** * Get the avatars template name * - * @return string The avatars template name - **/ + * @return string Avatar's template name + */ public function get_template_name(); } diff --git a/phpBB/includes/avatar/driver/local.php b/phpBB/includes/avatar/driver/local.php index c231206d8e..d46ac79d11 100644 --- a/phpBB/includes/avatar/driver/local.php +++ b/phpBB/includes/avatar/driver/local.php @@ -114,7 +114,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver /** * @inheritdoc - **/ + */ public function prepare_form_acp() { return array( @@ -148,7 +148,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver /** * Get a list of avatars that are locally available * - * @return array An array containing the locally available avatars + * @return array Array containing the locally available avatars */ protected function get_avatar_list() { diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php index 134bf070e5..b7522ac3e1 100644 --- a/phpBB/includes/avatar/driver/remote.php +++ b/phpBB/includes/avatar/driver/remote.php @@ -60,7 +60,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver /** * @inheritdoc - **/ + */ public function prepare_form_acp() { return array( diff --git a/phpBB/includes/avatar/driver/upload.php b/phpBB/includes/avatar/driver/upload.php index 91de47e66d..f00033d6bd 100644 --- a/phpBB/includes/avatar/driver/upload.php +++ b/phpBB/includes/avatar/driver/upload.php @@ -124,7 +124,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver /** * @inheritdoc - **/ + */ public function prepare_form_acp() { global $user; diff --git a/phpBB/includes/avatar/manager.php b/phpBB/includes/avatar/manager.php index 51727f242a..ae628f0ce2 100644 --- a/phpBB/includes/avatar/manager.php +++ b/phpBB/includes/avatar/manager.php @@ -32,14 +32,14 @@ class phpbb_avatar_manager /** * Construct an avatar manager object * - * @param $phpbb_root_path The path to the phpBB root - * @param $phpEx The php file extension - * @param $config The phpBB configuration - * @param $request The request object - * @param $cache A cache driver - * @param $avatar_drivers The avatars drivers passed via the service container - * @param $container The container object - **/ + * @param string $phpbb_root_path Path to the phpBB root + * @param string $phpEx PHP file extension + * @param phpbb_config $config phpBB configuration + * @param phpbb_request $request Request object + * @param phpbb_cache_driver_interface $cache Cache driver + * @param array $avatar_drivers Avatar drivers passed via the service container + * @param object $container Container object + */ public function __construct($phpbb_root_path, $phpEx, phpbb_config $config, phpbb_request $request, phpbb_cache_driver_interface $cache, $avatar_drivers, $container) { $this->phpbb_root_path = $phpbb_root_path; @@ -54,10 +54,10 @@ class phpbb_avatar_manager /** * Get the driver object specified by the avatar type * - * @param string The avatar type; by default an avatar's service container name + * @param string Avatar type; by default an avatar's service container name * - * @return object The avatar driver object - **/ + * @return object Avatar driver object + */ public function get_driver($avatar_type) { if (self::$valid_drivers === false) @@ -101,7 +101,7 @@ class phpbb_avatar_manager /** * Load the list of valid drivers * This is executed once and fills self::$valid_drivers - **/ + */ protected function load_valid_drivers() { if (!empty($this->avatar_drivers)) @@ -117,8 +117,8 @@ class phpbb_avatar_manager /** * Get a list of valid avatar drivers * - * @return array An array containing a list of the valid avatar drivers - **/ + * @return array Array containing a list of the valid avatar drivers + */ public function get_valid_drivers() { if (self::$valid_drivers === false) @@ -132,11 +132,11 @@ class phpbb_avatar_manager /** * Strip out user_ and group_ prefixes from keys * - * @param array $row The user data or group data + * @param array $row User data or group data * - * @return array The user data or group data with keys that have been + * @return array User data or group data with keys that have been * stripped from the preceding "user_" or "group_" - **/ + */ public static function clean_row($row) { $keys = array_keys($row);