Skip to content

Commit

Permalink
Merge pull request #15737 from eileenmcnaughton/php73
Browse files Browse the repository at this point in the history
Php 7.3 fix - don't mis-use continue
  • Loading branch information
eileenmcnaughton authored Nov 5, 2019
2 parents 2ed78b0 + e255b57 commit 3256970
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/phpunit/CiviTest/CiviUnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
* Track tables we have modified during a test.
* @var array
*/
protected $_tablesToTruncate = array();
protected $_tablesToTruncate = [];

/**
* @var array of temporary directory names
Expand Down Expand Up @@ -1522,7 +1522,7 @@ public function entityCustomGroupWithSingleFieldCreate($function, $filename) {
$params = array('title' => $function);
$entity = substr(basename($filename), 0, strlen(basename($filename)) - 8);
$params['extends'] = $entity ? $entity : 'Contact';
$customGroup = $this->CustomGroupCreate($params);
$customGroup = $this->customGroupCreate($params);
$customField = $this->customFieldCreate(array('custom_group_id' => $customGroup['id'], 'label' => $function));
CRM_Core_PseudoConstant::flush();

Expand All @@ -1545,7 +1545,7 @@ public function entityCustomGroupWithSingleStringMultiSelectFieldCreate($functio
$params = array('title' => $function);
$entity = substr(basename($filename), 0, strlen(basename($filename)) - 8);
$params['extends'] = $entity ? $entity : 'Contact';
$customGroup = $this->CustomGroupCreate($params);
$customGroup = $this->customGroupCreate($params);
$customField = $this->customFieldCreate(array('custom_group_id' => $customGroup['id'], 'label' => $function, 'html_type' => 'Multi-Select', 'default_value' => 1));
CRM_Core_PseudoConstant::flush();
$options = [
Expand Down Expand Up @@ -1852,10 +1852,10 @@ public function getAndCheck($params, $id, $entity, $delete = 1, $errorText = '')
$fields = $this->callAPISuccess($entity, 'getfields', array('version' => 3, 'action' => 'get'));
foreach ($fields['values'] as $field => $settings) {
if (array_key_exists($field, $result)) {
$keys[CRM_Utils_Array::Value('name', $settings, $field)] = $field;
$keys[CRM_Utils_Array::value('name', $settings, $field)] = $field;
}
else {
$keys[CRM_Utils_Array::Value('name', $settings, $field)] = CRM_Utils_Array::value('name', $settings, $field);
$keys[CRM_Utils_Array::value('name', $settings, $field)] = CRM_Utils_Array::value('name', $settings, $field);
}
$type = CRM_Utils_Array::value('type', $settings);
if ($type == CRM_Utils_Type::T_DATE) {
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/api/v3/CustomValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function _testCustomValue($customField, $sqlOps, $type) {
case '>=':
case '<=':
if ($isSerialized) {
continue;
break;
}
// To be precise in for these operator we can't just rely on one contact,
// hence creating multiple contact with custom value less/more then $selectedValue respectively
Expand Down

0 comments on commit 3256970

Please sign in to comment.