Set version to 5.20.beta1
[civicrm-core.git] / CRM / Utils / SystemLogger.php
index ac81bc8d9adc8a3bb1ebd2133c920eb9730f311e..64105889414032cccc0541d1c39ca96f25679800 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.                                    |
  |                                                                    |
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\LoggerInterface {
+
   /**
    * Logs with an arbitrary level.
    *
@@ -38,12 +39,12 @@ class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\
    * @param string $message
    * @param array $context
    */
-  public function log($level, $message, array $context = array()) {
+  public function log($level, $message, array $context = []) {
     if (!isset($context['hostname'])) {
       $context['hostname'] = CRM_Utils_System::ipAddress();
     }
     $rec = new CRM_Core_DAO_SystemLog();
-    $separateFields = array('contact_id', 'hostname');
+    $separateFields = ['contact_id', 'hostname'];
     foreach ($separateFields as $separateField) {
       if (isset($context[$separateField])) {
         $rec->{$separateField} = $context[$separateField];