Source Code formatiert
authorMarkus Broeker<broeker.markus@googlemail.com>
Sun, 14 Feb 2016 21:40:29 +0100
changeset 37 f4fce35327ff
parent 36 011596fe2830
child 38 41078fd1e80d
Source Code formatiert
classes/bfw/core/Entity.php
classes/bfw/entities/TGroup.php
classes/bfw/entities/TUser.php
classes/bfw/entities/core/RUserGroup.php
classes/bfw/entities/core/TGroup.php
classes/bfw/entities/core/TUser.php
patches/PersistenceCreator.php
--- a/classes/bfw/core/Entity.php
+++ b/classes/bfw/core/Entity.php
@@ -275,4 +275,5 @@
     public function quote($string) {
         return $this->db->quote($string);
     }
+
 }
--- a/classes/bfw/entities/TGroup.php
+++ b/classes/bfw/entities/TGroup.php
@@ -1,26 +1,26 @@
-<?php
-
-/**
- * Copyright(C) 2015 Markus Bröker<broeker.markus@googlemail.com>
- *
- */
-
-namespace bfw\entities;
-
-/**
- * Class TGroup
- */
-class TGroup extends \bfw\entities\core\TGroup {
-
-    const SYSTEM = 1;
-    const ADMIN = 2;
-
-    /**
-     * @param $name
-     * @return array|null
-     */
-    public function findByName($name) {
-        return $this->db->findByField('t_group', 'name', $name);
-    }
-
-}
+<?php
+
+/**
+ * Copyright(C) 2015 Markus Bröker<broeker.markus@googlemail.com>
+ *
+ */
+
+namespace bfw\entities;
+
+/**
+ * Class TGroup
+ */
+class TGroup extends \bfw\entities\core\TGroup {
+
+    const SYSTEM = 1;
+    const ADMIN = 2;
+
+    /**
+     * @param $name
+     * @return array|null
+     */
+    public function findByName($name) {
+        return $this->db->findByField('t_group', 'name', $name);
+    }
+
+}
--- a/classes/bfw/entities/TUser.php
+++ b/classes/bfw/entities/TUser.php
@@ -1,49 +1,49 @@
-<?php
-
-/**
- * Copyright(C) 2015 Markus Bröker<broeker.markus@googlemail.com>
- *
- */
-
-namespace bfw\entities;
-
-/**
- * Class TUser
- */
-class TUser extends \bfw\entities\core\TUser {
-
-    const SYSTEM = 1;
-
-    /**
-     * <b>Liefert eine User-Instanz für den per Parameter übergebenen Nutzernamen.</b>
-     *
-     * @param $username
-     * @return array|null
-     */
-    public function findByUsername($username) {
-        $this->data = $this->db->findByField($this->table, 'username', $username);
-
-        if ($this->data == null) {
-            return null;
-        }
-
-        return $this;
-    }
-
-    /**
-     * <b>Liefert den formatierten Nutzernamen zur übergebenen Nutzer-Id</b>
-     *
-     * @param $user_id
-     * @return string
-     */
-    public function getFormattedUsername($user_id) {
-        $user = $this->find($user_id);
-
-        if (!is_object($user)) {
-            return null;
-        }
-
-        return sprintf("%s, %s", $user->getLastname(), $user->getFirstname());
-    }
-
-}
+<?php
+
+/**
+ * Copyright(C) 2015 Markus Bröker<broeker.markus@googlemail.com>
+ *
+ */
+
+namespace bfw\entities;
+
+/**
+ * Class TUser
+ */
+class TUser extends \bfw\entities\core\TUser {
+
+    const SYSTEM = 1;
+
+    /**
+     * <b>Liefert eine User-Instanz für den per Parameter übergebenen Nutzernamen.</b>
+     *
+     * @param $username
+     * @return array|null
+     */
+    public function findByUsername($username) {
+        $this->data = $this->db->findByField($this->table, 'username', $username);
+
+        if ($this->data == null) {
+            return null;
+        }
+
+        return $this;
+    }
+
+    /**
+     * <b>Liefert den formatierten Nutzernamen zur übergebenen Nutzer-Id</b>
+     *
+     * @param $user_id
+     * @return string
+     */
+    public function getFormattedUsername($user_id) {
+        $user = $this->find($user_id);
+
+        if (!is_object($user)) {
+            return null;
+        }
+
+        return sprintf("%s, %s", $user->getLastname(), $user->getFirstname());
+    }
+
+}
--- a/classes/bfw/entities/core/RUserGroup.php
+++ b/classes/bfw/entities/core/RUserGroup.php
@@ -16,9 +16,11 @@
  * @method setUserId($int)
  * @method int getGroupId()
  * @method setGroupId($int)
-*/
+ */
 class RUserGroup extends Entity {
+
     public function __construct() {
         parent::__construct('r_user_group');
     }
+
 }
--- a/classes/bfw/entities/core/TGroup.php
+++ b/classes/bfw/entities/core/TGroup.php
@@ -14,9 +14,11 @@
 /**
  * @method string getName()
  * @method setName($string)
-*/
+ */
 class TGroup extends Entity {
+
     public function __construct() {
         parent::__construct('t_group');
     }
+
 }
--- a/classes/bfw/entities/core/TUser.php
+++ b/classes/bfw/entities/core/TUser.php
@@ -22,9 +22,11 @@
  * @method setFirstname($string)
  * @method string getLastname()
  * @method setLastname($string)
-*/
+ */
 class TUser extends Entity {
+
     public function __construct() {
         parent::__construct('t_user');
     }
+
 }
--- a/patches/PersistenceCreator.php
+++ b/patches/PersistenceCreator.php
@@ -66,7 +66,7 @@
                     case 'char':
                         $type = "string";
                         break;
-                    default: 
+                    default:
                         $type = "string";
                 }