PreparedStatements   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
eloc 2
c 2
b 1
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A generatePlaceholdersString() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WebServCo\Framework\Database\Utils;
6
7
final class PreparedStatements
8
{
9
    /**
10
    * @param array<int,float|int|string> $data
11
    */
12
    public static function generatePlaceholdersString(array $data = []): string
13
    {
14
        /**
15
        * Pre PHP 7.4 Anonymous function: `static function () { return '?';}`
16
        */
17
        return \implode(', ', \array_map(static fn () => '?', $data));
18
    }
19
}
20