[icinga-checkins] icinga.org: icingaweb2-module-director/next: DbObject: help IDE, render newline after a...

git at icinga.org git at icinga.org
Fri Nov 4 19:58:37 CET 2016


Module: icingaweb2-module-director
Branch: next
Commit: 87fe623d1195ef7601f6ab1d3c20f06e32d03f6e
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=87fe623d1195ef7601f6ab1d3c20f06e32d03f6e

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Nov  4 19:52:21 2016 +0100

DbObject: help IDE, render newline after a...

...disabled v1 object

---

 library/Director/Data/Db/DbObject.php     |    6 ++++++
 library/Director/Objects/IcingaObject.php |    8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/library/Director/Data/Db/DbObject.php b/library/Director/Data/Db/DbObject.php
index c44b0cd..77e2f6b 100644
--- a/library/Director/Data/Db/DbObject.php
+++ b/library/Director/Data/Db/DbObject.php
@@ -1079,6 +1079,12 @@ abstract class DbObject
         return $objects;
     }
 
+    /**
+     * @param DbConnection $connection
+     * @param bool $force
+     *
+     * @return static[]
+     */
     public static function prefetchAll(DbConnection $connection, $force = false)
     {
         $dummy = static::create();
diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php
index 5961d77..3c8a13f 100644
--- a/library/Director/Objects/IcingaObject.php
+++ b/library/Director/Objects/IcingaObject.php
@@ -783,6 +783,9 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
         return $this->arguments;
     }
 
+    /**
+     * @return IcingaObjectImports
+     */
     public function imports()
     {
         $this->assertImportsSupport();
@@ -1188,6 +1191,9 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
         return $this;
     }
 
+    /**
+     * @return CustomVariables
+     */
     public function vars()
     {
         $this->assertCustomVarsSupport();
@@ -2110,7 +2116,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
             return
                 "# --- This object has been disabled ---\n"
                 . preg_replace('~^~m', '# ', trim($str))
-                . "\n";
+                . "\n\n";
         } else {
             return $str;
         }



More information about the icinga-checkins mailing list