Skip to content

Commit 8632524

Browse files
Do not let Relationship extend Pattern and other improvements
1 parent f456026 commit 8632524

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+576
-611
lines changed

src/Expressions/Alias.php renamed to src/Alias.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2020
*/
2121

22-
namespace WikibaseSolutions\CypherDSL\Expressions;
22+
namespace WikibaseSolutions\CypherDSL;
2323

24+
use WikibaseSolutions\CypherDSL\Expressions\Variable;
2425
use WikibaseSolutions\CypherDSL\Types\AnyType;
2526
use function sprintf;
2627

@@ -30,7 +31,7 @@
3031
* @see https://neo4j.com/docs/cypher-manual/current/clauses/return/#return-column-alias
3132
* @see https://neo4j.com/docs/cypher-manual/current/clauses/with/#with-introduce-variables
3233
*/
33-
class Alias implements AnyType
34+
final class Alias
3435
{
3536
/**
3637
* @var AnyType The original item to be aliased

src/Expressions/Functions/All.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
namespace WikibaseSolutions\CypherDSL\Expressions\Functions;
2323

24-
use WikibaseSolutions\CypherDSL\Expressions\ExpressionList;
24+
use WikibaseSolutions\CypherDSL\Expressions\Literals\ExpressionList;
2525
use WikibaseSolutions\CypherDSL\Expressions\Variable;
2626
use WikibaseSolutions\CypherDSL\Traits\TypeTraits\PropertyTypeTraits\BooleanTypeTrait;
2727
use WikibaseSolutions\CypherDSL\Types\AnyType;
@@ -33,7 +33,7 @@
3333
*
3434
* @see https://neo4j.com/docs/cypher-manual/current/functions/predicate/#functions-all
3535
*/
36-
class All extends FunctionCall implements BooleanType
36+
class All extends Func implements BooleanType
3737
{
3838
use BooleanTypeTrait;
3939

src/Expressions/Functions/Any.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* @see https://neo4j.com/docs/cypher-manual/current/functions/predicate/#functions-any
3434
*/
35-
class Any extends FunctionCall implements BooleanType
35+
class Any extends Func implements BooleanType
3636
{
3737
use BooleanTypeTrait;
3838

src/Expressions/Functions/Date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-date
3535
*/
36-
class Date extends FunctionCall implements DateType
36+
class Date extends Func implements DateType
3737
{
3838
use DateTypeTrait;
3939

src/Expressions/Functions/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-datetime
3535
*/
36-
class DateTime extends FunctionCall implements DateTimeType
36+
class DateTime extends Func implements DateTimeType
3737
{
3838
use DateTimeTypeTrait;
3939

src/Expressions/Functions/Exists.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @see https://neo4j.com/docs/cypher-manual/current/functions/predicate/#functions-exists
3232
*/
33-
class Exists extends FunctionCall implements BooleanType
33+
class Exists extends Func implements BooleanType
3434
{
3535
use BooleanTypeTrait;
3636

src/Expressions/Functions/FunctionCall.php renamed to src/Expressions/Functions/Func.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,18 @@
2323

2424
use WikibaseSolutions\CypherDSL\Expressions\Variable;
2525
use WikibaseSolutions\CypherDSL\QueryConvertible;
26-
use WikibaseSolutions\CypherDSL\Traits\TypeTraits\AliasablePropertyTypeTrait;
2726
use WikibaseSolutions\CypherDSL\Types\AnyType;
2827
use WikibaseSolutions\CypherDSL\Types\CompositeTypes\ListType;
2928
use WikibaseSolutions\CypherDSL\Types\CompositeTypes\MapType;
3029
use WikibaseSolutions\CypherDSL\Types\PropertyTypes\StringType;
3130

3231
/**
33-
* This class represents any function call.
32+
* This class represents any function call. This class is named "Func", because "Function" is an invalid class name.
3433
*
3534
* @see https://neo4j.com/docs/cypher-manual/current/functions/
3635
*/
37-
abstract class FunctionCall implements QueryConvertible
36+
abstract class Func implements QueryConvertible
3837
{
39-
use AliasablePropertyTypeTrait;
40-
4138
/**
4239
* Produces a raw function call. This enables the usage of unimplemented functions in your
4340
* Cypher queries. The parameters of this function are not type-checked.

src/Expressions/Functions/IsEmpty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
* @see https://neo4j.com/docs/cypher-manual/current/functions/predicate/#functions-isempty
3636
*/
37-
class IsEmpty extends FunctionCall implements BooleanType
37+
class IsEmpty extends Func implements BooleanType
3838
{
3939
use BooleanTypeTrait;
4040
use ErrorTrait;

src/Expressions/Functions/LocalDateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localdatetime
3535
*/
36-
class LocalDateTime extends FunctionCall implements LocalDateTimeType
36+
class LocalDateTime extends Func implements LocalDateTimeType
3737
{
3838
use LocalDateTimeTypeTrait;
3939

src/Expressions/Functions/LocalTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @see https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-localtime
3535
*/
36-
class LocalTime extends FunctionCall implements LocalTimeType
36+
class LocalTime extends Func implements LocalTimeType
3737
{
3838
use LocalTimeTypeTrait;
3939

0 commit comments

Comments
 (0)