diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-06-15 13:31:17 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-06-15 19:14:40 +0200 |
commit | 047b709c4706ea7514eff1124569702693a6acf6 (patch) | |
tree | 200a3f9c05d99244ebf5d920349b3f6c7a5fc24a /phpBB/phpbb/extension | |
parent | 1033da36a39eb5177fea2dbb173b92ceb3a0ba50 (diff) | |
download | forums-047b709c4706ea7514eff1124569702693a6acf6.tar forums-047b709c4706ea7514eff1124569702693a6acf6.tar.gz forums-047b709c4706ea7514eff1124569702693a6acf6.tar.bz2 forums-047b709c4706ea7514eff1124569702693a6acf6.tar.xz forums-047b709c4706ea7514eff1124569702693a6acf6.zip |
[ticket/12715] Cleanup comments in \phpbb\extension\*
PHPBB3-12715
Diffstat (limited to 'phpBB/phpbb/extension')
-rw-r--r-- | phpBB/phpbb/extension/manager.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/extension/metadata_manager.php | 85 | ||||
-rw-r--r-- | phpBB/phpbb/extension/provider.php | 2 |
3 files changed, 46 insertions, 43 deletions
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php index b83bb1b189..52d9395c82 100644 --- a/phpBB/phpbb/extension/manager.php +++ b/phpBB/phpbb/extension/manager.php @@ -148,7 +148,7 @@ class manager * Instantiates the metadata manager for the extension with the given name * * @param string $name The extension name - * @param string $template The template manager + * @param \phpbb\template\template $template The template manager * @return \phpbb\extension\metadata_manager Instance of the metadata manager */ public function create_extension_metadata_manager($name, \phpbb\template\template $template) diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php index 5c4e8fbf00..014d8c79c7 100644 --- a/phpBB/phpbb/extension/metadata_manager.php +++ b/phpBB/phpbb/extension/metadata_manager.php @@ -90,11 +90,11 @@ class metadata_manager } /** - * Processes and gets the metadata requested - * - * @param string $element All for all metadata that it has and is valid, otherwise specify which section you want by its shorthand term. - * @return array Contains all of the requested metadata, throws an exception on failure - */ + * Processes and gets the metadata requested + * + * @param string $element All for all metadata that it has and is valid, otherwise specify which section you want by its shorthand term. + * @return array Contains all of the requested metadata, throws an exception on failure + */ public function get_metadata($element = 'all') { $this->set_metadata_file(); @@ -136,10 +136,10 @@ class metadata_manager } /** - * Sets the filepath of the metadata file - * - * @return boolean Set to true if it exists, throws an exception on failure - */ + * Sets the filepath of the metadata file + * + * @throws \phpbb\extension\exception + */ private function set_metadata_file() { $ext_filepath = $this->extension_manager->get_extension_path($this->ext_name); @@ -154,10 +154,11 @@ class metadata_manager } /** - * Gets the contents of the composer.json file - * - * @return bool True if success, throws an exception on failure - */ + * Gets the contents of the composer.json file + * + * @return bool True if success, throws an exception on failure + * @throws \phpbb\extension\exception + */ private function fetch_metadata() { if (!file_exists($this->metadata_file)) @@ -183,10 +184,10 @@ class metadata_manager } /** - * This array handles the cleaning of the array - * - * @return array Contains the cleaned metadata array - */ + * This array handles the cleaning of the array + * + * @return array Contains the cleaned metadata array + */ private function clean_metadata_array() { return $this->metadata; @@ -199,6 +200,7 @@ class metadata_manager * "display" for name, type, and authors * "name", "type") * @return Bool True if valid, throws an exception if invalid + * @throws \phpbb\extension\exception */ public function validate($name = 'display') { @@ -247,10 +249,11 @@ class metadata_manager } /** - * Validates the contents of the authors field - * - * @return boolean True when passes validation, throws exception if invalid - */ + * Validates the contents of the authors field + * + * @return boolean True when passes validation, throws exception if invalid + * @throws \phpbb\extension\exception + */ public function validate_authors() { if (empty($this->metadata['authors'])) @@ -270,10 +273,10 @@ class metadata_manager } /** - * This array handles the verification that this extension can be enabled on this board - * - * @return bool True if validation succeeded, False if failed - */ + * This array handles the verification that this extension can be enabled on this board + * + * @return bool True if validation succeeded, False if failed + */ public function validate_enable() { // Check for valid directory & phpBB, PHP versions @@ -286,10 +289,10 @@ class metadata_manager } /** - * Validates the most basic directory structure to ensure it follows <vendor>/<ext> convention. - * - * @return boolean True when passes validation - */ + * Validates the most basic directory structure to ensure it follows <vendor>/<ext> convention. + * + * @return boolean True when passes validation + */ public function validate_dir() { return (substr_count($this->ext_name, '/') === 1 && $this->ext_name == $this->get_metadata('name')); @@ -297,10 +300,10 @@ class metadata_manager /** - * Validates the contents of the phpbb requirement field - * - * @return boolean True when passes validation - */ + * Validates the contents of the phpbb requirement field + * + * @return boolean True when passes validation + */ public function validate_require_phpbb() { if (!isset($this->metadata['require']['phpbb/phpbb'])) @@ -312,10 +315,10 @@ class metadata_manager } /** - * Validates the contents of the php requirement field - * - * @return boolean True when passes validation - */ + * Validates the contents of the php requirement field + * + * @return boolean True when passes validation + */ public function validate_require_php() { if (!isset($this->metadata['require']['php'])) @@ -348,10 +351,10 @@ class metadata_manager } /** - * Outputs the metadata into the template - * - * @return null - */ + * Outputs the metadata into the template + * + * @return null + */ public function output_template_data() { $this->template->assign_vars(array( diff --git a/phpBB/phpbb/extension/provider.php b/phpBB/phpbb/extension/provider.php index e1d854df64..1c42cf7b5e 100644 --- a/phpBB/phpbb/extension/provider.php +++ b/phpBB/phpbb/extension/provider.php @@ -58,7 +58,7 @@ abstract class provider implements \IteratorAggregate /** * Retrieve an iterator over all items * - * @return ArrayIterator An iterator for the array of template paths + * @return \ArrayIterator An iterator for the array of template paths */ public function getIterator() { |