Skip to content

Commit cbe4916

Browse files
Run php-cs-fixer and slightly decrease minimum MSI
1 parent 8dc255a commit cbe4916

File tree

9 files changed

+11
-19
lines changed

9 files changed

+11
-19
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
COMPOSER_VERSION: 2
2121
COVERAGE_DRIVER: xdebug
2222
MINIMUM_COVERAGE_PERCENTAGE: 90
23-
MINIMUM_MSI_PERCENTAGE: 84.27
23+
MINIMUM_MSI_PERCENTAGE: 82
2424

2525
steps:
2626
- name: Checkout repository

src/Expressions/Literals/List_.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
use WikibaseSolutions\CypherDSL\Patterns\Pattern;
1313
use WikibaseSolutions\CypherDSL\Traits\CastTrait;
14-
use WikibaseSolutions\CypherDSL\Traits\ErrorTrait;
1514
use WikibaseSolutions\CypherDSL\Traits\TypeTraits\CompositeTypeTraits\ListTypeTrait;
1615
use WikibaseSolutions\CypherDSL\Types\AnyType;
1716
use WikibaseSolutions\CypherDSL\Types\CompositeTypes\ListType;

src/Expressions/Literals/Literal.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Point;
2020
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Procedure;
2121
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Time;
22-
use WikibaseSolutions\CypherDSL\Query;
2322
use WikibaseSolutions\CypherDSL\Traits\ErrorTrait;
2423
use WikibaseSolutions\CypherDSL\Types\PropertyTypes\NumeralType;
2524
use WikibaseSolutions\CypherDSL\Types\PropertyTypes\StringType;

src/Expressions/Literals/Map.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
namespace WikibaseSolutions\CypherDSL\Expressions\Literals;
1111

1212
use WikibaseSolutions\CypherDSL\Traits\CastTrait;
13-
use WikibaseSolutions\CypherDSL\Traits\ErrorTrait;
1413
use WikibaseSolutions\CypherDSL\Traits\EscapeTrait;
1514
use WikibaseSolutions\CypherDSL\Traits\TypeTraits\CompositeTypeTraits\MapTypeTrait;
1615
use WikibaseSolutions\CypherDSL\Types\AnyType;

src/Expressions/Procedures/Procedure.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class Procedure implements QueryConvertible
3535
* Produces a raw function call. This enables the usage of unimplemented functions in your
3636
* Cypher queries. The parameters of this function are not type-checked.
3737
*
38-
* @param string $functionName The name of the function to call
38+
* @param string $functionName The name of the function to call
3939
* @param AnyType|AnyType[]|bool|bool[]|float|float[]|int|int[]|mixed[]|mixed[][]|Pattern|Pattern[]|string|string[]|(AnyType|bool|float|int|mixed[]|Pattern|string)[] $parameters The parameters to pass to the function call
4040
*/
4141
public static function raw(string $functionName, $parameters): Raw

src/Patterns/Relationship.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ private function relationshipDetailToString(): string
266266

267267
if (count($types) !== 0) {
268268
// If we have at least one condition type, escape them and insert them into the query
269-
$escapedTypes = array_map(fn (string $type): string => self::escape($type), $types);
269+
$escapedTypes = array_map(static fn (string $type): string => self::escape($type), $types);
270270
$conditionInner .= sprintf(":%s", implode("|", $escapedTypes));
271271
}
272272

src/Query.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public function __toString(): string
362362
*
363363
* @note This feature is not part of the openCypher standard.
364364
*
365-
* @param callable|Query $query A callable decorating a Query, or an instance of Query
365+
* @param callable|Query $query A callable decorating a Query, or an instance of Query
366366
* @param Pattern|Pattern[]|string|string[]|Variable|Variable[]|(Pattern|string|Variable)[] $variables The variables to include in the WITH clause for correlation (optional)
367367
*
368368
* @return $this
@@ -396,7 +396,7 @@ public function call($query, $variables = []): self
396396
/**
397397
* Creates the CALL procedure clause.
398398
*
399-
* @param Procedure $procedure The procedure to call
399+
* @param Procedure $procedure The procedure to call
400400
* @param Alias|Alias[]|string|string[]|Variable|Variable[]|(Alias|string|Variable)[] $yields The result fields that should be returned (optional)
401401
*
402402
* @return $this
@@ -447,7 +447,7 @@ public function match($patterns): self
447447
* Creates the RETURN clause.
448448
*
449449
* @param Alias|Alias[]|AnyType|AnyType[]|mixed[]|bool|bool[]|float|float[]|int|int[]|Pattern|Pattern[]|string|string[]|(Alias|AnyType|mixed[]|bool|float|int|Pattern|string)[] $expressions A single expression to return, or a non-empty list of expressions to return
450-
* @param bool $distinct Whether to be a RETURN DISTINCT clause (optional, default: false)
450+
* @param bool $distinct Whether to be a RETURN DISTINCT clause (optional, default: false)
451451
*
452452
* @return $this
453453
*
@@ -497,7 +497,7 @@ public function create($patterns): self
497497
* Creates the DELETE clause.
498498
*
499499
* @param Pattern|Pattern[]|StructuralType|StructuralType[]|(Pattern|StructuralType)[] $structures A single structure to delete, or a non-empty list of structures to delete
500-
* @param bool $detach Whether to DETACH DELETE (optional, default: false)
500+
* @param bool $detach Whether to DETACH DELETE (optional, default: false)
501501
*
502502
* @return $this
503503
*
@@ -691,8 +691,8 @@ public function set($expressions): self
691691
* Creates the WHERE clause.
692692
*
693693
* @param bool|bool[]|BooleanType|BooleanType[]|(bool|BooleanType)[] $expressions A boolean expression to evaluate, or a non-empty list of boolean expression to evaluate
694-
* @param string $operator The operator with which to unify the given expressions, should be either WhereClause::OR,
695-
* WhereClause::AND or WhereClause::XOR (optional, default: 'and')
694+
* @param string $operator The operator with which to unify the given expressions, should be either WhereClause::OR,
695+
* WhereClause::AND or WhereClause::XOR (optional, default: 'and')
696696
*
697697
* @return $this
698698
*

tests/unit/Expressions/Procedures/ProcedureTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
namespace WikibaseSolutions\CypherDSL\Tests\Unit\Expressions\Procedures;
1111

1212
use PHPUnit\Framework\TestCase;
13-
use WikibaseSolutions\CypherDSL\Expressions\Literals\Boolean;
14-
use WikibaseSolutions\CypherDSL\Expressions\Literals\List_;
15-
use WikibaseSolutions\CypherDSL\Expressions\Literals\Literal;
16-
use WikibaseSolutions\CypherDSL\Expressions\Literals\Map;
1713
use WikibaseSolutions\CypherDSL\Expressions\Procedures\All;
1814
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Any;
1915
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Date;
@@ -28,9 +24,7 @@
2824
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Raw;
2925
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Single;
3026
use WikibaseSolutions\CypherDSL\Expressions\Procedures\Time;
31-
use WikibaseSolutions\CypherDSL\Expressions\Variable;
3227
use WikibaseSolutions\CypherDSL\Query;
33-
use WikibaseSolutions\CypherDSL\Types\AnyType;
3428

3529
/**
3630
* @covers \WikibaseSolutions\CypherDSL\Expressions\Procedures\Procedure

tests/unit/Traits/EscapeTraitTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
namespace WikibaseSolutions\CypherDSL\Tests\Unit\Traits;
1111

12+
use InvalidArgumentException;
1213
use PHPUnit\Framework\TestCase;
1314
use WikibaseSolutions\CypherDSL\Traits\EscapeTrait;
1415

@@ -64,7 +65,7 @@ public function testValueWithMoreThan65534CharactersCannotBeEscaped(): void
6465
{
6566
$value = str_repeat('a', 65535);
6667

67-
$this->expectException(\InvalidArgumentException::class);
68+
$this->expectException(InvalidArgumentException::class);
6869

6970
$this->trait->escape($value);
7071
}

0 commit comments

Comments
 (0)