Fix the type of Labels::update_cache()
This commit is contained in:
parent
f2323bda81
commit
b37a03fb31
|
@ -553,6 +553,8 @@ class Article extends Handler_Protected {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($rv) > 0)
|
if (count($rv) > 0)
|
||||||
|
// PHPStan has issues with the shape of $rv for some reason (array vs non-empty-array).
|
||||||
|
// @phpstan-ignore-next-line
|
||||||
Labels::update_cache($owner_uid, $id, $rv);
|
Labels::update_cache($owner_uid, $id, $rv);
|
||||||
else
|
else
|
||||||
Labels::update_cache($owner_uid, $id, array("no-labels" => 1));
|
Labels::update_cache($owner_uid, $id, array("no-labels" => 1));
|
||||||
|
|
|
@ -71,7 +71,8 @@ class Labels
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<int, array<int, array<int, int|string>>> $labels
|
* @param array{'no-labels': 1}|array<int, array<int, array{0: int, 1: string, 2: string, 3: string}>> $labels
|
||||||
|
* [label_id, caption, fg_color, bg_color]
|
||||||
*
|
*
|
||||||
* @see Article::_get_labels()
|
* @see Article::_get_labels()
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue