__args()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace BrenoRoosevelt;
5
6
const CALLBACK_USE_VALUE = 0;
7
const CALLBACK_USE_KEY = 1;
8
const CALLBACK_USE_BOTH = 2;
9
10
/**
11
 * @internal
12
 */
13
function __args(int $mode, $k, $v): array
14
{
15
    $args = [];
16
    $args[CALLBACK_USE_KEY] = [$k];
17
    $args[CALLBACK_USE_BOTH] = [$v, $k];
18
19
    return $args[$mode] ?? [$v];
20
}
21