diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-08 17:08:52 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-08 17:08:52 +0200 |
| commit | a1fda2758e9c241ac3eb980ac8716dfedbe9dd3c (patch) | |
| tree | 2190f0478fb153efdb8ba48ebb574c7691f4f351 /lib/models/StudipStudyArea.class.php | |
| parent | 244d00ed91ad2b4b83e902a45cd6def3d7bc7e86 (diff) | |
let phpcsfixer fix errors according to @PSR12 rules on lib/modelsphpcsfixer
Diffstat (limited to 'lib/models/StudipStudyArea.class.php')
| -rw-r--r-- | lib/models/StudipStudyArea.class.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/models/StudipStudyArea.class.php b/lib/models/StudipStudyArea.class.php index 6650526..463d198 100644 --- a/lib/models/StudipStudyArea.class.php +++ b/lib/models/StudipStudyArea.class.php @@ -34,7 +34,7 @@ class StudipStudyArea extends SimpleORMap /** * This constant represents the key of the root area. */ - const ROOT = 'root'; + public const ROOT = 'root'; protected static function configure($config = []) { @@ -69,7 +69,7 @@ class StudipStudyArea extends SimpleORMap /** * Returns the children of the study area with the specified ID. */ - static function findByParent($parent_id) + public static function findByParent($parent_id) { return self::findByparent_id($parent_id, "ORDER BY priority,name"); } @@ -80,13 +80,11 @@ class StudipStudyArea extends SimpleORMap public static function find($id) { - $result = NULL; + $result = null; if ($id === self::ROOT) { $result = self::getRootArea(); - } - - else { + } else { $result = parent::find($id); } @@ -156,7 +154,7 @@ class StudipStudyArea extends SimpleORMap */ public function getParent() { - $result = NULL; + $result = null; if ($this->getID() !== self::ROOT) { $result = $this->_parent; } @@ -198,7 +196,7 @@ class StudipStudyArea extends SimpleORMap */ public function getTypeName() { - if(isset($GLOBALS['SEM_TREE_TYPES'][$this->getType()]['name'])){ + if(isset($GLOBALS['SEM_TREE_TYPES'][$this->getType()]['name'])) { return $GLOBALS['SEM_TREE_TYPES'][$this->getType()]['name']; } else { return ''; @@ -212,7 +210,7 @@ class StudipStudyArea extends SimpleORMap */ public function isEditable() { - if(isset($GLOBALS['SEM_TREE_TYPES'][$this->getType()]['editable'])){ + if(isset($GLOBALS['SEM_TREE_TYPES'][$this->getType()]['editable'])) { return (bool)$GLOBALS['SEM_TREE_TYPES'][$this->getType()]['editable']; } else { return false; @@ -240,7 +238,7 @@ class StudipStudyArea extends SimpleORMap * * @return mixed TODO */ - public function getPath($separator = NULL) + public function getPath($separator = null) { $path = []; |
