(NFC) Update CRM/Activity CRM/Admin and CRM/Batch folders to be the future coder...
[civicrm-core.git] / CRM / Activity / Page / Tab.php
index 305c9dd8b6d4afbded841f7411c725145228e65e..4415618a7e2f0ecb2b82032d82e7e3acb14de731 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
  */
 
 /**
@@ -86,12 +86,12 @@ class CRM_Activity_Page_Tab extends CRM_Core_Page {
     switch ($activityTypeId) {
       case $emailTypeValue:
         $wrapper = new CRM_Utils_Wrapper();
-        $arguments = array('attachUpload' => 1);
+        $arguments = ['attachUpload' => 1];
         return $wrapper->run('CRM_Contact_Form_Task_Email', ts('Email a Contact'), $arguments);
 
       case $letterTypeValue:
         $wrapper = new CRM_Utils_Wrapper();
-        $arguments = array('attachUpload' => 1);
+        $arguments = ['attachUpload' => 1];
         return $wrapper->run('CRM_Contact_Form_Task_PDF', ts('Create PDF Letter'), $arguments);
 
       default:
@@ -167,7 +167,7 @@ class CRM_Activity_Page_Tab extends CRM_Core_Page {
 
     // Do check for view/edit operation.
     if ($this->_id &&
-      in_array($action, array(CRM_Core_Action::UPDATE, CRM_Core_Action::VIEW))
+      in_array($action, [CRM_Core_Action::UPDATE, CRM_Core_Action::VIEW])
     ) {
       if (!CRM_Activity_BAO_Activity::checkPermission($this->_id, $action)) {
         CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
@@ -200,10 +200,10 @@ class CRM_Activity_Page_Tab extends CRM_Core_Page {
         'Print PDF Letter'
       );
 
-      if (in_array($activityTypeId, array(
+      if (in_array($activityTypeId, [
         $emailTypeValue,
         $letterTypeValue,
-      ))) {
+      ])) {
         return;
       }
     }