1 | <?php |
||
2 | /** |
||
3 | * Created by PhpStorm. |
||
4 | * Author: Adrian Dumitru |
||
5 | * Date: 4/30/2017 4:47 PM |
||
6 | */ |
||
7 | |||
8 | namespace Qpdb\QueryBuilder\Traits; |
||
9 | |||
10 | |||
11 | use Qpdb\QueryBuilder\DB\DbConnect; |
||
0 ignored issues
–
show
|
|||
12 | use Qpdb\QueryBuilder\Dependencies\QueryHelper; |
||
13 | use Qpdb\QueryBuilder\Dependencies\QueryStructure; |
||
14 | use Qpdb\QueryBuilder\Statements\QueryStatementInterface; |
||
15 | |||
16 | /** |
||
17 | * Trait Replacement |
||
18 | * @package Qpdb\QueryBuilder\Traits |
||
19 | * @property QueryStructure $queryStructure |
||
20 | */ |
||
21 | trait Replacement |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @param $syntax |
||
26 | * @param int|bool $withReplacement |
||
27 | * @return mixed|string |
||
28 | */ |
||
29 | private function getSyntaxReplace( $syntax, $withReplacement = QueryStatementInterface::REPLACEMENT_NONE ) |
||
30 | { |
||
31 | $syntax = QueryHelper::clearMultipleSpaces( $syntax ); |
||
32 | |||
33 | if ( !$withReplacement ) |
||
34 | return $syntax; |
||
35 | |||
36 | return $this->replaceValues( $syntax ); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param string $syntax |
||
41 | * @return string |
||
42 | */ |
||
43 | private function replaceValues( $syntax ) |
||
44 | { |
||
45 | $bindParams = $this->queryStructure->getElement( QueryStructure::BIND_PARAMS ); |
||
46 | $search = array(); |
||
47 | $replace = array(); |
||
48 | foreach ( $bindParams as $key => $value ) { |
||
49 | $search[] = ':' . $key; |
||
50 | $replace[] = DbConnect::getInstance()->quote( $value ); |
||
51 | } |
||
52 | $syntax = str_ireplace( $search, $replace, $syntax ); |
||
53 | |||
54 | return $syntax; |
||
55 | |||
56 | } |
||
57 | |||
58 | } |
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