forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbug-14462.php
More file actions
48 lines (41 loc) · 1.22 KB
/
Copy pathbug-14462.php
File metadata and controls
48 lines (41 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php declare(strict_types = 1);
namespace Bug14462;
/** @return array{menu: array<non-empty-string, bool>} */
function get_config(): array {
return ['menu' => []];
}
$config = get_config();
$data = [ ];
if ($config['menu']['notefrais']) {
$data[] = [ 'name' => 'notefrais', 'menu' => 'notefrais_base' ];
}
if ($config['menu']['achat']) {
$data[] = [ 'name' => 'achat', 'menu' => 'achat_base' ];
}
if ($config['menu']['vente-commande_planning'] || $config['menu']['vente-commande']) {
$data[] = [ 'name' => 'vente' , 'menu' => 'vente_order_recent' ];
}
if ($config['menu']['vente-commande_planning']) {
$data[] = [ 'name' => 'vente', 'menu' => 'vente_base_planned' ];
}
if ($config['menu']['vente-commande']) {
$data[] = [ 'name' => 'vente', 'menu' => 'vente_base_com' ];
}
if ($config['menu']['carte']) {
$data[] = [ 'name' => 'carte', 'menu' => '' ];
}
if ($config['menu']['crm']) {
$data[] = [ 'name' => 'crm', 'menu' => 'crm_suivi' ];
}
if ($config['menu']['inventaire']) {
$data[] = [ 'name' => 'inventaire', 'menu' => 'inventaire_base' ];
}
foreach ($data as $row) {
$stack = [ ];
if ($row['menu'] === 'vente_order_recent') {
$stack[] = 'f';
}
else {
$stack[] = 'g';
}
}