|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Jabe\Engine\Impl; |
|
4
|
|
|
|
|
5
|
|
|
use Jabe\Engine\{ |
|
6
|
|
|
EntityTypes, |
|
7
|
|
|
FilterServiceInterface |
|
8
|
|
|
}; |
|
9
|
|
|
use Jabe\Engine\Filter\{ |
|
10
|
|
|
FilterInterface, |
|
11
|
|
|
FilterQueryInterface |
|
12
|
|
|
}; |
|
13
|
|
|
use Jabe\Engine\Impl\Cmd\{ |
|
14
|
|
|
CreateFilterCmd, |
|
15
|
|
|
DeleteFilterCmd, |
|
16
|
|
|
ExecuteFilterCountCmd, |
|
17
|
|
|
ExecuteFilterListCmd, |
|
18
|
|
|
ExecuteFilterListPageCmd, |
|
19
|
|
|
ExecuteFilterSingleResultCmd, |
|
|
|
|
|
|
20
|
|
|
GetFilterCmd, |
|
21
|
|
|
SaveFilterCmd |
|
22
|
|
|
}; |
|
23
|
|
|
use Jabe\Engine\Impl\Filter\FilterQueryImpl; |
|
24
|
|
|
use Jabe\Engine\Query\QueryInterface; |
|
25
|
|
|
|
|
26
|
|
|
class FilterServiceImpl extends ServiceImpl implements FilterServiceInterface |
|
27
|
|
|
{ |
|
28
|
|
|
public function newTaskFilter(string $filterName = null): FilterInterface |
|
29
|
|
|
{ |
|
30
|
|
|
$filter = $this->commandExecutor->execute(new CreateFilterCmd(EntityTypes::TASK)); |
|
31
|
|
|
if ($filterName !== null) { |
|
32
|
|
|
$filter->setName($filterName); |
|
33
|
|
|
} |
|
34
|
|
|
return $filter; |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
public function createFilterQuery(): FilterQueryIntefrace |
|
|
|
|
|
|
38
|
|
|
{ |
|
39
|
|
|
return new FilterQueryImpl($this->commandExecutor); |
|
|
|
|
|
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
public function createTaskFilterQuery(): FilterQueryInterface |
|
43
|
|
|
{ |
|
44
|
|
|
return (new FilterQueryImpl($this->commandExecutor))->filterResourceType(EntityTypes::TASK); |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
public function saveFilter(FilterInterface $filter): FilterInterface |
|
48
|
|
|
{ |
|
49
|
|
|
return $this->commandExecutor->execute(new SaveFilterCmd($filter)); |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
public function getFilter(string $filterId): FilterInterface |
|
53
|
|
|
{ |
|
54
|
|
|
return $this->commandExecutor->execute(new GetFilterCmd($filterId)); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
public function deleteFilter(string $filterId): void |
|
58
|
|
|
{ |
|
59
|
|
|
$this->commandExecutor->execute(new DeleteFilterCmd($filterId)); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
public function list(string $filterId, ?QueryInterface $extendingQuery = null): array |
|
63
|
|
|
{ |
|
64
|
|
|
return $this->commandExecutor->execute(new ExecuteFilterListCmd($filterId, $extendingQuery)); |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
public function listPage(string $filterId, ?QueryInterface $extendingQuery, int $firstResult, int $maxResults): array |
|
68
|
|
|
{ |
|
69
|
|
|
return $this->commandExecutor->execute(new ExecuteFilterListPageCmd($filterId, $extendingQuery, $firstResult, $maxResults)); |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
public function singleResult(string $filterId, ?QueryInterface $extendingQuery = null) |
|
73
|
|
|
{ |
|
74
|
|
|
return $this->commandExecutor->execute(new ExecuteFilterSingleResultCmd($filterId, $extendingQuery)); |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
public function count(string $filterId, ?QueryInterface $extendingQuery = null): int |
|
78
|
|
|
{ |
|
79
|
|
|
return $this->commandExecutor->execute(new ExecuteFilterCountCmd($filterId, $extendingQuery)); |
|
80
|
|
|
} |
|
81
|
|
|
} |
|
82
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths