@@ -46,7 +46,7 @@ function SourceTypes() {
4646/**
4747 * Determine if the Product Matrix integration is enabled, and trigger
4848 * an error if integration is enabled but the plugin is not running.
49- * @param boolean Trigger error
49+ * @param boolean $p_trigger_error Trigger error
5050 * @return boolean Integration enabled
5151 */
5252function Source_PVM ( $ p_trigger_error =true ) {
@@ -64,7 +64,7 @@ function Source_PVM( $p_trigger_error=true ) {
6464/**
6565 * Parse basic bug links from a changeset commit message
6666 * and return a list of referenced bug IDs.
67- * @param string Changeset commit message
67+ * @param string $p_string Changeset commit message
6868 * @return array Bug IDs
6969 */
7070function Source_Parse_Buglinks ( $ p_string ) {
@@ -94,7 +94,7 @@ function Source_Parse_Buglinks( $p_string ) {
9494/**
9595 * Parse resolved bug fix links from a changeset commit message
9696 * and return a list of referenced bug IDs.
97- * @param string Changeset commit message
97+ * @param string $p_string Changeset commit message
9898 * @return array Bug IDs
9999 */
100100function Source_Parse_Bugfixes ( $ p_string ) {
@@ -193,7 +193,7 @@ function Source_set_changeset_user( &$p_changeset, $p_user_type ) {
193193 * Determine the user ID for both the author and committer.
194194 * First checks the email address for a matching user, then
195195 * checks the name for a matching username or realname.
196- * @param object Changeset object
196+ * @param object $p_changeset Changeset object
197197 * @return object updated Changeset object
198198 */
199199function Source_Parse_Users ( $ p_changeset ) {
@@ -210,8 +210,8 @@ function Source_Parse_Users( $p_changeset ) {
210210/**
211211 * Given a set of changeset objects, parse the bug links
212212 * and save the changes.
213- * @param array Changeset objects
214- * @param object Repository object
213+ * @param array $p_changesets Changeset objects
214+ * @param object $p_repo Repository object
215215 */
216216function Source_Process_Changesets ( $ p_changesets , $ p_repo =null ) {
217217 global $ g_cache_current_user_id ;
@@ -459,7 +459,7 @@ static public function init() {
459459 /**
460460 * Retrieve an extension plugin that can handle the requested repo's VCS type.
461461 * If the requested type is not available, the "generic" type will be returned.
462- * @param object Repository object
462+ * @param object $p_repo Repository object
463463 * @return object VCS plugin
464464 */
465465 static public function repo ( $ p_repo ) {
@@ -469,7 +469,7 @@ static public function repo( $p_repo ) {
469469 /**
470470 * Retrieve an extension plugin that can handle the requested VCS type.
471471 * If the requested type is not available, the "generic" type will be returned.
472- * @param string VCS type
472+ * @param string $p_type VCS type
473473 * @return object VCS plugin
474474 */
475475 static public function type ( $ p_type ) {
@@ -500,6 +500,7 @@ class SourceVCSWrapper {
500500
501501 /**
502502 * Build a wrapper around a VCS plugin object.
503+ * @param $p_object
503504 */
504505 function __construct ( $ p_object ) {
505506 $ this ->object = $ p_object ;
@@ -508,6 +509,9 @@ function __construct( $p_object ) {
508509
509510 /**
510511 * Wrap method calls to the target object in plugin_push/pop calls.
512+ * @param $p_method
513+ * @param $p_args
514+ * @return mixed
511515 */
512516 function __call ( $ p_method , $ p_args ) {
513517 plugin_push_current ( $ this ->basename );
@@ -519,13 +523,18 @@ function __call( $p_method, $p_args ) {
519523
520524 /**
521525 * Wrap property reference to target object.
526+ * @param $p_name
527+ * @return mixed
522528 */
523529 function __get ( $ p_name ) {
524530 return $ this ->object ->$ p_name ;
525531 }
526532
527533 /**
528534 * Wrap property mutation to target object.
535+ * @param $p_name
536+ * @param $p_value
537+ * @return mixed
529538 */
530539 function __set ( $ p_name , $ p_value ) {
531540 return $ this ->object ->$ p_name = $ p_value ;
@@ -546,11 +555,10 @@ class SourceRepo {
546555
547556 /**
548557 * Build a new Repo object given certain properties.
549- * @param string Repo type
550- * @param string Name
551- * @param string URL
552- * @param string Path
553- * @param array Info
558+ * @param string $p_type Repo type
559+ * @param string $p_name Name
560+ * @param string $p_url URL
561+ * @param string $p_info Info
554562 */
555563 function __construct ( $ p_type , $ p_name , $ p_url ='' , $ p_info ='' ) {
556564 $ this ->id = 0 ;
@@ -631,6 +639,7 @@ function load_mappings() {
631639
632640 /**
633641 * Get a list of repository statistics.
642+ * @param bool $p_all
634643 * @return array Stats
635644 */
636645 function stats ( $ p_all =true ) {
@@ -662,8 +671,8 @@ function stats( $p_all=true ) {
662671
663672 /**
664673 * Fetch a new Repo object given an ID.
665- * @param int Repository ID
666- * @return multi Repo object
674+ * @param int $p_id Repository ID
675+ * @return object Repo object
667676 */
668677 static function load ( $ p_id ) {
669678 $ t_repo_table = plugin_table ( 'repository ' , 'Source ' );
@@ -685,8 +694,8 @@ static function load( $p_id ) {
685694
686695 /**
687696 * Fetch a new Repo object given a name.
688- * @param string Repository name
689- * @return multi Repo object
697+ * @param string $p_name Repository name
698+ * @return SourceRepo Repo object
690699 */
691700 static function load_from_name ( $ p_name ) {
692701 $ t_repo_table = plugin_table ( 'repository ' , 'Source ' );
@@ -730,7 +739,8 @@ static function load_all() {
730739
731740 /**
732741 * Fetch a repository object with the given name.
733- * @return multi Repo object, or null if not found
742+ * @param string $p_repo_name
743+ * @return null|SourceRepo Repo object, or null if not found
734744 */
735745 static function load_by_name ( $ p_repo_name ) {
736746 $ t_repo_table = plugin_table ( 'repository ' , 'Source ' );
@@ -759,7 +769,7 @@ static function load_by_name( $p_repo_name ) {
759769
760770 /**
761771 * Fetch an array of repository objects that includes all given changesets.
762- * @param array Changeset objects
772+ * @param array|SourceChangeset $p_changesets Changeset objects
763773 * @return array Repository objects
764774 */
765775 static function load_by_changesets ( $ p_changesets ) {
@@ -803,7 +813,7 @@ static function load_by_changesets( $p_changesets ) {
803813
804814 /**
805815 * Delete a repository with the given ID.
806- * @param int Repository ID
816+ * @param int $p_id Repository ID
807817 */
808818 static function delete ( $ p_id ) {
809819 SourceChangeset::delete_by_repo ( $ p_id );
@@ -816,7 +826,7 @@ static function delete( $p_id ) {
816826
817827 /**
818828 * Check to see if a repository exists with the given ID.
819- * @param int Repository ID
829+ * @param int $p_id Repository ID
820830 * @return boolean True if repository exists
821831 */
822832 static function exists ( $ p_id ) {
@@ -862,11 +872,16 @@ class SourceChangeset {
862872
863873 /**
864874 * Build a new changeset object given certain properties.
865- * @param int Repository ID
866- * @param string Changeset revision
867- * @param string Timestamp
868- * @param string Author
869- * @param string Commit message
875+ * @param int $p_repo_id Repository ID
876+ * @param string $p_revision Changeset revision
877+ * @param string $p_branch
878+ * @param string $p_timestamp Timestamp
879+ * @param string $p_author Author
880+ * @param string $p_message Commit message
881+ * @param int $p_user_id
882+ * @param string $p_parent
883+ * @param string $p_ported
884+ * @param string $p_author_email
870885 */
871886 function __construct ( $ p_repo_id , $ p_revision , $ p_branch ='' , $ p_timestamp ='' ,
872887 $ p_author ='' , $ p_message ='' , $ p_user_id =0 , $ p_parent ='' , $ p_ported ='' , $ p_author_email ='' ) {
@@ -948,6 +963,7 @@ function save() {
948963
949964 /**
950965 * Update changeset relations to affected bugs.
966+ * @param int $p_user_id
951967 */
952968 function save_bugs ( $ p_user_id =null ) {
953969 $ t_bug_table = plugin_table ( 'bug ' , 'Source ' );
@@ -1054,9 +1070,9 @@ function load_bugs() {
10541070
10551071 /**
10561072 * Check if a repository's changeset already exists in the database.
1057- * @param int Repo ID
1058- * @param string Revision
1059- * @param string Branch
1073+ * @param int $p_repo_id Repo ID
1074+ * @param string $p_revision Revision
1075+ * @param string $p_branch Branch
10601076 * @return boolean True if changeset exists
10611077 */
10621078 static function exists ( $ p_repo_id , $ p_revision , $ p_branch =null ) {
@@ -1077,8 +1093,8 @@ static function exists( $p_repo_id, $p_revision, $p_branch=null ) {
10771093
10781094 /**
10791095 * Fetch a new changeset object given an ID.
1080- * @param int Changeset ID
1081- * @return multi Changeset object
1096+ * @param int $p_id Changeset ID
1097+ * @return mixed Changeset object
10821098 */
10831099 static function load ( $ p_id ) {
10841100 $ t_changeset_table = plugin_table ( 'changeset ' , 'Source ' );
@@ -1097,9 +1113,9 @@ static function load( $p_id ) {
10971113
10981114 /**
10991115 * Fetch a changeset object given a repository and revision.
1100- * @param multi Repo object
1101- * @param string Revision
1102- * @return multi Changeset object
1116+ * @param object $p_repo Repo object
1117+ * @param string $p_revision Revision
1118+ * @return mixed Changeset object
11031119 */
11041120 static function load_by_revision ( $ p_repo , $ p_revision ) {
11051121 $ t_changeset_table = plugin_table ( 'changeset ' , 'Source ' );
@@ -1118,7 +1134,10 @@ static function load_by_revision( $p_repo, $p_revision ) {
11181134
11191135 /**
11201136 * Fetch an array of changeset objects for a given repository ID.
1121- * @param int Repository ID
1137+ * @param int $p_repo_id Repository ID
1138+ * @param bool $p_load_files
1139+ * @param null $p_page
1140+ * @param int $p_limit
11221141 * @return array Changeset objects
11231142 */
11241143 static function load_by_repo ( $ p_repo_id , $ p_load_files =false , $ p_page =null , $ p_limit =25 ) {
@@ -1137,7 +1156,8 @@ static function load_by_repo( $p_repo_id, $p_load_files=false, $p_page=null, $p_
11371156
11381157 /**
11391158 * Fetch an array of changeset objects for a given bug ID.
1140- * @param int Bug ID
1159+ * @param int $p_bug_id Bug ID
1160+ * @param bool $p_load_files
11411161 * @return array Changeset objects
11421162 */
11431163 static function load_by_bug ( $ p_bug_id , $ p_load_files =false ) {
@@ -1157,7 +1177,8 @@ static function load_by_bug( $p_bug_id, $p_load_files=false ) {
11571177 /**
11581178 * Return a set of changeset objects from a database result.
11591179 * Assumes selecting * from changeset_table.
1160- * @param object Database result
1180+ * @param IteratorAggregate $p_result Database result
1181+ * @param bool $p_load_files
11611182 * @return array Changeset objects
11621183 */
11631184 static function from_result ( $ p_result , $ p_load_files =false ) {
@@ -1192,7 +1213,7 @@ static function from_result( $p_result, $p_load_files=false ) {
11921213
11931214 /**
11941215 * Delete all changesets for a given repository ID.
1195- * @param int Repository ID
1216+ * @param int $p_repo_id Repository ID
11961217 */
11971218 static function delete_by_repo ( $ p_repo_id ) {
11981219 $ t_bug_table = plugin_table ( 'bug ' , 'Source ' );
@@ -1288,7 +1309,7 @@ static function delete_by_changeset( $p_change_id ) {
12881309
12891310 /**
12901311 * Delete all file objects from the database for a given repository.
1291- * @param int Repository ID
1312+ * @param int $p_repo_id Repository ID
12921313 */
12931314 static function delete_by_repo ( $ p_repo_id ) {
12941315 $ t_file_table = plugin_table ( 'file ' , 'Source ' );
@@ -1314,9 +1335,12 @@ class SourceMapping {
13141335
13151336 /**
13161337 * Initialize a mapping object.
1317- * @param int Repository ID
1318- * @param string Branch name
1319- * @param int Mapping type
1338+ * @param int $p_repo_id
1339+ * @param string $p_branch
1340+ * @param int $p_type
1341+ * @param string $p_version
1342+ * @param string $p_regex
1343+ * @param int $p_pvm_version_id
13201344 */
13211345 function __construct ( $ p_repo_id , $ p_branch , $ p_type , $ p_version ='' , $ p_regex ='' , $ p_pvm_version_id =0 ) {
13221346 $ this ->repo_id = $ p_repo_id ;
@@ -1362,8 +1386,8 @@ function delete() {
13621386
13631387 /**
13641388 * Load a group of mapping objects for a given repository.
1365- * @param object Repository object
1366- * @param array Mapping objects
1389+ * @param int $p_repo_id Repository object
1390+ * @return array Mapping objects
13671391 */
13681392 static function load_by_repo ( $ p_repo_id ) {
13691393 $ t_branch_table = plugin_table ( 'branch ' );
@@ -1386,7 +1410,7 @@ static function load_by_repo( $p_repo_id ) {
13861410 /**
13871411 * Given a bug ID, apply the appropriate branch mapping algorithm
13881412 * to find and return the appropriate version ID.
1389- * @param int Bug ID
1413+ * @param int $p_bug_id Bug ID
13901414 * @return int Version ID
13911415 */
13921416 function apply ( $ p_bug_id ) {
@@ -1451,7 +1475,7 @@ function apply( $p_bug_id ) {
14511475 /**
14521476 * Given a bug ID, apply the appropriate branch mapping algorithm
14531477 * to find and return the appropriate product matrix version ID.
1454- * @param int Bug ID
1478+ * @param int $p_bug_id Bug ID
14551479 * @return int Product version ID
14561480 */
14571481 function apply_pvm ( $ p_bug_id ) {
@@ -1495,7 +1519,7 @@ function __construct( $p_user_id, $p_username='' ) {
14951519 /**
14961520 * Load a user object from the database for a given user ID, or generate
14971521 * a new object if the database entry does not exist.
1498- * @param int User ID
1522+ * @param int $p_user_id User ID
14991523 * @return object User object
15001524 */
15011525 static function load ( $ p_user_id ) {
0 commit comments