Skip to content

Commit

Permalink
Fix phpdocs (#3358)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Feb 27, 2020
1 parent 884b28a commit 5a4f4d9
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion redaxo/src/addons/install/lib/package/package_update.php
Expand Up @@ -25,7 +25,7 @@ protected function checkPreConditions()
if (!rex_addon::exists($this->addonkey)) {
throw new rex_functional_exception(sprintf('AddOn "%s" does not exist!', $this->addonkey));
}
$this->addon = rex_addon::get($this->addonkey);
$this->addon = rex_addon::require($this->addonkey);
if (!rex_string::versionCompare($this->file['version'], $this->addon->getVersion(), '>')) {
throw new rex_functional_exception(sprintf('Existing version of AddOn "%s" (%s) is newer than %s', $this->addonkey, $this->addon->getVersion(), $this->file['version']));
}
Expand Down
6 changes: 3 additions & 3 deletions redaxo/src/addons/install/lib/packages.php
Expand Up @@ -8,15 +8,15 @@
class rex_install_packages
{
/**
* @var array
* @var array|null
*/
private static $updatePackages;
/**
* @var array
* @var array|null
*/
private static $addPackages;
/**
* @var array
* @var array|null
*/
private static $myPackages;

Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/addons/mediapool/lib/media_category.php
Expand Up @@ -33,7 +33,7 @@ class rex_media_category
/**
* @param int $id
*
* @return self
* @return self|null
*/
public static function get($id)
{
Expand Down
7 changes: 5 additions & 2 deletions redaxo/src/addons/mediapool/lib/media_category_select.php
Expand Up @@ -7,10 +7,13 @@
*/
class rex_media_category_select extends rex_select
{
/**
* @var bool
*/
private $check_perms;

/**
* @var int|int[]
* @var int|int[]|null
*/
private $rootId;

Expand All @@ -27,7 +30,7 @@ public function __construct($check_perms = true)
/**
* Kategorie-Id oder ein Array von Kategorie-Ids als Wurzelelemente der Select-Box.
*
* @param mixed $rootId Kategorie-Id oder Array von Kategorie-Ids zur Identifikation der Wurzelelemente
* @param int|int[]|null $rootId Kategorie-Id oder Array von Kategorie-Ids zur Identifikation der Wurzelelemente
*/
public function setRootId($rootId)
{
Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/addons/metainfo/lib/input.php
Expand Up @@ -132,7 +132,7 @@ abstract public function getHtml();
*
* @param string $inputType
*
* @return self
* @return self|null
*
* @deprecated instantiate the concrete classes directly instead
*/
Expand Down
4 changes: 2 additions & 2 deletions redaxo/src/addons/structure/lib/navigation.php
Expand Up @@ -80,7 +80,7 @@ public static function factory()
public function get($category_id = 0, $depth = 3, $open = false, $ignore_offlines = false)
{
if (!$this->_setActivePath()) {
return false;
return '';
}

$this->depth = $depth;
Expand Down Expand Up @@ -112,7 +112,7 @@ public function show($category_id = 0, $depth = 3, $open = false, $ignore_offlin
public function getBreadcrumb($startPageLabel, $includeCurrent = false, $category_id = 0)
{
if (!$this->_setActivePath()) {
return false;
return '';
}

$path = $this->path;
Expand Down
16 changes: 14 additions & 2 deletions redaxo/src/addons/structure/lib/select_category.php
Expand Up @@ -5,13 +5,25 @@
*/
class rex_category_select extends rex_select
{
/**
* @var bool
*/
private $ignore_offlines;
/**
* @var bool|int
*/
private $clang;
/**
* @var bool
*/
private $check_perms;
/**
* @var bool
*/
private $add_homepage;

/**
* @var int
* @var int|int[]|null
*/
private $rootId;

Expand All @@ -32,7 +44,7 @@ public function __construct($ignore_offlines = false, $clang = false, $check_per
/**
* Kategorie-Id oder ein Array von Kategorie-Ids als Wurzelelemente der Select-Box.
*
* @param mixed $rootId Kategorie-Id oder Array von Kategorie-Ids zur Identifikation der Wurzelelemente
* @param int|int[]|null $rootId Kategorie-Id oder Array von Kategorie-Ids zur Identifikation der Wurzelelemente
*/
public function setRootId($rootId)
{
Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/addons/structure/lib/structure_element.php
Expand Up @@ -48,7 +48,7 @@ protected function __construct(array $params)
*
* @param string $value
*
* @return string
* @return string|null
*/
public function getValue($value)
{
Expand Down
4 changes: 4 additions & 0 deletions redaxo/src/addons/users/lib/role.php
Expand Up @@ -32,6 +32,8 @@ class rex_user_role implements rex_user_role_interface

/**
* Constructor.
*
* @param array[] $roles
*/
private function __construct(array $roles)
{
Expand Down Expand Up @@ -93,6 +95,8 @@ public function getComplexPerm(rex_user $user, $key)

/**
* {@inheritdoc}
*
* @return self|null
*/
public static function get($ids)
{
Expand Down

0 comments on commit 5a4f4d9

Please sign in to comment.