Skip to content

Commit

Permalink
Merge pull request #9039 from totten/master-cleanup-phan
Browse files Browse the repository at this point in the history
(NFC-ish) Multiple doc block cleanups
  • Loading branch information
totten authored Sep 17, 2016
2 parents b1af0c2 + 4b35017 commit 6c65445
Show file tree
Hide file tree
Showing 22 changed files with 53 additions and 45 deletions.
2 changes: 1 addition & 1 deletion CRM/Batch/Form/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function buildQuickForm() {
* Posted values of the form.
* @param array $files
* List of errors to be posted back to the form.
* @param array $self
* @param \CRM_Batch_Form_Entry $self
* Form object.
*
* @return array
Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public function table() {
*
* @param bool $hook
*
* @return $this
* @return CRM_Core_DAO
*/
public function save($hook = TRUE) {
if (!empty($this->id)) {
Expand Down
16 changes: 12 additions & 4 deletions CRM/Core/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,24 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
public $_defaults = array();

/**
* The options passed into this form
* (QUASI-PROTECTED) The options passed into this form
*
* This field should marked `protected` and is not generally
* intended for external callers, but some edge-cases do use it.
*
* @var mixed
*/
protected $_options = NULL;
public $_options = NULL;

/**
* The mode of operation for this form
* (QUASI-PROTECTED) The mode of operation for this form
*
* This field should marked `protected` and is not generally
* intended for external callers, but some edge-cases do use it.
*
* @var int
*/
protected $_action;
public $_action;

/**
* Available payment processors.
Expand Down
4 changes: 2 additions & 2 deletions CRM/Event/Cart/BAO/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CRM_Event_Cart_BAO_Cart extends CRM_Event_Cart_DAO_Cart {
/**
* @param array $params
*
* @return $this
* @return CRM_Event_Cart_BAO_Cart
*/
public static function add(&$params) {
$cart = new CRM_Event_Cart_BAO_Cart();
Expand Down Expand Up @@ -57,7 +57,7 @@ public function add_participant_to_cart($participant) {
/**
* @param array $params
*
* @return $this
* @return CRM_Event_Cart_BAO_Cart
* @throws Exception
*/
public static function create($params) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Extension/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function __destruct() {

/**
* Registers this instance as an autoloader.
* @return $this
* @return CRM_Extension_ClassLoader
*/
public function register() {
// In pre-installation environments, don't bother with caching.
Expand Down
2 changes: 1 addition & 1 deletion CRM/Report/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class CRM_Report_Form extends CRM_Core_Form {
*
* @var array
*/
protected $_options = array();
public $_options = array();

/**
* By default most reports hide contact id.
Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/Cache/Memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CRM_Utils_Cache_Memcache implements CRM_Utils_Cache_Interface {
/**
* The actual memcache object.
*
* @var resource
* @var Memcache
*/
protected $_cache;

Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/Cache/Memcached.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CRM_Utils_Cache_Memcached implements CRM_Utils_Cache_Interface {
/**
* The actual memcache object.
*
* @var resource
* @var Memcached
*/
protected $_cache;

Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/SQL/Insert.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function __construct($table) {
*
* @param array $columns
*
* @return $this
* @return CRM_Utils_SQL_Insert
* @throws \CRM_Core_Exception
*/
public function columns($columns) {
Expand Down
10 changes: 5 additions & 5 deletions CRM/Utils/SQL/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function copy() {
* @param CRM_Utils_SQL_Select $other
* @param array|NULL $parts
* ex: 'joins', 'wheres'
* @return $this
* @return CRM_Utils_SQL_Select
*/
public function merge($other, $parts = NULL) {
if ($other === NULL) {
Expand Down Expand Up @@ -340,7 +340,7 @@ public function orderBy($exprs, $args = NULL) {
* @param array|string $keys
* Key name, or an array of key-value pairs.
* @param null|mixed $value
* @return $this
* @return \CRM_Utils_SQL_Select
*/
public function param($keys, $value = NULL) {
if ($this->mode === self::INTERPOLATE_AUTO) {
Expand Down Expand Up @@ -389,7 +389,7 @@ public function limit($limit, $offset = 0) {
* The name of the other table (which receives new data).
* @param array $fields
* The fields to fill in the other table (in order).
* @return $this
* @return CRM_Utils_SQL_Select
* @see insertIntoField
*/
public function insertInto($table, $fields = array()) {
Expand All @@ -401,7 +401,7 @@ public function insertInto($table, $fields = array()) {
/**
* @param array $fields
* The fields to fill in the other table (in order).
* @return $this
* @return CRM_Utils_SQL_Select
*/
public function insertIntoField($fields) {
$fields = (array) $fields;
Expand Down Expand Up @@ -449,7 +449,7 @@ public function isEmpty($parts = NULL) {
* In strict mode, unknown variables will generate exceptions.
*
* @param bool $strict
* @return $this
* @return CRM_Utils_SQL_Select
*/
public function strict($strict = TRUE) {
$this->strict = $strict;
Expand Down
2 changes: 1 addition & 1 deletion Civi/API/ExternalBatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct($defaultParams = array()) {
* @param string $entity
* @param string $action
* @param array $params
* @return $this
* @return ExternalBatch
*/
public function addCall($entity, $action, $params = array()) {
$params = array_merge($this->defaultParams, $params);
Expand Down
2 changes: 1 addition & 1 deletion Civi/API/SelectQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function run() {

/**
* @param \CRM_Utils_SQL_Select $sqlFragment
* @return $this
* @return SelectQuery
*/
public function merge($sqlFragment) {
$this->query->merge($sqlFragment);
Expand Down
2 changes: 1 addition & 1 deletion Civi/ActionSchedule/Event/MappingRegisterEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MappingRegisterEvent extends Event {
*
* @param MappingInterface $mapping
* The new mapping.
* @return $this
* @return MappingRegisterEvent
*/
public function register(MappingInterface $mapping) {
$this->mappings[$mapping->getId()] = $mapping;
Expand Down
2 changes: 1 addition & 1 deletion Civi/Core/Lock/LockManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function getFactory($name) {
* @param string|array $factory
* A callback. The callback should accept a $name parameter.
* Callbacks will be located using the resolver.
* @return $this
* @return LockManager
* @see Resolver
*/
public function register($pattern, $factory) {
Expand Down
2 changes: 1 addition & 1 deletion Civi/Core/Paths.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct() {
* Function which returns an array with keys:
* - path: string.
* - url: string.
* @return $this
* @return Paths
*/
public function register($name, $factory) {
$this->variableFactory[$name] = $factory;
Expand Down
12 changes: 6 additions & 6 deletions Civi/Core/SettingsBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function __construct($domainId, $contactId) {
*
* @param array $defaults
* Array(string $settingName => mixed $value).
* @return $this
* @return SettingsBag
*/
public function loadDefaults($defaults) {
$this->defaults = $defaults;
Expand All @@ -111,7 +111,7 @@ public function loadDefaults($defaults) {
*
* @param array $mandatory
* Array(string $settingName => mixed $value).
* @return $this
* @return SettingsBag
*/
public function loadMandatory($mandatory) {
$this->mandatory = $mandatory;
Expand All @@ -122,7 +122,7 @@ public function loadMandatory($mandatory) {
/**
* Load all explicit settings that apply to this domain or contact.
*
* @return $this
* @return SettingsBag
*/
public function loadValues() {
// Note: Don't use DAO child classes. They require fields() which require
Expand Down Expand Up @@ -162,7 +162,7 @@ public function loadValues() {
*
* @param array $settings
* Array(string $settingName => mixed $settingValue).
* @return $this
* @return SettingsBag
*/
public function add(array $settings) {
foreach ($settings as $key => $value) {
Expand Down Expand Up @@ -251,7 +251,7 @@ public function hasExplict($key) {
*
* @param string $key
* The simple name of the setting.
* @return $this
* @return SettingsBag
*/
public function revert($key) {
// It might be better to DELETE (to avoid long-term leaks),
Expand All @@ -266,7 +266,7 @@ public function revert($key) {
* The simple name of the setting.
* @param mixed $value
* The new, explicit value of the setting.
* @return $this
* @return SettingsBag
*/
public function set($key, $value) {
$this->setDb($key, $value);
Expand Down
6 changes: 3 additions & 3 deletions Civi/Core/SettingsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function __construct($cache) {
* Ensure that all defaults values are included with
* all current and future bags.
*
* @return $this
* @return SettingsManager
*/
public function useDefaults() {
if (!$this->useDefaults) {
Expand Down Expand Up @@ -130,7 +130,7 @@ public function useDefaults() {
* If you call useMandatory multiple times, it will
* re-scan the global $civicrm_setting.
*
* @return $this
* @return SettingsManager
*/
public function useMandatory() {
$this->mandatory = NULL;
Expand Down Expand Up @@ -293,7 +293,7 @@ public static function parseMandatorySettings($civicrm_setting) {
/**
* Flush all in-memory and persistent caches related to settings.
*
* @return $this
* @return SettingsManager
*/
public function flush() {
$this->mandatory = NULL;
Expand Down
10 changes: 5 additions & 5 deletions Civi/Test/CiviEnvBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function sqlFile($file) {
*
* @param string|array $names
* One or more extension names. You may use a wildcard '*'.
* @return $this
* @return CiviEnvBuilder
*/
public function install($names) {
return $this->addStep(new ExtensionsStep('install', $names));
Expand All @@ -66,7 +66,7 @@ public function install($names) {
* @param string $dir
* The current test directory. We'll search for info.xml to
* see what this extension is.
* @return $this
* @return CiviEnvBuilder
* @throws \CRM_Extension_Exception_ParseException
*/
public function installMe($dir) {
Expand All @@ -78,7 +78,7 @@ public function installMe($dir) {
*
* @param string|array $names
* One or more extension names. You may use a wildcard '*'.
* @return $this
* @return CiviEnvBuilder
*/
public function uninstall($names) {
return $this->addStep(new ExtensionsStep('uninstall', $names));
Expand All @@ -90,7 +90,7 @@ public function uninstall($names) {
* @param string $dir
* The current test directory. We'll search for info.xml to
* see what this extension is.
* @return $this
* @return CiviEnvBuilder
* @throws \CRM_Extension_Exception_ParseException
*/
public function uninstallMe($dir) {
Expand Down Expand Up @@ -165,7 +165,7 @@ protected function setSavedSignature($newSignature) {
* Forcibly execute the build, even if the configuration hasn't changed.
* This will slow-down the tests, but it may be appropriate for some very sloppy
* tests.
* @return $this
* @return CiviEnvBuilder
*/
public function apply($force = FALSE) {
$dbName = \Civi\Test::dsn('database');
Expand Down
2 changes: 1 addition & 1 deletion Civi/Token/Event/TokenRegisterEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function entity($entity) {
*
* @param array|string $paramsOrField
* @param NULL|string $label
* @return $this
* @return TokenRegisterEvent
*/
public function register($paramsOrField, $label = NULL) {
if (is_array($paramsOrField)) {
Expand Down
4 changes: 2 additions & 2 deletions Civi/Token/TokenProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function __construct($dispatcher, $context) {
* Ex: '<p>Hello {contact.name}</p>'.
* @param string $format
* Ex: 'text/html'.
* @return $this
* @return TokenProcessor
*/
public function addMessage($name, $value, $format) {
$this->messages[$name] = array(
Expand Down Expand Up @@ -121,7 +121,7 @@ public function addRow() {
* - entity: string, e.g. "profile".
* - field: string, e.g. "viewUrl".
* - label: string, e.g. "Default Profile URL (View Mode)".
* @return $this
* @return TokenProcessor
*/
public function addToken($params) {
$key = $params['entity'] . '.' . $params['field'];
Expand Down
8 changes: 4 additions & 4 deletions Civi/Token/TokenRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(TokenProcessor $tokenProcessor, $key) {

/**
* @param string $format
* @return $this
* @return TokenRow
*/
public function format($format) {
$this->format = $format;
Expand All @@ -84,7 +84,7 @@ public function format($format) {
*
* @param string|array $a
* @param mixed $b
* @return $this
* @return TokenRow
*/
public function context($a = NULL, $b = NULL) {
if (is_array($a)) {
Expand All @@ -105,7 +105,7 @@ public function context($a = NULL, $b = NULL) {
* @param string|array $a
* @param string|array $b
* @param mixed $c
* @return $this
* @return TokenRow
*/
public function tokens($a = NULL, $b = NULL, $c = NULL) {
if (is_array($a)) {
Expand Down Expand Up @@ -171,7 +171,7 @@ public function dbToken($tokenEntity, $tokenField, $baoName, $baoField, $fieldVa
*
* @param string $format
*
* @return $this
* @return TokenRow
*/
public function fill($format = NULL) {
if ($format === NULL) {
Expand Down
2 changes: 1 addition & 1 deletion api/v3/ReportTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function _civicrm_api3_report_template_getrows($params) {
$params['report_id'] = civicrm_api3('report_instance', 'getvalue', array('id' => $params['instance_id'], 'return' => 'report_id'));
}

$class = civicrm_api3('option_value', 'getvalue', array(
$class = (string) civicrm_api3('option_value', 'getvalue', array(
'option_group_name' => 'report_template',
'return' => 'name',
'value' => $params['report_id'],
Expand Down

0 comments on commit 6c65445

Please sign in to comment.