Commit 19c8e3eb authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-849 Fixed typos, removed unnecessary isset() checks.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 32c3d863
...@@ -527,10 +527,12 @@ class ASDevice extends StateObject { ...@@ -527,10 +527,12 @@ class ASDevice extends StateObject {
* @return string * @return string
*/ */
public function GetFolderUUID($folderid = false) { public function GetFolderUUID($folderid = false) {
if ($folderid === false) if ($folderid === false) {
return (isset($this->hierarchyUuid) && $this->hierarchyUuid !== self::UNDEFINED) ? $this->hierarchyUuid : false; return (isset($this->hierarchyUuid) && $this->hierarchyUuid !== self::UNDEFINED) ? $this->hierarchyUuid : false;
else if (isset($this->contentData) && isset($this->contentData[$folderid]) && isset($this->contentData[$folderid][self::FOLDERUUID])) }
else if (isset($this->contentData[$folderid][self::FOLDERUUID])) {
return $this->contentData[$folderid][self::FOLDERUUID]; return $this->contentData[$folderid][self::FOLDERUUID];
}
return false; return false;
} }
...@@ -583,10 +585,9 @@ class ASDevice extends StateObject { ...@@ -583,10 +585,9 @@ class ASDevice extends StateObject {
* @return int/boolean returns false if the type is not set * @return int/boolean returns false if the type is not set
*/ */
public function GetFolderType($folderid) { public function GetFolderType($folderid) {
if (isset($this->contentData) && isset($this->contentData[$folderid]) && if (isset($this->contentData[$folderid][self::FOLDERTYPE])) {
isset($this->contentData[$folderid][self::FOLDERTYPE]) )
return $this->contentData[$folderid][self::FOLDERTYPE]; return $this->contentData[$folderid][self::FOLDERTYPE];
}
return false; return false;
} }
...@@ -621,9 +622,7 @@ class ASDevice extends StateObject { ...@@ -621,9 +622,7 @@ class ASDevice extends StateObject {
* @return int/boolean returns false if the type is not set * @return int/boolean returns false if the type is not set
*/ */
public function GetFolderBackendId($folderid) { public function GetFolderBackendId($folderid) {
if (isset($this->contentData) && isset($this->contentData[$folderid]) && if (isset($this->contentData[$folderid][self::FOLDERBACKENDID])) {
isset($this->contentData[$folderid][self::FOLDERBACKENDID]) ) {
return $this->contentData[$folderid][self::FOLDERBACKENDID]; return $this->contentData[$folderid][self::FOLDERBACKENDID];
} }
return false; return false;
...@@ -664,7 +663,7 @@ class ASDevice extends StateObject { ...@@ -664,7 +663,7 @@ class ASDevice extends StateObject {
* If there is no known AS folderId a new one is being created. * If there is no known AS folderId a new one is being created.
* *
* @param string $backendid * @param string $backendid
* @param boolean $generateNewIdIfNew Generates a new AS folderid for the case the backend folder is is not known yet. * @param boolean $generateNewIdIfNew Generates a new AS folderid for the case the backend folder is not known yet.
* *
* @access public * @access public
* @return int * @return int
......
...@@ -851,7 +851,7 @@ class DeviceManager { ...@@ -851,7 +851,7 @@ class DeviceManager {
* If there is no known AS folderId a new one is being created. * If there is no known AS folderId a new one is being created.
* *
* @param string $backendid * @param string $backendid
* @param boolean $generateNewIdIfNew Generates a new AS folderid for the case the backend folder is is not known yet, default: false. * @param boolean $generateNewIdIfNew Generates a new AS folderid for the case the backend folder is not known yet, default: false.
* *
* @access public * @access public
* @return int/boolean returns false if there is folderid known for this backendid and $generateNewIdIfNew is not set or false. * @return int/boolean returns false if there is folderid known for this backendid and $generateNewIdIfNew is not set or false.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment