Skip to content

Commit e4cb18a

Browse files
Merge pull request #54 from WikibaseSolutions/fix-typing
Minor fixes to typing, move AliasTest class
2 parents 406bf1e + 058b94c commit e4cb18a

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ phpunit.xml
44
vendor/
55
*.idea
66
.phpunit.result.cache
7+
.php-cs-fixer.cache

src/Query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public function create($patterns): self
313313
/**
314314
* Creates the DELETE clause.
315315
*
316-
* @param Variable|Variable[] $nodes The nodes to delete
316+
* @param Variable|Variable[] $variables The nodes to delete
317317
*
318318
* @return $this
319319
* @see https://neo4j.com/docs/cypher-manual/current/clauses/delete/
@@ -608,7 +608,7 @@ public function with($expressions): self
608608
* @param string $subject The subject/body of the clause
609609
* @return Query
610610
*/
611-
public function raw(string $clause, string $subject)
611+
public function raw(string $clause, string $subject): self
612612
{
613613
$this->clauses[] = new RawClause($clause, $subject);
614614

src/Traits/HasPropertiesTrait.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use function is_array;
2525
use WikibaseSolutions\CypherDSL\PropertyMap;
2626
use WikibaseSolutions\CypherDSL\Types\AnyType;
27-
use WikibaseSolutions\CypherDSL\Types\StructuralTypes\HasPropertiesType;
2827

2928
trait HasPropertiesTrait
3029
{
@@ -38,9 +37,9 @@ trait HasPropertiesTrait
3837
* @param string $key The name of the property
3938
* @param AnyType $value The value of the property
4039
*
41-
* @return HasPropertiesType
40+
* @return static
4241
*/
43-
public function withProperty(string $key, AnyType $value): HasPropertiesType
42+
public function withProperty(string $key, AnyType $value): self
4443
{
4544
$this->initialiseProperties();
4645

@@ -54,9 +53,9 @@ public function withProperty(string $key, AnyType $value): HasPropertiesType
5453
*
5554
* @param PropertyMap|array $properties
5655
*
57-
* @return HasPropertiesType
56+
* @return static
5857
*/
59-
public function withProperties($properties): HasPropertiesType
58+
public function withProperties($properties): self
6059
{
6160
self::assertClass('properties', [PropertyMap::class, 'array'], $properties);
6261

tests/AliasTest.php renamed to tests/Unit/AliasTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
22

3-
namespace WikibaseSolutions\CypherDSL\Tests;
3+
namespace WikibaseSolutions\CypherDSL\Tests\Unit;
44

55
use PHPUnit\Framework\TestCase;
66
use WikibaseSolutions\CypherDSL\Alias;
7-
use WikibaseSolutions\CypherDSL\Tests\Unit\TestHelper;
87
use WikibaseSolutions\CypherDSL\Variable;
98

9+
/**
10+
* @covers \WikibaseSolutions\CypherDSL\Alias
11+
*/
1012
class AliasTest extends TestCase
1113
{
1214
use TestHelper;

0 commit comments

Comments
 (0)