Clean up docblock on base namespace objects
Clean up docblock on base namespace objects

--- a/include/AutoLoader.class.php
+++ b/include/AutoLoader.class.php
@@ -1,28 +1,16 @@
 <?php
 /**
- * GitPHP AutoLoader
- *
  * Class to handle autoloading other classes
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2012 Christopher Han
  * @package GitPHP
  */
-
-/**
- * AutoLoader class
- *
- * @package GitPHP
- */
 class GitPHP_AutoLoader
 {
 	/**
-	 * AutoLoad
-	 *
 	 * Autoload a class
 	 *
-	 * @access public
-	 * @static
 	 * @param string $classname class name
 	 */
 	public static function AutoLoad($classname)
@@ -39,12 +27,8 @@
 	}
 
 	/**
-	 * ClassPath
+	 * Get the path to a class
 	 *
-	 * Gets the path a class
-	 *
-	 * @access public
-	 * @static
 	 * @param string $classname class name
 	 * @return string path
 	 */

--- a/include/Config.class.php
+++ b/include/Config.class.php
@@ -1,63 +1,59 @@
 <?php
 /**
- * GitPHP Config
- *
+ * Constant for tar archive
+ */
+define('GITPHP_COMPRESS_TAR', 'tar');
+
+/**
+ * Constant for bz2 archive
+ */
+define('GITPHP_COMPRESS_BZ2', 'tbz2');
+
+/**
+ * Constant for gz archive
+ */
+define('GITPHP_COMPRESS_GZ', 'tgz');
+
+/**
+ * Constant for zip archive
+ */
+define('GITPHP_COMPRESS_ZIP', 'zip');
+
+/**
  * Configfile reader class
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
  */
-
-define('GITPHP_COMPRESS_TAR', 'tar');
-define('GITPHP_COMPRESS_BZ2', 'tbz2');
-define('GITPHP_COMPRESS_GZ', 'tgz');
-define('GITPHP_COMPRESS_ZIP', 'zip');
-
-/**
- * Config class
- *
- * @package GitPHP
- */
 class GitPHP_Config
 {
 	
 	/**
-	 * instance
-	 *
 	 * Stores the singleton instance
 	 *
-	 * @access protected
-	 * @static
+	 * @var GitPHP_Config
 	 */
 	protected static $instance;
 
 	/**
-	 * values
-	 *
 	 * Stores the config values
 	 *
-	 * @access protected
+	 * @var array
 	 */
 	protected $values = array();
 
 	/**
-	 * configs
-	 *
 	 * Stores the config files
 	 *
-	 * @access protected
+	 * @var string[]
 	 */
 	protected $configs = array();
 
 	/**
-	 * GetInstance
-	 *
 	 * Returns the singleton instance
 	 *
-	 * @access public
-	 * @static
-	 * @return mixed instance of config class
+	 * @return GitPHP_Config instance of config class
 	 */
 	public static function GetInstance()
 	{
@@ -68,12 +64,7 @@
 	}
 
 	/**
-	 * DestroyInstance
-	 *
 	 * Releases the singleton instance
-	 *
-	 * @access public
-	 * @static
 	 */
 	public static function DestroyInstance()
 	{
@@ -81,22 +72,15 @@
 	}
 
 	/**
-	 * __construct
-	 *
 	 * Class constructor
-	 *
-	 * @access private
 	 */
 	private function __construct()
 	{
 	}
 
 	/**
-	 * LoadConfig
-	 *
 	 * Loads a config file
 	 *
-	 * @access public
 	 * @param string $configFile config file to load
 	 * @throws Exception on failure
 	 */
@@ -121,11 +105,7 @@
 	}
 
 	/**
-	 * ClearConfig
-	 *
 	 * Clears all config values
-	 *
-	 * @access public
 	 */
 	public function ClearConfig()
 	{
@@ -134,13 +114,10 @@
 	}
 
 	/**
-	 * GetValue
-	 *
 	 * Gets a config value
 	 *
-	 * @access public
-	 * @param $key config key to fetch
-	 * @param $default default config value to return
+	 * @param string $key config key to fetch
+	 * @param mixed $default default config value to return
 	 * @return mixed config value
 	 */
 	public function GetValue($key, $default = null)
@@ -152,11 +129,8 @@
 	}
 
 	/**
-	 * SetValue
-	 *
 	 * Sets a config value
 	 *
-	 * @access public
 	 * @param string $key config key to set
 	 * @param mixed $value value to set
 	 */
@@ -173,11 +147,8 @@
 	}
 
 	/**
-	 * HasKey
-	 *
 	 * Tests if the config has specified this key
 	 *
-	 * @access public
 	 * @param string $key config key to find
 	 * @return boolean true if key exists
 	 */

--- a/include/DebugLog.class.php
+++ b/include/DebugLog.class.php
@@ -1,84 +1,59 @@
 <?php
 /**
- * GitPHP DebugLog
- *
- * Debug Logging class
+ * Debug logging class
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
  */
-
-/**
- * Debug logging class
- *
- * @package GitPHP
- */
 class GitPHP_DebugLog
 {
 	/**
-	 * instance
-	 *
 	 * Stores the singleton instance
 	 *
-	 * @access protected
-	 * @static
+	 * @var GitPHP_DebugLog
 	 */
 	protected static $instance;
 
 	/**
-	 * enabled
-	 *
 	 * Stores whether logging is enabled
 	 *
-	 * @access protected
+	 * @var boolean
 	 */
 	protected $enabled = false;
 
 	/**
-	 * benchmark
-	 *
 	 * Stores whether benchmarking is enabled
 	 *
-	 * @access protected
+	 * @var boolean
 	 */
 	protected $benchmark = false;
 
 	/**
-	 * startTime
-	 *
 	 * Stores the starting instant
 	 *
-	 * @access protected
+	 * @var float
 	 */
 	protected $startTime;
 
 	/**
-	 * startMem
-	 *
 	 * Stores the starting memory
 	 *
-	 * @access protected
+	 * @var int
 	 */
 	protected $startMem;
 
 	/**
-	 * entries
-	 *
 	 * Stores the log entries
 	 *
-	 * @access protected
+	 * @var string[]
 	 */
 	protected $entries = array();
 
 	/**
-	 * GetInstance
-	 *
 	 * Returns the singleton instance
 	 *
-	 * @access public
-	 * @static
-	 * @return mixed instance of logging clas
+	 * @return GitPHP_DebugLog instance of logging class
 	 */
 	public static function GetInstance()
 	{
@@ -91,12 +66,7 @@
 	}
 
 	/**
-	 * DestroyInstance
-	 *
 	 * Releases the singleton instance
-	 *
-	 * @access public
-	 * @static
 	 */
 	public static function DestroyInstance()
 	{
@@ -104,12 +74,10 @@
 	}
 
 	/**
-	 * __construct
-	 *
 	 * Constructor
 	 *
-	 * @access private
-	 * @return Log object
+	 * @param boolean $enabled whether log should be enabled
+	 * @param boolean $benchmark whether benchmarking should be enabled
 	 */
 	private function __construct($enabled = false, $benchmark = false)
 	{
@@ -121,11 +89,8 @@
 	}
 
 	/**
-	 * SetStartTime
-	 *
 	 * Sets start time
 	 *
-	 * @access public
 	 * @param float $start starting microtime
 	 */
 	public function SetStartTime($start)
@@ -134,11 +99,8 @@
 	}
 
 	/**
-	 * SetStartMemory
-	 *
 	 * Sets start memory
 	 *
-	 * @access public
 	 * @param integer $start starting memory
 	 */
 	public function SetStartMemory($start)
@@ -147,11 +109,8 @@
 	}
 
 	/**
-	 * Log
-	 *
 	 * Log an entry
 	 *
-	 * @access public
 	 * @param string $message message to log
 	 */
 	public function Log($message)
@@ -171,11 +130,8 @@
 	}
 
 	/**
-	 * GetEnabled
-	 *
 	 * Gets whether logging is enabled
 	 *
-	 * @access public
 	 * @return boolean true if logging is enabled
 	 */
 	public function GetEnabled()
@@ -184,11 +140,8 @@
 	}
 
 	/**
-	 * SetEnabled
-	 *
 	 * Sets whether logging is enabled
 	 *
-	 * @access public
 	 * @param boolean $enable true if logging is enabled
 	 */
 	public function SetEnabled($enable)
@@ -197,11 +150,8 @@
 	}
 
 	/**
-	 * GetBenchmark
-	 *
 	 * Gets whether benchmarking is enabled
 	 *
-	 * @access public
 	 * @return boolean true if benchmarking is enabled
 	 */
 	public function GetBenchmark()
@@ -210,11 +160,8 @@
 	}
 
 	/**
-	 * SetBenchmark
-	 *
 	 * Sets whether benchmarking is enabled
 	 *
-	 * @access public
 	 * @param boolean $bench true if benchmarking is enabled
 	 */
 	public function SetBenchmark($bench)
@@ -223,12 +170,9 @@
 	}
 
 	/**
-	 * GetEntries
-	 *
-	 * Calculates times and gets log entries
-	 *
-	 * @access public
-	 * @return array log entries
+	 * Gets log entries
+	 *
+	 * @return string[] log entries
 	 */
 	public function GetEntries()
 	{

--- a/include/MessageException.class.php
+++ b/include/MessageException.class.php
@@ -1,36 +1,35 @@
 <?php
 /**
- * GitPHP Message exception
- *
  * Custom exception for signalling display of a message to user
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
  */
-
-/**
- * Message Exception
- *
- * @package GitPHP
- */
 class GitPHP_MessageException extends Exception
 {
 
+	/**
+	 * Whether this is an error or informational
+	 *
+	 * @var boolean
+	 */
 	public $Error;
 
+	/**
+	 * HTTP status code
+	 *
+	 * @var integer
+	 */
 	public $StatusCode;
 	
 	/**
 	 * Constructor
 	 *
-	 * @access public
 	 * @param string $message message string
 	 * @param boolean $error true if this is an error rather than informational
 	 * @param integer $statusCode HTTP status code to return
 	 * @param integer $code exception code
-	 * @param Exception $previous previous exception
-	 * @return Exception message exception object
 	 */
 	public function __construct($message, $error = false, $statusCode = 200, $code = 0) {
 		$this->Error = $error;

--- a/include/Resource.class.php
+++ b/include/Resource.class.php
@@ -1,28 +1,19 @@
 <?php
+
+require_once(GITPHP_BASEDIR . 'lib/php-gettext/streams.php');
+require_once(GITPHP_BASEDIR . 'lib/php-gettext/gettext.php');
+
 /**
- * GitPHP Resource
- *
- * Resource factory
+ * Resource string manager class
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
  * @package GitPHP
  */
-
-require_once(GITPHP_BASEDIR . 'lib/php-gettext/streams.php');
-require_once(GITPHP_BASEDIR . 'lib/php-gettext/gettext.php');
-
-/**
- * Resource factory class
- *
- * @package GitPHP
- */
 class GitPHP_Resource
 {
 
 	/**
-	 * LocaleCookie
-	 *
 	 * Constant of the locale cookie in the user's browser
 	 *
 	 * @const
@@ -30,8 +21,6 @@
 	const LocaleCookie = 'GitPHPLocale';
 
 	/**
-	 * LocaleCookieLifetime
-	 *
 	 * Locale cookie lifetime
 	 *
 	 * @const
@@ -39,33 +28,23 @@
 	const LocaleCookieLifetime = 31536000;	// 1 year
 	
 	/**
-	 * instance
-	 *
 	 * Stores the singleton instance of the resource provider
 	 *
-	 * @access protected
-	 * @static
+	 * @var gettext_reader
 	 */
 	protected static $instance = null;
 
 	/**
-	 * currentLocale
-	 *
 	 * Stores the currently instantiated locale identifier
 	 *
-	 * @access protected
-	 * @static
+	 * @var string
 	 */
 	protected static $currentLocale = '';
 
 	/**
-	 * GetInstance
-	 *
 	 * Returns the singleton instance
 	 *
-	 * @access public
-	 * @static
-	 * @return mixed instance of resource class
+	 * @return gettext_reader instance of resource class
 	 */
 	public static function GetInstance()
 	{
@@ -73,12 +52,7 @@
 	}
 
 	/**
-	 * DestroyInstance
-	 *
 	 * Releases the singleton instance
-	 *
-	 * @access public
-	 * @static
 	 */
 	public static function DestroyInstance()
 	{
@@ -86,12 +60,8 @@
 	}
 
 	/**
-	 * Instantiated
-	 *
 	 * Tests if the resource provider has been instantiated
 	 *
-	 * @access public
-	 * @static
 	 * @return boolean true if resource provider is instantiated
 	 */
 	public static function Instantiated()
@@ -100,12 +70,8 @@
 	}
 
 	/**
-	 * GetLocale
-	 *
 	 * Gets the currently instantiated locale
 	 *
-	 * @access public
-	 * @static
 	 * @return string locale identifier
 	 */
 	public static function GetLocale()
@@ -114,12 +80,8 @@
 	}
 
 	/**
-	 * GetLocaleName
-	 *
 	 * Gets the current instantiated locale's name
 	 *
-	 * @access public
-	 * @static
 	 * @return string locale name
 	 */
 	public static function GetLocaleName()
@@ -128,14 +90,10 @@
 	}
 
 	/**
-	 * LocaleToName
-	 *
 	 * Given a locale, returns a human readable name
 	 *
-	 * @access public
-	 * @static
 	 * @param string $locale locale
-	 * return string name
+	 * @return string name
 	 */
 	public static function LocaleToName($locale)
 	{
@@ -165,13 +123,9 @@
 	}
 
 	/**
-	 * SupportedLocales
-	 *
 	 * Gets the list of supported locales and their languages
 	 *
-	 * @access public
-	 * @static
-	 * @return array list of locales mapped to languages
+	 * @return string[] array of locales mapped to languages
 	 */
 	public static function SupportedLocales()
 	{
@@ -202,12 +156,8 @@
 	}
 
 	/**
-	 * FindPreferredLocale
-	 *
 	 * Given a list of preferred locales, try to find a matching supported locale
 	 *
-	 * @access public
-	 * @static
 	 * @param string $httpAcceptLang HTTP Accept-Language string
 	 * @return string matching locale if found
 	 */
@@ -258,12 +208,8 @@
 	}
 
 	/**
-	 * Instantiate
-	 *
 	 * Instantiates the singleton instance
 	 *
-	 * @access public
-	 * @static
 	 * @param string $locale locale to instantiate
 	 * @return boolean true if resource provider was instantiated successfully
 	 */
@@ -283,15 +229,11 @@
 	}
 
 	/**
-	 * CreateLocale
-	 *
 	 * Creates a locale reader object
 	 *
-	 * @access private
-	 * @static
 	 * @param string $locale locale to create
 	 * @param boolean $cache false to disable caching
-	 * @return mixed locale reader object or null on failure
+	 * @return gettext_reader|null locale reader object or null on failure
 	 */
 	private static function CreateLocale($locale, $cache = true)
 	{
@@ -310,10 +252,11 @@
 
 
 /**
- * Gettext wrapper function for readability, single string
+ * Gettext wrapper function for readability, single string version
  *
  * @param string $str string to translate
  * @return string translated string
+ * @package GitPHP
  */
 function __($str)
 {
@@ -329,6 +272,7 @@
  * @param string $plural plural form of string
  * @param int $count number of items
  * @return string translated string
+ * @package GitPHP
  */
 function __n($singular, $plural, $count)
 {

--- a/include/Util.class.php
+++ b/include/Util.class.php
@@ -1,32 +1,20 @@
 <?php
 /**
- * GitPHP Util
- *
- * Utility functions
+ * Utility function class
  *
  * @author Christopher Han <xiphux@gmail.com>
  * @copyright Copyright (c) 2010 Christopher Han
- * @package GitPHP
- */
-
-/**
- * Util class
- *
  * @package GitPHP
  */
 class GitPHP_Util
 {
 
 	/**
-	 * AddSlash
-	 *
 	 * Adds a trailing slash to a directory path if necessary
 	 *
-	 * @access public
-	 * @static
 	 * @param string $path path to add slash to
-	 * @param $filesystem true if this is a filesystem path (to also check for backslash for windows paths)
-	 * @return string $path with a trailing slash
+	 * @param boolean $filesystem true if this is a filesystem path (to also check for backslash for windows paths)
+	 * @return string path with a trailing slash
 	 */
 	public static function AddSlash($path, $filesystem = true)
 	{
@@ -47,12 +35,8 @@
 	}
 
 	/**
-	 * IsWindows
-	 *
 	 * Tests if this is running on windows
 	 *
-	 * @access public
-	 * @static
 	 * @return bool true if on windows
 	 */
 	public static function IsWindows()
@@ -61,12 +45,8 @@
 	}
 
 	/**
-	 * Is64Bit
-	 *
 	 * Tests if this is a 64 bit machine
 	 *
-	 * @access public
-	 * @static
 	 * @return bool true if on 64 bit
 	 */
 	public static function Is64Bit()
@@ -75,13 +55,9 @@
 	}
 
 	/**
-	 * MakeSlug
-	 *
 	 * Turn a string into a filename-friendly slug
 	 *
-	 * @access public
 	 * @param string $str string to slugify
-	 * @static
 	 * @return string slug
 	 */
 	public static function MakeSlug($str)
@@ -96,16 +72,12 @@
 	}
 
 	/**
-	 * BaseName
-	 *
 	 * Get the filename of a given path
 	 *
-	 * based on Drupal's basename
+	 * Based on Drupal's basename
 	 *
-	 * @access public
 	 * @param string $path path
 	 * @param string $suffix optionally trim this suffix
-	 * @static
 	 * @return string filename
 	 */
 	public static function BaseName($path, $suffix = null)
@@ -130,14 +102,10 @@
 	}
 
 	/**
-	 * GeshiFilenameToLanguage
-	 *
 	 * Provides a geshi language for a given filename
 	 *
-	 * @access public
 	 * @param string $filename file name
 	 * @return string language
-	 * @static
 	 */
 	public static function GeshiFilenameToLanguage($filename)
 	{
@@ -149,14 +117,10 @@
 	}
 
 	/**
-	 * ListDir
-	 *
 	 * Recurses into a directory and lists files inside
 	 *
-	 * @access public
-	 * @static
 	 * @param string $dir directory
-	 * @return array array of filenames
+	 * @return string[] array of filenames
 	 */
 	public static function ListDir($dir)
 	{

--- a/include/version.php
+++ b/include/version.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * GitPHP version
- *
  * Version header
  *
  * @author Christopher Han <xiphux@gmail.com>

comments