diff options
| author | Simon Rettberg | 2025-11-26 10:46:51 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2025-12-12 15:16:59 +0100 |
| commit | 7c173411785f959d250d3dfbd7d4cfcb0e20f0e0 (patch) | |
| tree | 242157791a76afb7af23ec2cd3d22b599e54ce9d /inc/arrayutil.inc.php | |
| parent | [exams] Fix incorrect count() clause (diff) | |
| download | slx-admin-7c173411785f959d250d3dfbd7d4cfcb0e20f0e0.tar.gz slx-admin-7c173411785f959d250d3dfbd7d4cfcb0e20f0e0.tar.xz slx-admin-7c173411785f959d250d3dfbd7d4cfcb0e20f0e0.zip | |
Add tests using PHPUnit
Tests generated by Junie AI. Might not have the best possible quality
but at least we got something, and if it turns out to be complete
rubbish, we can just throw it out again without any issues, as this is
independent of the actual code base.
Diffstat (limited to 'inc/arrayutil.inc.php')
| -rw-r--r-- | inc/arrayutil.inc.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/arrayutil.inc.php b/inc/arrayutil.inc.php index 3d93d7d5..ff44b914 100644 --- a/inc/arrayutil.inc.php +++ b/inc/arrayutil.inc.php @@ -8,6 +8,8 @@ class ArrayUtil /** * Take an array of arrays, take given key from each sub-array and return * new array with just those corresponding values. + * If a key is missing from one of the sub-arrays, the entry will be skipped, + * and the resulting array will have fewer entries than the input array. */ public static function flattenByKey(array $list, string $key): array { |
