|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Sfneal\Tracking\Builders; |
|
4
|
|
|
|
|
5
|
|
|
use Domain\Users\Builders\Interfaces\WhereUserInterface; |
|
|
|
|
|
|
6
|
|
|
use Domain\Users\Builders\Traits\WhereUser; |
|
|
|
|
|
|
7
|
|
|
use Sfneal\Builders\QueryBuilder; |
|
8
|
|
|
|
|
9
|
|
|
// todo: add use of User package |
|
10
|
|
|
class TrackTrafficBuilder extends QueryBuilder implements WhereUserInterface |
|
11
|
|
|
{ |
|
12
|
|
|
use WhereUser; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Scope query results to Traffic sent to a particular endpoint $uri. |
|
16
|
|
|
* |
|
17
|
|
|
* @param string $uri |
|
18
|
|
|
* @param string $operator |
|
19
|
|
|
* @param string $boolean |
|
20
|
|
|
* |
|
21
|
|
|
* @return $this |
|
22
|
|
|
*/ |
|
23
|
|
|
public function whereRequestUri(string $uri, string $operator = '=', string $boolean = 'and') |
|
24
|
|
|
{ |
|
25
|
|
|
$this->where('request_uri', $operator, $uri, $boolean); |
|
26
|
|
|
|
|
27
|
|
|
return $this; |
|
28
|
|
|
} |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* Add an 'or where' request_uri clause to the query. |
|
32
|
|
|
* |
|
33
|
|
|
* @param string $uri |
|
34
|
|
|
* @param string $operator |
|
35
|
|
|
* |
|
36
|
|
|
* @return $this |
|
37
|
|
|
*/ |
|
38
|
|
|
public function orWhereRequestUri(string $uri, string $operator = '=') |
|
39
|
|
|
{ |
|
40
|
|
|
$this->whereRequestUri($uri, $operator, 'or'); |
|
41
|
|
|
|
|
42
|
|
|
return $this; |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* Scope query results to Traffic sent to an array of $uris. |
|
47
|
|
|
* |
|
48
|
|
|
* @param array $uris |
|
49
|
|
|
* @param string $boolean |
|
50
|
|
|
* @param bool $not |
|
51
|
|
|
* |
|
52
|
|
|
* @return $this |
|
53
|
|
|
*/ |
|
54
|
|
|
public function whereRequestUriIn(array $uris, string $boolean = 'and', bool $not = false) |
|
55
|
|
|
{ |
|
56
|
|
|
$this->whereIn('request_uri', $uris, $boolean, $not); |
|
57
|
|
|
|
|
58
|
|
|
return $this; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* Add a where clause that scopes query results to Traffic originating in a particular app environment. |
|
63
|
|
|
* |
|
64
|
|
|
* @param string $environment |
|
65
|
|
|
* @param string $operator |
|
66
|
|
|
* @param string $boolean |
|
67
|
|
|
* |
|
68
|
|
|
* @return $this |
|
69
|
|
|
*/ |
|
70
|
|
|
public function whereEnvironment(string $environment, string $operator = '=', string $boolean = 'and') |
|
71
|
|
|
{ |
|
72
|
|
|
$this->where('app_environment', $operator, $environment, $boolean); |
|
73
|
|
|
|
|
74
|
|
|
return $this; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* Scope query results to only Traffic originating from a 'production' environment. |
|
79
|
|
|
* |
|
80
|
|
|
* @return $this |
|
81
|
|
|
*/ |
|
82
|
|
|
public function whereEnvironmentProduction() |
|
83
|
|
|
{ |
|
84
|
|
|
$this->whereEnvironment('production'); |
|
85
|
|
|
|
|
86
|
|
|
return $this; |
|
87
|
|
|
} |
|
88
|
|
|
} |
|
89
|
|
|
|
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