- Added missing PHPdocs
- Corrected Syntax
- Added noinspection parameters to PHPdoc for AJAX called functions
- Added missing function return types
- Added missing parameter types
- Added public keyword to functions without visibility modifier
- Corrected incorrectly formatted PHPdocs
- Added public to constants and functions missing a visibility keyword
This commit is contained in:
objecttothis
2023-12-05 17:26:28 +04:00
committed by jekkos
parent 88007f56be
commit ba9bcd7786
137 changed files with 3070 additions and 330 deletions

View File

@@ -20,6 +20,10 @@ class Module extends Model
'sort'
];
/**
* @param string $module_id
* @return string
*/
public function get_module_name(string $module_id): string
{
$builder = $this->db->table('modules');
@@ -35,6 +39,10 @@ class Module extends Model
return lang('Errors.unknown');
}
/**
* @param string $module_id
* @return string
*/
public function get_module_desc(string $module_id): string //TODO: This method doesn't seem to be called in the code. Is it needed? Also, probably should change the name to get_module_description()
{
$builder = $this->db->table('modules');
@@ -50,6 +58,9 @@ class Module extends Model
return lang('Errors.unknown');
}
/**
* @return ResultInterface
*/
public function get_all_permissions(): ResultInterface
{
$builder = $this->db->table('permissions');
@@ -57,6 +68,9 @@ class Module extends Model
return $builder->get();
}
/**
* @return ResultInterface
*/
public function get_all_subpermissions(): ResultInterface
{
$builder = $this->db->table('permissions');
@@ -68,6 +82,9 @@ class Module extends Model
return $builder->get();
}
/**
* @return ResultInterface
*/
public function get_all_modules(): ResultInterface
{
$builder = $this->db->table('modules');
@@ -76,6 +93,10 @@ class Module extends Model
return $builder->get();
}
/**
* @param int $person_id
* @return ResultInterface
*/
public function get_allowed_home_modules(int $person_id): ResultInterface
{
$menus = ['home', 'both'];
@@ -90,6 +111,10 @@ class Module extends Model
return $builder->get();
}
/**
* @param int $person_id
* @return ResultInterface
*/
public function get_allowed_office_modules(int $person_id): ResultInterface
{
$menus = ['office', 'both'];