[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * Removed some php5.2 errors

git at icinga.org git at icinga.org
Fri Aug 5 09:13:16 CEST 2011


Module: icinga-web
Branch: jmosshammer/default
Commit: df06e9da59b6b6b145299ca1045765c10faa5149
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=df06e9da59b6b6b145299ca1045765c10faa5149

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Aug  3 10:29:42 2011 +0200

* Removed some php5.2 errors

---

 .../lib/datastore/AbstractDataStoreModel.class.php |    2 +-
 .../datastore/DataStoreFilterModifier.class.php    |    6 +++---
 .../filter/GenericStoreFilterGroup.class.php       |    2 +-
 .../Commands/CommandDispatcherModel.class.php      |    2 +-
 .../LegacyLayer/LegacyApiResultModel.class.php     |    4 ++--
 .../AppKit/actions/DispatcherAction.class.php      |    2 +-
 .../AppKit/lib/util/AppKitXmlUtil.class.php        |    2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/modules/Api/lib/datastore/AbstractDataStoreModel.class.php b/app/modules/Api/lib/datastore/AbstractDataStoreModel.class.php
index 28deca2..796b1b3 100755
--- a/app/modules/Api/lib/datastore/AbstractDataStoreModel.class.php
+++ b/app/modules/Api/lib/datastore/AbstractDataStoreModel.class.php
@@ -136,7 +136,7 @@ abstract class AbstractDataStoreModel extends IcingaBaseModel
     * @author Jannis Moßhammer <jannis.mosshammer at netways.de>
     **/
     protected function registerStoreModifier($modifier, $module= null) {  
-        if(@is_a($modifier,"IDataStoreModifier"))
+        if($modifier instanceof IDataStoreModifier)
             $this->modifiers[] = $modifier;
         else 
             $this->modifiers[] = $this->context->getModel($modifier,$module);
diff --git a/app/modules/Api/lib/datastore/DataStoreFilterModifier.class.php b/app/modules/Api/lib/datastore/DataStoreFilterModifier.class.php
index eda7cb6..c719f2b 100755
--- a/app/modules/Api/lib/datastore/DataStoreFilterModifier.class.php
+++ b/app/modules/Api/lib/datastore/DataStoreFilterModifier.class.php
@@ -96,7 +96,7 @@ abstract class DataStoreFilterModifier extends IcingaBaseModel  implements IData
     * @author Jannis Moßhammer <jannis.mosshammer at netways.de>
     **/ 
     public function setFilter($filter) {
-        if(@is_a($filter,"StoreFilterBase")) {
+        if($filter instanceof StoreFilterBase) {
             $this->filter = $filter; 
         }
         else {
@@ -145,7 +145,7 @@ abstract class DataStoreFilterModifier extends IcingaBaseModel  implements IData
         try {
             
             $filterParsed = $this->customArgumentParser($filter);
-            if($filterParsed && @is_a($filterParsed,"StoreFilterBase"))
+            if($filterParsed && $filterParsed instanceof StoreFilterBase)
                 return $filterParsed; 
             foreach($this->filterClasses as $filterClass) {
                 
@@ -158,7 +158,7 @@ abstract class DataStoreFilterModifier extends IcingaBaseModel  implements IData
                         $filterParsed = $filterClass::parse($filter,$this);
                     }
                 }
-                if($filterParsed && @is_a($filterParsed,"StoreFilterBase"))
+                if($filterParsed && $filterParsed instanceof StoreFilterBase)
                     return $filterParsed;
             }  
         } catch(Exception $e) {
diff --git a/app/modules/Api/lib/datastore/filter/GenericStoreFilterGroup.class.php b/app/modules/Api/lib/datastore/filter/GenericStoreFilterGroup.class.php
index 388da23..f87af2b 100755
--- a/app/modules/Api/lib/datastore/filter/GenericStoreFilterGroup.class.php
+++ b/app/modules/Api/lib/datastore/filter/GenericStoreFilterGroup.class.php
@@ -128,7 +128,7 @@ class GenericStoreFilterGroup extends StoreFilterBase implements Iterator
         foreach($filter["items"] as $item) {
             $subFilter = $parser->tryParse($item);
             
-            if(@is_a($subFilter,'StoreFilterBase'))
+            if($subFilter instanceof StoreFilterBase)
                 $o->addSubFilter($subFilter); 
          }
        
diff --git a/app/modules/Api/models/Commands/CommandDispatcherModel.class.php b/app/modules/Api/models/Commands/CommandDispatcherModel.class.php
index 0e6dfa5..e26e9e1 100644
--- a/app/modules/Api/models/Commands/CommandDispatcherModel.class.php
+++ b/app/modules/Api/models/Commands/CommandDispatcherModel.class.php
@@ -17,7 +17,7 @@ class Api_Commands_CommandDispatcherModel extends IcingaApiBaseModel implements
     }
 
     public function initialize(AgaviContext $ctx, array $parameters = array()) {
-        if(isset($parameters["console"]) && @is_a($parameters["console"],"IcingaConsoleInterface"))
+        if(isset($parameters["console"]) && $parameters["console"] instanceof IcingaConsoleInterface)
             $this->setConsoleContext($parameters["console"]);
      
         parent::initialize($ctx,$parameters);
diff --git a/app/modules/Api/models/Store/LegacyLayer/LegacyApiResultModel.class.php b/app/modules/Api/models/Store/LegacyLayer/LegacyApiResultModel.class.php
index 5531dee..ae53394 100644
--- a/app/modules/Api/models/Store/LegacyLayer/LegacyApiResultModel.class.php
+++ b/app/modules/Api/models/Store/LegacyLayer/LegacyApiResultModel.class.php
@@ -124,8 +124,8 @@ class Api_Store_LegacyLayer_LegacyApiResultModel extends IcingaApiDataStoreModel
 		return $returnData;
 
 	}
-    public function __call ($name, $arguments = array()) {
-		return $this->__get($name);
+    public function __call ($method,$argument) {
+		return $this->__get($method);
 	}
 
 
diff --git a/app/modules/AppKit/actions/DispatcherAction.class.php b/app/modules/AppKit/actions/DispatcherAction.class.php
index 01dec2b..7fdc097 100755
--- a/app/modules/AppKit/actions/DispatcherAction.class.php
+++ b/app/modules/AppKit/actions/DispatcherAction.class.php
@@ -39,7 +39,7 @@ class AppKit_DispatcherAction extends AppKitBaseAction
         $controller = $this->getContext()->getController();
         $actionInstance = $controller->createActionInstance($module,$action);
         
-        if(!@is_a($actionInstance,"IDispatchableAction")) {
+        if($actionInstance instanceof IDispatchableAction) {
             $this->setAttribute("error",$module.".".$action." is not accessible via the dispatcher");
             return "Error";
         }
diff --git a/app/modules/AppKit/lib/util/AppKitXmlUtil.class.php b/app/modules/AppKit/lib/util/AppKitXmlUtil.class.php
index 4355d0c..4a334dd 100644
--- a/app/modules/AppKit/lib/util/AppKitXmlUtil.class.php
+++ b/app/modules/AppKit/lib/util/AppKitXmlUtil.class.php
@@ -72,7 +72,7 @@ class AppKitXmlUtil {
 			$element = $parent;
 			$parent = $element->parentNode;
 			
-		} while(@is_a($parent,"DomElement"));
+		} while(($parent instanceof DomElement));
 
 		return null;
 	}	





More information about the icinga-checkins mailing list