(NFC) Update CRM/Core CRM/Custom CRM/Dedupe to match the new coder style
[civicrm-core.git] / CRM / Core / BAO / Job.php
index a67ffaa5b07f852b00472ad51a2d54f9b1b7680f..0509a0af47b60aaeb5182445c65831af7c3b3850 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  * $Id: $
  *
  */
@@ -90,9 +90,8 @@ class CRM_Core_BAO_Job extends CRM_Core_DAO_Job {
    * @param bool $is_active
    *   Value we want to set the is_active field.
    *
-   * @return Object
-   *   DAO object on success, null otherwise
-   *
+   * @return bool
+   *   true if we found and updated the object, else false
    */
   public static function setIsActive($id, $is_active) {
     return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Job', $id, 'is_active', $is_active);
@@ -150,17 +149,17 @@ class CRM_Core_BAO_Job extends CRM_Core_DAO_Job {
    * Make a copy of a Job.
    *
    * @param int $id The job id to copy.
-   *
+   * @param array $params
    * @return CRM_Core_DAO
    */
-  public static function copy($id, $params = array()) {
-    $fieldsFix = array(
-      'suffix' => array(
+  public static function copy($id, $params = []) {
+    $fieldsFix = [
+      'suffix' => [
         'name' => ' - ' . ts('Copy'),
-      ),
+      ],
       'replace' => $params,
-    );
-    $copy = &CRM_Core_DAO::copyGeneric('CRM_Core_DAO_Job', array('id' => $id), NULL, $fieldsFix);
+    ];
+    $copy = &CRM_Core_DAO::copyGeneric('CRM_Core_DAO_Job', ['id' => $id], NULL, $fieldsFix);
     $copy->save();
     CRM_Utils_Hook::copy('Job', $copy);