Clean up projectlist docblocks
Clean up projectlist docblocks

--- a/include/git/projectlist/ProjectList.class.php
+++ b/include/git/projectlist/ProjectList.class.php
@@ -1,43 +1,26 @@
 <?php
 /**
- * GitPHP ProjectList
- *
  * Project list singleton instance and factory
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
- * @subpackage Git
- */
-
-/**
- * ProjectList class
- *
- * @package GitPHP
- * @subpackage Git
+ * @subpackage Git\ProjectList
  */
 class GitPHP_ProjectList
 {
 
 	/**
-	 * instance
+	 * The singleton instance of the projectlist
 	 *
-	 * Stores the singleton instance of the projectlist
-	 *
-	 * @access protected
-	 * @static
+	 * @var GitPHP_ProjectListBase
 	 */
 	protected static $instance = null;
 
 	/**
-	 * GetInstance
-	 *
 	 * Returns the singleton instance
 	 *
-	 * @access public
-	 * @static
-	 * @return mixed instance of projectlist
-	 * @throws Exception if projectlist has not been instantiated yet
+	 * @return GitPHP_ProjectListBase instance of projectlist
 	 */
 	public static function GetInstance()
 	{
@@ -45,12 +28,7 @@
 	}
 
 	/**
-	 * DestroyInstance
-	 *
 	 * Releases the singleton instance
-	 *
-	 * @access public
-	 * @static
 	 */
 	public static function DestroyInstance()
 	{
@@ -58,12 +36,8 @@
 	}
 
 	/**
-	 * Instantiate
-	 *
 	 * Instantiates the singleton instance
 	 *
-	 * @access private
-	 * @static
 	 * @param string $file config file with git projects
 	 * @param boolean $legacy true if this is the legacy project config
 	 * @throws Exception if there was an error reading the file

--- a/include/git/projectlist/ProjectListArray.class.php
+++ b/include/git/projectlist/ProjectListArray.class.php
@@ -1,33 +1,21 @@
 <?php
 /**
- * GitPHP ProjectListArray
- *
  * Lists all projects in a multidimensional array
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
- * @subpackage Git
- */
-
-/**
- * ProjectListArray class
- *
- * @package GitPHP
- * @subpackage Git
+ * @subpackage Git\ProjectList
  */
 class GitPHP_ProjectListArray extends GitPHP_ProjectListBase
 {
 
 	/**
-	 * __construct
-	 *
 	 * constructor
 	 *
 	 * @param string $projectRoot project root
 	 * @param mixed $projectArray array to read
 	 * @throws Exception if parameter is not an array
-	 * @access public
 	 */
 	public function __construct($projectRoot, $projectArray)
 	{
@@ -41,12 +29,7 @@
 	}
 
 	/**
-	 * PopulateProjects
-	 *
 	 * Populates the internal list of projects
-	 *
-	 * @access protected
-	 * @throws Exception if file cannot be read
 	 */
 	protected function PopulateProjects()
 	{
@@ -83,13 +66,10 @@
 	}
 
 	/**
-	 * InstantiateProject
-	 *
 	 * Instantiates project object
 	 *
-	 * @access protected
 	 * @param string $proj project
-	 * @return mixed project
+	 * @return GitPHP_Project project
 	 */
 	protected function InstantiateProject($proj)
 	{

--- a/include/git/projectlist/ProjectListArrayLegacy.class.php
+++ b/include/git/projectlist/ProjectListArrayLegacy.class.php
@@ -1,36 +1,26 @@
 <?php
 /**
- * GitPHP ProjectListArrayLegacy
- *
- * Lists all projects in a multidimensional array
- * Legacy array format
+ * Constant for no category indicator
+ */
+define('GITPHP_NO_CATEGORY', 'none');
+
+/**
+ * Lists all projects in a multidimensional array (Legacy array format)
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
- * @subpackage Git
- */
-
-define('GITPHP_NO_CATEGORY', 'none');
-
-/**
- * ProjectListArrayLegacy class
- *
- * @package GitPHP
- * @subpackage Git
+ * @subpackage Git\ProjectList
  */
 class GitPHP_ProjectListArrayLegacy extends GitPHP_ProjectListBase
 {
 
 	/**
-	 * __construct
-	 *
 	 * constructor
 	 *
 	 * @param string $projectRoot project root
 	 * @param mixed $projectArray array to read
 	 * @throws Exception if parameter is not an array
-	 * @access public
 	 */
 	public function __construct($projectRoot, $projectArray)
 	{
@@ -44,12 +34,7 @@
 	}
 
 	/**
-	 * PopulateProjects
-	 *
 	 * Populates the internal list of projects
-	 *
-	 * @access protected
-	 * @throws Exception if file cannot be read
 	 */
 	protected function PopulateProjects()
 	{
@@ -71,13 +56,10 @@
 	}
 
 	/**
-	 * InstantiateProject
-	 *
 	 * Instantiates project object
 	 *
-	 * @access protected
 	 * @param string $proj project
-	 * @return mixed project
+	 * @return GitPHP_Project project
 	 */
 	protected function InstantiateProject($proj)
 	{

--- a/include/git/projectlist/ProjectListBase.class.php
+++ b/include/git/projectlist/ProjectListBase.class.php
@@ -1,80 +1,72 @@
 <?php
 /**
- * GitPHP ProjectListBase
- *
+ * Constant for project name sort order
+ */
+define('GITPHP_SORT_PROJECT', 'project');
+
+/**
+ * Constant for project description sort order
+ */
+define('GITPHP_SORT_DESCRIPTION', 'descr');
+
+/**
+ * Constant for project owner sort order
+ */
+define('GITPHP_SORT_OWNER', 'owner');
+
+/**
+ * Constant for project age sort order
+ */
+define('GITPHP_SORT_AGE', 'age');
+
+/**
  * Base class that all projectlist classes extend
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
- * @subpackage Git
- */
-
-define('GITPHP_SORT_PROJECT', 'project');
-define('GITPHP_SORT_DESCRIPTION', 'descr');
-define('GITPHP_SORT_OWNER', 'owner');
-define('GITPHP_SORT_AGE', 'age');
-
-/**
- * ProjectListBase class
- *
- * @package GitPHP
- * @subpackage Git
- * @abstract
+ * @subpackage Git\ProjectList
  */
 abstract class GitPHP_ProjectListBase implements Iterator
 {
 	/**
-	 * projects
-	 *
-	 * Stores array of projects internally
-	 *
-	 * @access protected
+	 * Project list
+	 *
+	 * @var GitPHP_Project[]
 	 */
 	protected $projects;
 
 	/**
-	 * projectsLoaded
-	 *
-	 * Stores whether the list of projects has been loaded
-	 *
-	 * @access protected
+	 * Whether the list of projects has been loaded
+	 *
+	 * @var boolean
 	 */
 	protected $projectsLoaded = false;
 
 	/**
-	 * projectConfig
-	 *
-	 * Stores the project configuration internally
-	 *
-	 * @access protected
+	 * The project configuration
+	 *
+	 * @var string
 	 */
 	protected $projectConfig = null;
 
 	/**
-	 * projectSettings
-	 *
-	 * Stores the project settings internally
-	 *
-	 * @access protected
+	 * Project settings
+	 *
+	 * @var array
 	 */
 	protected $projectSettings = null;
 
 	/**
-	 * projectRoot
-	 *
-	 * Stores the project root internally
-	 *
-	 * @access protected
+	 * The project root
+	 *
+	 * @var string
 	 */
 	protected $projectRoot = null;
 
 	/**
-	 * __construct
-	 *
 	 * Constructor
 	 *
-	 * @access public
 	 * @param string $projectRoot project root
 	 */
 	public function __construct($projectRoot)
@@ -91,14 +83,10 @@
 	}
 
 	/**
-	 * HasProject
-	 *
-	 * Test if the projectlist contains
-	 * the given project
-	 *
-	 * @access public
+	 * Test if the projectlist contains the given project
+	 *
 	 * @return boolean true if project exists in list
-	 * @param string $project the project string to find
+	 * @param string $project the project to find
 	 */
 	public function HasProject($project)
 	{
@@ -109,12 +97,9 @@
 	}
 
 	/**
-	 * GetProject
-	 *
 	 * Gets a particular project
 	 *
-	 * @access public
-	 * @return mixed project object or null
+	 * @return GitPHP_Project|null project object or null
 	 * @param string $project the project to find
 	 */
 	public function GetProject($project)
@@ -135,13 +120,10 @@
 	}
 
 	/**
-	 * InstantiateProject
-	 *
 	 * Instantiates a project object
 	 *
-	 * @access protected
 	 * @param string $proj project
-	 * @return mixed project object
+	 * @return return GitPHP_Project project object
 	 */
 	protected function InstantiateProject($proj)
 	{
@@ -159,11 +141,9 @@
 	}
 
 	/**
-	 * GetConfig
-	 *
 	 * Gets the config defined for this ProjectList
 	 *
-	 * @access public
+	 * @return mixed project config
 	 */
 	public function GetConfig()
 	{
@@ -171,11 +151,9 @@
 	}
 
 	/**
-	 * GetSettings
-	 *
 	 * Gets the settings applied to this projectlist
 	 *
-	 * @access public
+	 * @return array
 	 */
 	public function GetSettings()
 	{
@@ -183,12 +161,9 @@
 	}
 
 	/**
-	 * ApplyGitConfig
-	 *
 	 * Reads the project's git config settings and applies them to the project
 	 *
-	 * @access protected
-	 * @param mixed $project project
+	 * @param GitPHP_Project $project project
 	 */
 	protected function ApplyGitConfig($project)
 	{
@@ -247,12 +222,9 @@
 	}
 
 	/**
-	 * ApplyGlobalConfig
-	 *
 	 * Applies global config settings to a project
 	 *
-	 * @access protected
-	 * @param mixed $project project
+	 * @param GitPHP_Project $project project
 	 */
 	protected function ApplyGlobalConfig($project)
 	{
@@ -287,11 +259,7 @@
 	}
 
 	/**
-	 * LoadProjects
-	 *
 	 * Loads all projects in the list
-	 *
-	 * @access public
 	 */
 	public function LoadProjects()
 	{
@@ -305,18 +273,14 @@
 	}
 
 	/**
-	 * PopulateProjects
-	 *
 	 * Populates the internal list of projects
-	 *
-	 * @access protected
 	 */
 	abstract protected function PopulateProjects();
 
 	/**
-	 * rewind
-	 *
 	 * Rewinds the iterator
+	 *
+	 * @return GitPHP_Project
 	 */
 	function rewind()
 	{
@@ -324,9 +288,9 @@
 	}
 
 	/**
-	 * current
-	 *
 	 * Returns the current element in the array
+	 *
+	 * @return GitPHP_Project
 	 */
 	function current()
 	{
@@ -334,9 +298,9 @@
 	}
 
 	/**
-	 * key
-	 *
 	 * Returns the current key
+	 *
+	 * @return string
 	 */
 	function key()
 	{
@@ -344,9 +308,9 @@
 	}
 
 	/**
-	 * next
-	 * 
 	 * Advance the pointer
+	 *
+	 * @return GitPHP_Project
 	 */
 	function next()
 	{
@@ -354,9 +318,9 @@
 	}
 
 	/**
-	 * valid
-	 *
 	 * Test for a valid pointer
+	 *
+	 * @return boolean
 	 */
 	function valid()
 	{
@@ -364,11 +328,8 @@
 	}
 
 	/**
-	 * Sort
-	 *
 	 * Sorts the project list
 	 *
-	 * @access public
 	 * @param string $sortBy sort method
 	 */
 	public function Sort($sortBy = GITPHP_SORT_PROJECT)
@@ -391,11 +352,8 @@
 	}
 
 	/**
-	 * Count
-	 *
 	 * Gets the count of projects
 	 *
-	 * @access public
 	 * @return integer number of projects
 	 */
 	public function Count()
@@ -404,13 +362,10 @@
 	}
 
 	/**
-	 * Filter
-	 *
 	 * Returns a filtered list of projects
 	 *
-	 * @access public
-	 * @param string $filter filter pattern
-	 * @return array array of filtered projects
+	 * @param string $pattern filter pattern
+	 * @return GitPHP_Project[] array of filtered projects
 	 */
 	public function Filter($pattern = null)
 	{
@@ -431,12 +386,9 @@
 	}
 
 	/**
-	 * ApplyProjectSettings
-	 *
 	 * Applies override settings for a project
 	 *
-	 * @access protected
-	 * @param string $project the project object
+	 * @param GitPHP_Project $project the project object
 	 * @param array $projData project data array
 	 */
 	protected function ApplyProjectSettings($project, $projData)
@@ -474,11 +426,8 @@
 	}
 
 	/**
-	 * SetSettings
-	 *
 	 * Sets a list of settings for the project list
 	 *
-	 * @access protected
 	 * @param array $settings the array of settings
 	 */
 	public function SetSettings($settings)
@@ -492,11 +441,7 @@
 	}
 
 	/**
-	 * ApplySettings
-	 *
 	 * Applies project settings to project list
-	 *
-	 * @access protected
 	 */
 	protected function ApplySettings()
 	{

--- a/include/git/projectlist/ProjectListDirectory.class.php
+++ b/include/git/projectlist/ProjectListDirectory.class.php
@@ -1,39 +1,25 @@
 <?php
 /**
- * GitPHP ProjectListDirectory
- *
  * Lists all projects in a given directory
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
- * @subpackage Git
- */
-
-/**
- * ProjectListDirectory class
- *
- * @package GitPHP
- * @subpackage Git
+ * @subpackage Git\ProjectList
  */
 class GitPHP_ProjectListDirectory extends GitPHP_ProjectListBase
 {
 
 	/**
-	 * exportedOnly
+	 * Whether to only list exported projects
 	 *
-	 * Stores whether to only list exported projects
-	 *
-	 * @access protected
+	 * @var boolean
 	 */
 	protected $exportedOnly = false;
 
 	/**
-	 * __construct
-	 *
 	 * Constructor
 	 *
-	 * @access public
 	 * @param string $projectRoot project root
 	 * @param bool $exportedOnly whether to only allow exported projects
 	 */
@@ -46,11 +32,9 @@
 	}
 
 	/**
-	 * GetExportedOnly
-	 *
 	 * Gets whether this list only allows exported projects
 	 *
-	 * @access public
+	 * @return boolean
 	 */
 	public function GetExportedOnly()
 	{
@@ -58,11 +42,7 @@
 	}
 	
 	/**
-	 * PopulateProjects
-	 *
 	 * Populates the internal list of projects
-	 *
-	 * @access protected
 	 */
 	protected function PopulateProjects()
 	{
@@ -70,8 +50,6 @@
 	}
 
 	/**
-	 * RecurseDir
-	 *
 	 * Recursively searches for projects
 	 *
 	 * @param string $dir directory to recurse into
@@ -110,13 +88,10 @@
 	}
 
 	/**
-	 * InstantiateProject
-	 *
 	 * Instantiates project object
 	 *
-	 * @access protected
 	 * @param string $proj project
-	 * @return mixed project
+	 * @return GitPHP_Project project
 	 */
 	protected function InstantiateProject($proj)
 	{

--- a/include/git/projectlist/ProjectListFile.class.php
+++ b/include/git/projectlist/ProjectListFile.class.php
@@ -1,51 +1,35 @@
 <?php
 /**
- * GitPHP ProjectListFile
- *
  * Lists all projects in a given file
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
- * @subpackage Git
- */
-
-/**
- * ProjectListFile class
- *
- * @package GitPHP
- * @subpackage Git
+ * @subpackage Git\ProjectList
  */
 class GitPHP_ProjectListFile extends GitPHP_ProjectListBase
 {
 
 	/**
-	 * fileContents
+	 * The contents of the project list file
 	 *
-	 * Stores the contents of the project list file
-	 *
-	 * @access protected
+	 * @var string[]
 	 */
 	protected $fileContents = array();
 
 	/**
-	 * fileRead
+	 * Whether the file has been read
 	 *
-	 * Stores whether the file has been read
-	 *
-	 * @access protected
+	 * @var boolean
 	 */
 	protected $fileRead = false;
 	
 	/**
-	 * __construct
-	 *
 	 * constructor
 	 *
 	 * @param string $projectRoot project root
 	 * @param string $projectFile file to read
 	 * @throws Exception if parameter is not a readable file
-	 * @access public
 	 */
 	public function __construct($projectRoot, $projectFile)
 	{
@@ -59,12 +43,7 @@
 	}
 
 	/**
-	 * PopulateProjects
-	 *
 	 * Populates the internal list of projects
-	 *
-	 * @access protected
-	 * @throws Exception if file cannot be read
 	 */
 	protected function PopulateProjects()
 	{
@@ -83,13 +62,10 @@
 	}
 
 	/**
-	 * InstantiateProject
-	 *
 	 * Instantiates the project object
 	 *
-	 * @access protected
 	 * @param string $proj project
-	 * @return mixed project object
+	 * @return GitPHP_Project project object
 	 */
 	protected function InstantiateProject($proj)
 	{
@@ -133,11 +109,7 @@
 	}
 
 	/**
-	 * ReadFile
-	 *
 	 * Reads the file contents
-	 *
-	 * @access protected
 	 */
 	protected function ReadFile()
 	{

--- a/include/git/projectlist/ProjectListScmManager.class.php
+++ b/include/git/projectlist/ProjectListScmManager.class.php
@@ -1,50 +1,34 @@
 <?php
 /**
- * GitPHP ProjectListScmManager
- *
  * Lists all projects in an scm-manager config file
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2011 Christopher Han
  * @package GitPHP
- * @subpackage Git
- */
-
-/**
- * ProjectListScmManager class
- *
- * @package GitPHP
- * @subpackage Git
+ * @subpackage Git\ProjectList
  */
 class GitPHP_ProjectListScmManager extends GitPHP_ProjectListBase
 {
 	/**
-	 * fileContents
+	 * The contents of the project config file
 	 *
-	 * Stores the contents of the project config file
-	 *
-	 * @access protected
+	 * @var array
 	 */
 	protected $fileContents = array();
 
 	/**
-	 * fileRead
+	 * Whether the file has been read
 	 *
-	 * Stores whether the file has been read
-	 *
-	 * @access protected
+	 * @var boolean
 	 */
 	protected $fileRead = false;
 	
 	/**
-	 * __construct
-	 *
 	 * constructor
 	 *
 	 * @param string $projectRoot project root
 	 * @param string $projectFile file to read
 	 * @throws Exception if parameter is not a readable file
-	 * @access public
 	 */
 	public function __construct($projectRoot, $projectFile)
 	{
@@ -58,12 +42,7 @@
 	}
 
 	/**
-	 * PopulateProjects
-	 *
 	 * Populates the internal list of projects
-	 *
-	 * @access protected
-	 * @throws Exception if file cannot be read
 	 */
 	protected function PopulateProjects()
 	{
@@ -80,13 +59,10 @@
 	}
 
 	/**
-	 * InstantiateProject
-	 *
 	 * Instantiates the project object
 	 *
-	 * @access protected
 	 * @param string $proj project
-	 * @return mixed project object
+	 * @return GitPHP_Project project object
 	 */
 	protected function InstantiateProject($proj)
 	{
@@ -143,11 +119,7 @@
 	}
 
 	/**
-	 * ReadFile
-	 *
 	 * Reads the file contents
-	 *
-	 * @access private
 	 */
 	protected function ReadFile()
 	{
@@ -189,11 +161,9 @@
 	}
 
 	/**
-	 * IsSCMManager
-	 *
 	 * Tests if this file is an SCM manager config file
 	 *
-	 * @access protected
+	 * @param string $file file
 	 * @returns true if file is an SCM manager config
 	 */
 	public static function IsSCMManager($file)

comments