Skip to content

Commit 48b086d

Browse files
Update README.md
1 parent a939651 commit 48b086d

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,45 @@
11
# php-cypher-dsl
22

3-
![Build status](https://github.com/WikibaseSolutions/php-cypher-dsl/actions/workflows/main.yml/badge.svg)
3+
![Build
4+
status](https://github.com/WikibaseSolutions/php-cypher-dsl/actions/workflows/main.yml/badge.svg)
45

5-
The `php-cypher-dsl` library provides a way to construct advanced Cypher queries in an object-oriented and type-safe manner.
6+
The `php-cypher-dsl` library provides a way to construct advanced Cypher
7+
queries in an object-oriented and type-safe manner.
68

79
## Documentation
810

9-
[The documentation can be found on the wiki here.](https://github.com/WikibaseSolutions/php-cypher-dsl/wiki)
11+
[The documentation can be found on the wiki
12+
here.](https://github.com/WikibaseSolutions/php-cypher-dsl/wiki)
1013

1114
## Installation
1215

1316
### Requirements
1417

15-
`php-cypher-dsl` requires PHP 7.4 or greater; using the latest version of PHP is highly recommended.
18+
`php-cypher-dsl` requires PHP 7.4 or greater; using the latest version of PHP
19+
is highly recommended.
1620

1721
### Installation through Composer
1822

19-
You can install `php-cypher-dsl` through composer by running the following command:
23+
You can install `php-cypher-dsl` through composer by running the following
24+
command:
2025

2126
```
2227
composer require "wikibase-solutions/php-cypher-dsl"
2328
```
2429

2530
## Example
2631

27-
To construct a query to find all of Tom Hanks' co-actors, you can use the following code:
32+
To construct a query to find all of Tom Hanks' co-actors, you can use the
33+
following code:
2834

2935
```php
30-
$tom = Query::node("Person")->withProperties(["name" => Query::literal("Tom Hanks")]);
36+
$tom = Query::node("Person")->withProperties(["name" => "Tom Hanks"]);
3137
$coActors = Query::node();
3238

3339
$statement = Query::new()
3440
->match($tom->relationshipTo(Query::node(), "ACTED_IN")->relationshipFrom($coActors, "ACTED_IN"))
3541
->returning($coActors->property("name"))
3642
->build();
3743

38-
$this->assertStringMatchesFormat("MATCH (:Person {name: 'Tom Hanks'})-[:`ACTED_IN`]->()<-[:`ACTED_IN`]-(%s) RETURN %s.name", $statement);
44+
$this->assertStringMatchesFormat("MATCH (:Person {name: 'Tom Hanks'})-[:ACTED_IN]->()<-[:ACTED_IN]-(%s) RETURN %s.name", $statement);
3945
```

0 commit comments

Comments
 (0)