lib/private/SystemTag/SystemTagObjectMapper.php
/**
	 * Asserts that all the given tag ids exist.
	 *
	 * @param string[] $tagIds tag ids to check
	 *
	 * @throws \OCP\SystemTag\TagNotFoundException if at least one tag did not exist
	 */
Asserts that all the given tag ids exist.
@param string[] $tagIds tag ids to check

@throws \OCP\SystemTag\TagNotFoundException if at least one tag did not exist
Asserts that all the given tag ids exist . @param string [] $tagIds tag ids to check @throws \ OCP \ SystemTag \ TagNotFoundException if at least one tag did not exist
private function assertTagsExist($tagIds) {
		$tags = $this->tagManager->getTagsByIds($tagIds);
		if (count($tags) !== count($tagIds)) {
			$foundTagIds = array_map(
				function(ISystemTag $tag) {
					return $tag->getId();
				},
				$tags
			);
			$missingTagIds = array_diff($tagIds, $foundTagIds);
			throw new TagNotFoundException(
				'Tags not found', 0, null, $missingTagIds
			);
		}
	}
private function assertTagsExist ( $ tagIds ) { $ tags = $ this -> tagManager -> getTagsByIds ( $ tagIds ) ; if ( count ( $ tags ) !== count ( $ tagIds ) ) { $ foundTagIds = array_map ( function ( ISystemTag $ tag ) { return $ tag -> getId ( ) ; } , $ tags ) ; $ missingTagIds = array_diff ( $ tagIds , $ foundTagIds ) ; throw new TagNotFoundException ( 'Tags not found' , 0 , null , $ missingTagIds ) ; } }
Asserts that all the given tag ids exist.
Asserts that all the given tag ids exist .
// at least one tag missing, bail out