File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 35
35
use function is_resource ;
36
36
use function is_string ;
37
37
use function key ;
38
- use function preg_match ;
39
38
use function strpos ;
40
39
use TypeError ;
41
40
Original file line number Diff line number Diff line change 21
21
22
22
namespace WikibaseSolutions \CypherDSL \Traits ;
23
23
24
- use InvalidArgumentException ;
24
+ use function preg_match ;
25
+ use function sprintf ;
26
+ use function str_replace ;
25
27
26
28
/**
27
29
* Trait for encoding certain structures that are used in multiple clauses in a
@@ -53,10 +55,11 @@ public static function escape(string $name): string
53
55
* Escapes the given $name to be used directly in a CYPHER query.
54
56
* Note: according to https://github.com/neo4j/neo4j/issues/12901 backslashes might give problems in some Neo4j versions.
55
57
*/
56
- public static function escapeRaw ($ name ) {
58
+ public static function escapeRaw ($ name )
59
+ {
57
60
58
61
// Escape backticks that are included in $name by doubling them.
59
- $ name = str_replace ('` ' ,'`` ' ,$ name );
62
+ $ name = str_replace ('` ' , '`` ' , $ name );
60
63
61
64
return sprintf ("`%s` " , $ name );
62
65
}
Original file line number Diff line number Diff line change 21
21
22
22
namespace WikibaseSolutions \CypherDSL \Tests \Unit \Patterns ;
23
23
24
- use InvalidArgumentException ;
25
24
use PHPUnit \Framework \TestCase ;
26
25
use WikibaseSolutions \CypherDSL \ExpressionList ;
27
26
use WikibaseSolutions \CypherDSL \Literals \Decimal ;
Original file line number Diff line number Diff line change 21
21
22
22
namespace WikibaseSolutions \CypherDSL \Tests \Unit \Traits ;
23
23
24
- use InvalidArgumentException ;
25
24
use PHPUnit \Framework \MockObject \MockObject ;
26
25
use PHPUnit \Framework \TestCase ;
27
26
use WikibaseSolutions \CypherDSL \Traits \EscapeTrait ;
You can’t perform that action at this time.
0 commit comments