mirror of
https://github.com/friendica/friendica
synced 2025-04-26 12:30:11 +00:00
make ACLFormatter::expand() nullable and return an empty array
- optimize tests
This commit is contained in:
parent
aa7be41728
commit
f4ad82bcfb
2 changed files with 93 additions and 146 deletions
|
@ -14,13 +14,13 @@ final class ACLFormatter
|
|||
*
|
||||
* @param string|null $ids A angle-bracketed list of IDs
|
||||
*
|
||||
* @return array|null The array based on the IDs (null in case there is no list)
|
||||
* @return array The array based on the IDs (empty in case there is no list)
|
||||
*/
|
||||
public function expand(string $ids = null)
|
||||
{
|
||||
// In case there is no ID list, return null (=> no ACL set)
|
||||
// In case there is no ID list, return empty array (=> no ACL set)
|
||||
if (!isset($ids)) {
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
|
||||
// turn string array of angle-bracketed elements into numeric array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue