projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #15595 from eileenmcnaughton/dedupe3
[civicrm-core.git]
/
CRM
/
Utils
/
API
/
MatchOption.php
diff --git
a/CRM/Utils/API/MatchOption.php
b/CRM/Utils/API/MatchOption.php
index eff8513172555c94d0ea19148f89c90340ccff09..c26315068b27b2c0bf61dcf1ca6f07e9748df6d6 100644
(file)
--- a/
CRM/Utils/API/MatchOption.php
+++ b/
CRM/Utils/API/MatchOption.php
@@
-3,7
+3,7
@@
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-20
18
|
+ | Copyright CiviCRM LLC (c) 2004-20
20
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-49,7
+49,7
@@
* @endcode
*
* @package CRM
* @endcode
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-20
18
+ * @copyright CiviCRM LLC (c) 2004-20
20
*/
require_once 'api/Wrapper.php';
*/
require_once 'api/Wrapper.php';
@@
-93,7
+93,7
@@
class CRM_Utils_API_MatchOption implements API_Wrapper {
$keys = $apiRequest['params']['options']['match'];
}
if (is_string($keys)) {
$keys = $apiRequest['params']['options']['match'];
}
if (is_string($keys)) {
- $keys =
array($keys)
;
+ $keys =
[$keys]
;
}
}
}
}
@@
-153,7
+153,8
@@
class CRM_Utils_API_MatchOption implements API_Wrapper {
if ($isMandatory) {
throw new API_Exception("Failed to match existing record");
}
if ($isMandatory) {
throw new API_Exception("Failed to match existing record");
}
- return $createParams; // OK, don't care
+ // OK, don't care
+ return $createParams;
}
elseif ($getResult['count'] == 1) {
$item = array_shift($getResult['values']);
}
elseif ($getResult['count'] == 1) {
$item = array_shift($getResult['values']);
@@
-184,7
+185,7
@@
class CRM_Utils_API_MatchOption implements API_Wrapper {
* APIv3 $params
*/
public function createGetParams($origParams, $keys) {
* APIv3 $params
*/
public function createGetParams($origParams, $keys) {
- $params =
array('version' => 3)
;
+ $params =
['version' => 3]
;
foreach ($keys as $key) {
$params[$key] = CRM_Utils_Array::value($key, $origParams, '');
}
foreach ($keys as $key) {
$params[$key] = CRM_Utils_Array::value($key, $origParams, '');
}