mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #32857 from nextcloud/debt/noid/result-may-undefined
Fix undefined when no tags
This commit is contained in:
commit
477dae9e11
1 changed files with 4 additions and 2 deletions
|
|
@ -23,8 +23,8 @@
|
|||
namespace OC\Core\Command\SystemTag;
|
||||
|
||||
use OC\Core\Command\Base;
|
||||
use OCP\SystemTag\ISystemTagManager;
|
||||
use OCP\SystemTag\ISystemTag;
|
||||
use OCP\SystemTag\ISystemTagManager;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
|
@ -70,7 +70,9 @@ class ListCommand extends Base {
|
|||
* @param ISystemtag[] $tags
|
||||
* @return array
|
||||
*/
|
||||
private function formatTags(array $tags) {
|
||||
private function formatTags(array $tags): array {
|
||||
$result = [];
|
||||
|
||||
foreach ($tags as $tag) {
|
||||
$result[$tag->getId()] = [
|
||||
'name' => $tag->getName(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue