Skip to content

Commit

Permalink
Merge pull request #22360 from braders/import-field-docblock-improvem…
Browse files Browse the repository at this point in the history
…ents

[NFC] docblock improvements to Import_Field classes
  • Loading branch information
colemanw authored Jan 3, 2022
2 parents dd0aaff + 5ebfe76 commit 056d0b3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions CRM/Activity/Import/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CRM_Activity_Import_Field {

/**
* Type of field
* @var enum
* @var int
*/
public $_type;

Expand Down Expand Up @@ -60,13 +60,13 @@ class CRM_Activity_Import_Field {

/**
* Value of this field
* @var object
* @var string|null
*/
public $_value;

/**
* @param string $name
* @param $title
* @param string $title
* @param int $type
* @param string $headerPattern
* @param string $dataPattern
Expand All @@ -88,7 +88,7 @@ public function resetValue() {
/**
* The value is in string format. convert the value to the type of this field
* and set the field value with the appropriate type
* @param $value
* @param string $value
*/
public function setValue($value) {
$this->_value = $value;
Expand Down
8 changes: 4 additions & 4 deletions CRM/Contact/Import/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CRM_Contact_Import_Field {

/**
* Type of field
* @var enum
* @var int
*/
public $_type;

Expand Down Expand Up @@ -81,7 +81,7 @@ class CRM_Contact_Import_Field {

/**
* Value of this field
* @var object
* @var string|null
*/
public $_value;

Expand Down Expand Up @@ -117,7 +117,7 @@ class CRM_Contact_Import_Field {

/**
* @param string $name
* @param $title
* @param string $title
* @param int $type
* @param string $columnPattern
* @param string $dataPattern
Expand Down Expand Up @@ -156,7 +156,7 @@ public function resetValue() {
* Convert the value to the type of this field
* and set the field value with the appropriate type
*
* @param mixed $value
* @param string $value
*/
public function setValue($value) {
$this->_value = $value;
Expand Down
8 changes: 4 additions & 4 deletions CRM/Contribute/Import/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CRM_Contribute_Import_Field {

/**
* Type of field
* @var enum
* @var int
*/
public $_type;

Expand Down Expand Up @@ -66,7 +66,7 @@ class CRM_Contribute_Import_Field {

/**
* Value of this field
* @var object
* @var string|null
*/
public $_value;

Expand All @@ -78,7 +78,7 @@ class CRM_Contribute_Import_Field {

/**
* @param string $name
* @param $title
* @param string $title
* @param int $type
* @param string $headerPattern
* @param string $dataPattern
Expand All @@ -104,7 +104,7 @@ public function resetValue() {
* The value is in string format. Convert the value to the type of this field
* and set the field value with the appropriate type
*
* @param $value
* @param string $value
*/
public function setValue($value) {
$this->_value = $value;
Expand Down
10 changes: 5 additions & 5 deletions CRM/Event/Import/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CRM_Event_Import_Field {

/**
* Type of field
* @var enum
* @var int
*/
public $_type;

Expand All @@ -51,13 +51,13 @@ class CRM_Event_Import_Field {

/**
* Value of this field
* @var object
* @var string|null
*/
public $_value;

/**
* @param string $name
* @param $title
* @param string $title
* @param int $type
* @param string $headerPattern
* @param string $dataPattern
Expand Down Expand Up @@ -95,8 +95,8 @@ public function validate() {

switch ($this->_name) {
case 'contact_id':
// note: we validate extistence of the contact in API, upon
// insert (it would be too costlty to do a db call here)
// note: we validate existence of the contact in API, upon
// insert (it would be too costly to do a db call here)
return CRM_Utils_Rule::integer($this->_value);

case 'register_date':
Expand Down
12 changes: 6 additions & 6 deletions CRM/Member/Import/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CRM_Member_Import_Field {

/**
* Type of field
* @var enum
* @var int
*/
public $_type;

Expand Down Expand Up @@ -65,13 +65,13 @@ class CRM_Member_Import_Field {

/**
* Value of this field
* @var object
* @var string|null
*/
public $_value;

/**
* @param string $name
* @param $title
* @param string $title
* @param int $type
* @param string $headerPattern
* @param string $dataPattern
Expand All @@ -94,7 +94,7 @@ public function resetValue() {
* The value is in string format. convert the value to the type of this field
* and set the field value with the appropriate type
*
* @param $value
* @param string $value
*/
public function setValue($value) {
$this->_value = $value;
Expand All @@ -111,8 +111,8 @@ public function validate() {

switch ($this->_name) {
case 'contact_id':
// note: we validate extistence of the contact in API, upon
// insert (it would be too costlty to do a db call here)
// note: we validate existence of the contact in API, upon
// insert (it would be too costly to do a db call here)
return CRM_Utils_Rule::integer($this->_value);

case 'receive_date':
Expand Down

0 comments on commit 056d0b3

Please sign in to comment.