[icinga-checkins] icinga.org: icingaweb2-module-director/master: Db/IcingaObject: formatting & style

git at icinga.org git at icinga.org
Wed Oct 5 22:13:57 CEST 2016


Module: icingaweb2-module-director
Branch: master
Commit: 749f03597131b5a9a86c78ac0236d460c0d9118b
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=749f03597131b5a9a86c78ac0236d460c0d9118b

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Oct  5 18:05:59 2016 +0000

Db/IcingaObject: formatting & style

---

 library/Director/Data/Db/DbObject.php     |    2 ++
 library/Director/Objects/IcingaObject.php |   20 ++++++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/library/Director/Data/Db/DbObject.php b/library/Director/Data/Db/DbObject.php
index b3a9482..5a5a949 100644
--- a/library/Director/Data/Db/DbObject.php
+++ b/library/Director/Data/Db/DbObject.php
@@ -752,6 +752,7 @@ abstract class DbObject
             if ($e instanceof IE) {
                 throw $e;
             }
+
             throw new IE(
                 'Storing %s[%s] failed: %s {%s}',
                 $this->table,
@@ -760,6 +761,7 @@ abstract class DbObject
                 var_export($this->getProperties(), 1) // TODO: Remove properties
             );
         }
+
         $this->modifiedProperties = array();
         $this->hasBeenModified = false;
         $this->loadedProperties = $this->properties;
diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php
index a8fc622..d1854d7 100644
--- a/library/Director/Objects/IcingaObject.php
+++ b/library/Director/Objects/IcingaObject.php
@@ -1399,13 +1399,19 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
 
     protected function renderLegacyBooleanProperty($property, $legacyKey)
     {
-        return c1::renderKeyValue($legacyKey, c1::renderBoolean($this->$property));
+        return c1::renderKeyValue(
+            $legacyKey,
+            c1::renderBoolean($this->$property)
+        );
     }
 
     protected function renderProperties()
     {
         $out = '';
-        $blacklist = array_merge($this->propertiesNotForRendering, $this->prioritizedProperties);
+        $blacklist = array_merge(
+            $this->propertiesNotForRendering,
+            $this->prioritizedProperties
+        );
 
         foreach ($this->properties as $key => $value) {
             if (in_array($key, $blacklist)) {
@@ -1691,9 +1697,15 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
         $type = strtolower($this->getType());
 
         if ($this->isTemplate()) {
-            $name = c1::renderKeyValue('name', c1::renderString($this->getObjectName()));
+            $name = c1::renderKeyValue(
+                'name',
+                c1::renderString($this->getObjectName())
+            );
         } else {
-            $name = c1::renderKeyValue($type . '_name', c1::renderString($this->getObjectName()));
+            $name = c1::renderKeyValue(
+                $type . '_name',
+                c1::renderString($this->getObjectName())
+            );
         }
 
         $str = sprintf(



More information about the icinga-checkins mailing list