From 223d795abeb6eb6a0a1634458d3459ac68a7a1e6 Mon Sep 17 00:00:00 2001
From: Kevin Duret <kduret@centreon.com>
Date: Thu, 7 Jun 2018 15:46:22 +0200
Subject: [PATCH] fix(style): fix variable name (lower camelcase)

---
 .../centreonACLAction.class.php               |  8 ++---
 .../centreon-clapi/centreonACLGroup.class.php |  8 ++---
 .../centreon-clapi/centreonACLMenu.class.php  |  8 ++---
 .../centreonACLResource.class.php             |  8 ++---
 .../centreonCentbrokerCfg.class.php           |  8 ++---
 .../centreon-clapi/centreonCommand.class.php  |  8 ++---
 .../centreon-clapi/centreonContact.class.php  |  8 ++---
 .../centreonContactGroup.class.php            |  8 ++---
 .../centreon-clapi/centreonDowntime.class.php |  4 +--
 .../centreonEngineCfg.class.php               |  8 ++---
 .../centreon-clapi/centreonHost.class.php     | 30 +++++++++----------
 .../centreonHostCategory.class.php            |  8 ++---
 .../centreonHostGroup.class.php               |  8 ++---
 .../centreonHostGroupService.class.php        |  8 ++---
 .../centreon-clapi/centreonLDAP.class.php     | 11 ++++---
 .../centreon-clapi/centreonObject.class.php   |  6 ++--
 .../centreonResourceCfg.class.php             |  8 ++---
 .../centreon-clapi/centreonService.class.php  |  8 ++---
 .../centreonServiceCategory.class.php         |  8 ++---
 .../centreonServiceGroup.class.php            |  8 ++---
 .../centreonServiceTemplate.class.php         | 12 ++++----
 .../centreon-clapi/centreonTrap.class.php     |  8 ++---
 22 files changed, 98 insertions(+), 101 deletions(-)

diff --git a/www/class/centreon-clapi/centreonACLAction.class.php b/www/class/centreon-clapi/centreonACLAction.class.php
index 2863bdfa05..152a561037 100644
--- a/www/class/centreon-clapi/centreonACLAction.class.php
+++ b/www/class/centreon-clapi/centreonACLAction.class.php
@@ -288,16 +288,16 @@ class CentreonACLAction extends CentreonObject
         }
     }
 
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $aclActionRuleList = $this->object->getList('*', -1, 0, null, null, $filters);
 
diff --git a/www/class/centreon-clapi/centreonACLGroup.class.php b/www/class/centreon-clapi/centreonACLGroup.class.php
index bf89799e0c..c2eef0d1e1 100644
--- a/www/class/centreon-clapi/centreonACLGroup.class.php
+++ b/www/class/centreon-clapi/centreonACLGroup.class.php
@@ -240,16 +240,16 @@ class CentreonACLGroup extends CentreonObject
     /**
      * @param null $filters
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $aclGroupList = $this->object->getList('*', -1, 0, null, null, $filters);
 
diff --git a/www/class/centreon-clapi/centreonACLMenu.class.php b/www/class/centreon-clapi/centreonACLMenu.class.php
index b4e8311db6..75470ca6f9 100644
--- a/www/class/centreon-clapi/centreonACLMenu.class.php
+++ b/www/class/centreon-clapi/centreonACLMenu.class.php
@@ -386,16 +386,16 @@ class CentreonACLMenu extends CentreonObject
     /**
      * @param array $filters
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $aclMenuList = $this->object->getList('*', -1, 0, null, null, $filters);
 
diff --git a/www/class/centreon-clapi/centreonACLResource.class.php b/www/class/centreon-clapi/centreonACLResource.class.php
index fdc5500eff..f47209da79 100644
--- a/www/class/centreon-clapi/centreonACLResource.class.php
+++ b/www/class/centreon-clapi/centreonACLResource.class.php
@@ -426,16 +426,16 @@ class CentreonACLResource extends CentreonObject
     /**
      * @param null $filters
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $aclResourceList = $this->object->getList('*', -1, 0, null, null, $filters);
 
diff --git a/www/class/centreon-clapi/centreonCentbrokerCfg.class.php b/www/class/centreon-clapi/centreonCentbrokerCfg.class.php
index 36abfbb192..d6d87a2ed4 100644
--- a/www/class/centreon-clapi/centreonCentbrokerCfg.class.php
+++ b/www/class/centreon-clapi/centreonCentbrokerCfg.class.php
@@ -699,16 +699,16 @@ class CentreonCentbrokerCfg extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND");
         foreach ($elements as $element) {
diff --git a/www/class/centreon-clapi/centreonCommand.class.php b/www/class/centreon-clapi/centreonCommand.class.php
index 3ebeb0f5e1..3d73c9cd14 100644
--- a/www/class/centreon-clapi/centreonCommand.class.php
+++ b/www/class/centreon-clapi/centreonCommand.class.php
@@ -214,16 +214,16 @@ class CentreonCommand extends CentreonObject
      * @return void
      */
 
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $elements = $this->object->getList(
             "*",
diff --git a/www/class/centreon-clapi/centreonContact.class.php b/www/class/centreon-clapi/centreonContact.class.php
index 5a66235244..f69c025a06 100644
--- a/www/class/centreon-clapi/centreonContact.class.php
+++ b/www/class/centreon-clapi/centreonContact.class.php
@@ -462,16 +462,16 @@ class CentreonContact extends CentreonObject
      * @param string $parameters
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array("contact_register" => $this->register);
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $elements = $this->object->getList(
             "*",
diff --git a/www/class/centreon-clapi/centreonContactGroup.class.php b/www/class/centreon-clapi/centreonContactGroup.class.php
index 0aa7b100d6..1b4dd3c865 100644
--- a/www/class/centreon-clapi/centreonContactGroup.class.php
+++ b/www/class/centreon-clapi/centreonContactGroup.class.php
@@ -216,9 +216,9 @@ class CentreonContactGroup extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!parent::export($filter_name)) {
+        if (!parent::export($filterName)) {
             return false;
         }
 
@@ -227,8 +227,8 @@ class CentreonContactGroup extends CentreonObject
         $cgFieldName = $this->object->getUniqueLabelField();
         $cFieldName = $contactObj->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$cgFieldName] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$cgFieldName] = $filterName;
         }
         $elements = $relObj->getMergedParameters(
             array($cgFieldName),
diff --git a/www/class/centreon-clapi/centreonDowntime.class.php b/www/class/centreon-clapi/centreonDowntime.class.php
index a20135e081..635be690db 100644
--- a/www/class/centreon-clapi/centreonDowntime.class.php
+++ b/www/class/centreon-clapi/centreonDowntime.class.php
@@ -827,10 +827,10 @@ class CentreonDowntime extends CentreonObject
     /**
      * Export
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
         // generic add & setparam
-        if (!parent::export($filter_name)) {
+        if (!parent::export($filterName)) {
             return false;
         }
 
diff --git a/www/class/centreon-clapi/centreonEngineCfg.class.php b/www/class/centreon-clapi/centreonEngineCfg.class.php
index ae9247083b..16da6a976f 100644
--- a/www/class/centreon-clapi/centreonEngineCfg.class.php
+++ b/www/class/centreon-clapi/centreonEngineCfg.class.php
@@ -284,16 +284,16 @@ class CentreonEngineCfg extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
 
         $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND");
diff --git a/www/class/centreon-clapi/centreonHost.class.php b/www/class/centreon-clapi/centreonHost.class.php
index d4499bf12a..060aedf62d 100644
--- a/www/class/centreon-clapi/centreonHost.class.php
+++ b/www/class/centreon-clapi/centreonHost.class.php
@@ -1118,16 +1118,16 @@ class CentreonHost extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return 0;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array("host_register" => $this->register);
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
 
         $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND");
@@ -1264,8 +1264,8 @@ class CentreonHost extends CentreonObject
 
         $cgRel = new \Centreon_Object_Relation_Contact_Group_Host();
         $filters_cgRel = array("host_register" => $this->register);
-        if (!is_null($filter_name)) {
-            $filters_cgRel['host_name'] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters_cgRel['host_name'] = $filterName;
         }
         $elements = $cgRel->getMergedParameters(
             array("cg_name", "cg_id"),
@@ -1286,8 +1286,8 @@ class CentreonHost extends CentreonObject
         }
         $contactRel = new \Centreon_Object_Relation_Contact_Host();
         $filters_contactRel = array("host_register" => $this->register);
-        if (!is_null($filter_name)) {
-            $filters_contactRel['host_name'] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters_contactRel['host_name'] = $filterName;
         }
         $elements = $contactRel->getMergedParameters(
             array("contact_alias", "contact_id"),
@@ -1308,8 +1308,8 @@ class CentreonHost extends CentreonObject
         }
         $htplRel = new \Centreon_Object_Relation_Host_Template_Host();
         $filters_htplRel = array("h.host_register" => $this->register);
-        if (!is_null($filter_name)) {
-            $filters_htplRel['h.host_name'] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters_htplRel['h.host_name'] = $filterName;
         }
         $elements = $htplRel->getMergedParameters(
             array("host_name as host"),
@@ -1330,7 +1330,7 @@ class CentreonHost extends CentreonObject
         }
 
         // Filter only
-        if (!is_null($filter_name)) {
+        if (!is_null($filterName)) {
             # service templates linked
             $hostRel = new \Centreon_Object_Relation_Host_Service();
             $helements = $hostRel->getMergedParameters(
@@ -1340,7 +1340,7 @@ class CentreonHost extends CentreonObject
                 0,
                 null,
                 null,
-                array("service_register" => 0, "host_name" => $filter_name),
+                array("service_register" => 0, "host_name" => $filterName),
                 "AND"
             );
             foreach ($helements as $helement) {
@@ -1356,11 +1356,11 @@ class CentreonHost extends CentreonObject
                 0,
                 null,
                 null,
-                array("service_register" => 1, "host_name" => $filter_name),
+                array("service_register" => 1, "host_name" => $filterName),
                 "AND"
             );
             foreach ($helements as $helement) {
-                CentreonService::getInstance()->export($filter_name . ';' . $helement['service_description']);
+                CentreonService::getInstance()->export($filterName . ';' . $helement['service_description']);
             }
 
             # service hg linked and hostgroups
@@ -1372,7 +1372,7 @@ class CentreonHost extends CentreonObject
                 0,
                 null,
                 null,
-                array("host_name" => $filter_name),
+                array("host_name" => $filterName),
                 "AND"
             );
             foreach ($helements as $helement) {
diff --git a/www/class/centreon-clapi/centreonHostCategory.class.php b/www/class/centreon-clapi/centreonHostCategory.class.php
index fde3cd3542..87e711c956 100644
--- a/www/class/centreon-clapi/centreonHostCategory.class.php
+++ b/www/class/centreon-clapi/centreonHostCategory.class.php
@@ -238,17 +238,17 @@ class CentreonHostCategory extends CentreonSeverityAbstract
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!parent::export($filter_name)) {
+        if (!parent::export($filterName)) {
             return false;
         }
 
         $relobj = new \Centreon_Object_Relation_Host_Category_Host();
         $hcFieldName = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$hcFieldName] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$hcFieldName] = $filterName;
         }
         $elements = $relobj->getMergedParameters(
             array($hcFieldName),
diff --git a/www/class/centreon-clapi/centreonHostGroup.class.php b/www/class/centreon-clapi/centreonHostGroup.class.php
index b990bd981a..1fdcf84233 100644
--- a/www/class/centreon-clapi/centreonHostGroup.class.php
+++ b/www/class/centreon-clapi/centreonHostGroup.class.php
@@ -278,16 +278,16 @@ class CentreonHostGroup extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!parent::export($filter_name)) {
+        if (!parent::export($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $relObj = new \Centreon_Object_Relation_Host_Group_Host();
         $hostObj = new \Centreon_Object_Host();
diff --git a/www/class/centreon-clapi/centreonHostGroupService.class.php b/www/class/centreon-clapi/centreonHostGroupService.class.php
index 6935b40823..6f49eb6d00 100644
--- a/www/class/centreon-clapi/centreonHostGroupService.class.php
+++ b/www/class/centreon-clapi/centreonHostGroupService.class.php
@@ -914,16 +914,16 @@ class CentreonHostGroupService extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return 0;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array("service_register" => $this->register);
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $hostRel = new \Centreon_Object_Relation_Host_Group_Service();
         $elements = $hostRel->getMergedParameters(
diff --git a/www/class/centreon-clapi/centreonLDAP.class.php b/www/class/centreon-clapi/centreonLDAP.class.php
index fd676a883b..e284797da1 100644
--- a/www/class/centreon-clapi/centreonLDAP.class.php
+++ b/www/class/centreon-clapi/centreonLDAP.class.php
@@ -395,19 +395,18 @@ class CentreonLDAP extends CentreonObject
     /**
      * Export data
      *
-     * @param null $filter_id
-     * @param null $filter_name
+     * @param null $filterName
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return 0;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
 
         $configurationLdapObj = new \Centreon_Object_Configuration_Ldap();
diff --git a/www/class/centreon-clapi/centreonObject.class.php b/www/class/centreon-clapi/centreonObject.class.php
index fced63849f..fc1fc33c4a 100644
--- a/www/class/centreon-clapi/centreonObject.class.php
+++ b/www/class/centreon-clapi/centreonObject.class.php
@@ -422,10 +422,8 @@ abstract class CentreonObject
     /**
      * Export from a specific object
      *
-     * @param $action
-     * @param $filter_id
-     * @param $filter_name
-     * @return int
+     * @param $filterName
+     * @return bool
      */
     public function export($filterName)
     {
diff --git a/www/class/centreon-clapi/centreonResourceCfg.class.php b/www/class/centreon-clapi/centreonResourceCfg.class.php
index 37fa8f8436..3d4411a8e3 100644
--- a/www/class/centreon-clapi/centreonResourceCfg.class.php
+++ b/www/class/centreon-clapi/centreonResourceCfg.class.php
@@ -332,19 +332,19 @@ class CentreonResourceCfg extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return 0;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $elements = $this->object->getList();
 
-        if (!is_null($filter_name) && !empty($filter_name)) {
+        if (!is_null($filterName) && !empty($filterName)) {
             $nbElements = count($elements);
             for ($i = 0; $i < $nbElements; $i++) {
-                if ($elements[$i][$labelField] != $filter_name) {
+                if ($elements[$i][$labelField] != $filterName) {
                     unset($elements[$i]);
                 }
             }
diff --git a/www/class/centreon-clapi/centreonService.class.php b/www/class/centreon-clapi/centreonService.class.php
index a652485e16..a403d05049 100644
--- a/www/class/centreon-clapi/centreonService.class.php
+++ b/www/class/centreon-clapi/centreonService.class.php
@@ -1067,17 +1067,17 @@ class CentreonService extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array("service_register" => $this->register);
         $filterId = null;
-        if (!is_null($filter_name)) {
-            $filterId = $this->getObjectId($filter_name);
+        if (!is_null($filterName)) {
+            $filterId = $this->getObjectId($filterName);
             $filters['service_id'] = $filterId;
         }
 
diff --git a/www/class/centreon-clapi/centreonServiceCategory.class.php b/www/class/centreon-clapi/centreonServiceCategory.class.php
index de6e4afa54..83fd795692 100644
--- a/www/class/centreon-clapi/centreonServiceCategory.class.php
+++ b/www/class/centreon-clapi/centreonServiceCategory.class.php
@@ -399,16 +399,16 @@ class CentreonServiceCategory extends CentreonSeverityAbstract
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!parent::export($filter_name)) {
+        if (!parent::export($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $scs = $this->object->getList(
             array($this->object->getPrimaryKey(), $labelField),
diff --git a/www/class/centreon-clapi/centreonServiceGroup.class.php b/www/class/centreon-clapi/centreonServiceGroup.class.php
index 9deb0c414d..1d2861c944 100644
--- a/www/class/centreon-clapi/centreonServiceGroup.class.php
+++ b/www/class/centreon-clapi/centreonServiceGroup.class.php
@@ -320,16 +320,16 @@ class CentreonServiceGroup extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!parent::export($filter_name)) {
+        if (!parent::export($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
 
         $sgs = $this->object->getList(
diff --git a/www/class/centreon-clapi/centreonServiceTemplate.class.php b/www/class/centreon-clapi/centreonServiceTemplate.class.php
index a931c7c955..c6466eed80 100644
--- a/www/class/centreon-clapi/centreonServiceTemplate.class.php
+++ b/www/class/centreon-clapi/centreonServiceTemplate.class.php
@@ -918,19 +918,19 @@ class CentreonServiceTemplate extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
-        if (!is_null($filter_name)) {
-            $filterId = $this->getObjectId($filter_name);
+        if (!is_null($filterName)) {
+            $filterId = $this->getObjectId($filterName);
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array("service_register" => $this->register);
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
         $elements = $this->object->getList(
             "*",
diff --git a/www/class/centreon-clapi/centreonTrap.class.php b/www/class/centreon-clapi/centreonTrap.class.php
index 17ec0df0ae..7cd1e58b16 100644
--- a/www/class/centreon-clapi/centreonTrap.class.php
+++ b/www/class/centreon-clapi/centreonTrap.class.php
@@ -324,16 +324,16 @@ class CentreonTrap extends CentreonObject
      *
      * @return void
      */
-    public function export($filter_name)
+    public function export($filterName)
     {
-        if (!$this->canBeExported($filter_name)) {
+        if (!$this->canBeExported($filterName)) {
             return false;
         }
 
         $labelField = $this->object->getUniqueLabelField();
         $filters = array();
-        if (!is_null($filter_name)) {
-            $filters[$labelField] = $filter_name;
+        if (!is_null($filterName)) {
+            $filters[$labelField] = $filterName;
         }
 
         $elements = $this->object->getList("*", -1, 0, null, null, $filters, "AND");
-- 
GitLab