-
Notifications
You must be signed in to change notification settings - Fork 555
Expand file tree
/
Copy pathbug-6799b.php
More file actions
47 lines (41 loc) · 1.2 KB
/
bug-6799b.php
File metadata and controls
47 lines (41 loc) · 1.2 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
<?php declare(strict_types = 1);
namespace Bug6799b;
use function PHPStan\Testing\assertType;
class HelloWorld
{
/**
* listingAddWhereFilterAtableRoleCategory
*
* @param string[] $where
* @param string $sqlTableName
* @param mixed[] $filter
* @param string $value
*
* @return void
*/
protected function listingAddWhereFilterAtableDefault(array &$where, string $sqlTableName, array $filter, string $value): void
{
if ($value != "" && !empty($filter) && !empty($filter['sql']) && is_string($filter['sql'])) {
$where[] = "`" . $sqlTableName . "`.`" . (string)$filter['sql'] . "` = '" . $value . "'";
}
}
/**
* listingAddWhereFilterAtableFilter
*
* @param string[] $filterValues
* @param string[] $where
* @param string[] $tables
* @param mixed[] $filters
* @return void
*/
protected function listingAddWhereFilterAtable(array $filterValues, array &$where, array &$tables, array $filters): void
{
if (!empty($filterValues) && !empty($filters)) {
$whereFilter = array();
foreach ($filterValues as $type => $value) {
$this->listingAddWhereFilterAtableDefault($whereFilter, 'xxxxx', $filters[$type], $value);
}
assertType('array<string>', $whereFilter);
}
}
}