aswi2020sebela-gitlab/website/src/Utils/Utils.php @ 4e8c0e5b
1 | 03c02899 | vastja | <?php
|
---|---|---|---|
2 | |||
3 | namespace App\Utils; |
||
4 | |||
5 | class Utils { |
||
6 | public static function prepareDatasetsNames($datasets) { |
||
7 | 3ae59f75 | vastja | $names = []; |
8 | 03c02899 | vastja | |
9 | $index = 0; |
||
10 | foreach ($datasets as $key => $value) { |
||
11 | 4cc90563 | vastja | if (false == array_key_exists($value['name'], $names)) { |
12 | $names[$value['name']] = $index++; |
||
13 | }
|
||
14 | 03c02899 | vastja | }
|
15 | |||
16 | return $names; |
||
17 | }
|
||
18 | }
|