Skip to content

Commit

Permalink
Merge branch 'next' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
LaravelFreelancerNL authored Apr 9, 2024
2 parents 66ebceb + a78ae58 commit d7a3137
Show file tree
Hide file tree
Showing 92 changed files with 400 additions and 514 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.3
extensions: mbstring, intl
ini-values: post_max_size=256M, short_open_tag=On
coverage: xdebug
Expand All @@ -27,6 +27,6 @@ jobs:

- name: Test coverage
run: |
vendor/bin/phpunit --coverage-clover clover.xml --whitelist src
vendor/bin/phpunit --coverage-clover clover.xml --coverage-filter src
echo "Upload results to Scrutinizer-ci"
vendor/bin/ocular code-coverage:upload --format=php-clover clover.xml
6 changes: 1 addition & 5 deletions .github/workflows/fix-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Checkout
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
with:
Expand All @@ -41,6 +37,6 @@ jobs:
"${GITHUB_WORKSPACE}/vendor/bin/pint"
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
2 changes: 1 addition & 1 deletion .github/workflows/quality-assurance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.0, 8.1, 8.2]
php: [8.3]
name: Quality checks P${{ matrix.php }}

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.0, 8.1, 8.2]
php: [8.1, 8.2, 8.3]
stability: [prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.stability }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: next
commit_message: Update CHANGELOG
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@
"minimum-stability": "dev",
"prefer-stable" : true,
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-json": "*",
"spatie/ray": "^1.34"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.6",
"laravel/pint": "^1.2.1",
"laravel/pint": "^1.13",
"mockery/mockery": "^1.4",
"nikic/php-parser": "^4.2@dev",
"phpmd/phpmd": "^2.9",
"phpstan/phpstan": "^1.2",
"phpunit/phpunit": "^9.5",
"scrutinizer/ocular": "^1.8",
"sebastian/phpcpd": "^6.0"
"phpunit/phpunit": "^10.5",
"scrutinizer/ocular": "^1.8"
},
"autoload": {
"psr-4": {
Expand Down
34 changes: 17 additions & 17 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
bootstrap="vendor/autoload.php"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
beStrictAboutTestsThatDoNotTestAnything="false"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
beStrictAboutTestsThatDoNotTestAnything="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="all">
<directory suffix=".php">tests/</directory>
</testsuite>
</testsuites>
</phpunit>
<testsuites>
<testsuite name="all">
<directory suffix=".php">tests/</directory>
</testsuite>
</testsuites>
</phpunit>
3 changes: 3 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"preset": "per"
}
19 changes: 3 additions & 16 deletions src/AQL/HasArangoSearchFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function analyzer(): FunctionExpression
$analyzer = array_pop($arguments);

$predicates = $arguments;
if (! is_array($predicates[0])) {
if (!is_array($predicates[0])) {
$predicates = [[
...$predicates,
]];
Expand All @@ -54,7 +54,7 @@ public function boost(): FunctionExpression
$boost = array_pop($arguments);

$predicates = $arguments;
if (! is_array($predicates[0])) {
if (!is_array($predicates[0])) {
$predicates = [[
...$predicates,
]];
Expand Down Expand Up @@ -110,14 +110,10 @@ public function tfidf(
* Match documents where the attribute at path is present and is of the specified data type.
*
* https://www.arangodb.com/docs/stable/aql/functions-arangosearch.html#exists
*
* @param Expression|QueryBuilder|string $path
* @param Expression|QueryBuilder|null|string $type
* @return FunctionExpression
*/
public function exists(
Expression|QueryBuilder|string $path,
Expression|null|string|QueryBuilder $type = null
Expression|string|QueryBuilder $type = null
): FunctionExpression {
$arguments = [
$path,
Expand All @@ -132,13 +128,6 @@ public function exists(
* Match documents where the attribute at path is present and is of the specified data type.
*
* https://www.arangodb.com/docs/stable/aql/functions-arangosearch.html#in_range
*
* @param string|Expression $path
* @param int|float|string|Expression|QueryBuilder $low
* @param int|float|string|Expression|QueryBuilder $high
* @param bool|Expression|QueryBuilder|null $includeLow
* @param bool|Expression|QueryBuilder|null $includeHigh
* @return FunctionExpression
*/
public function inRange(
string|Expression $path,
Expand Down Expand Up @@ -171,7 +160,6 @@ public function inRange(
* @param null|bool|object $transpositions
* @param null|int|object $maxTerms
* @param null|string|object $prefix
* @return FunctionExpression
*/
public function levenshteinMatch(
mixed $path,
Expand Down Expand Up @@ -221,7 +209,6 @@ public function like(
* @param string|object $target
* @param null|int|float|object $threshold
* @param null|string|object $analyzer
* @return FunctionExpression
*/
public function nGramMatch(
mixed $path,
Expand Down
16 changes: 0 additions & 16 deletions src/AQL/HasArrayFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ trait HasArrayFunctions
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#append
*
* @param array<mixed>|object $array
* @param mixed $values
* @param bool|null $unique
* @return FunctionExpression
*/
public function append(mixed $array, mixed $values, bool $unique = null): FunctionExpression
{
Expand All @@ -44,7 +41,6 @@ public function append(mixed $array, mixed $values, bool $unique = null): Functi
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#length
*
* @param mixed $value
* @return FunctionExpression
*/
public function count($value): FunctionExpression
{
Expand All @@ -57,7 +53,6 @@ public function count($value): FunctionExpression
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#count_distinct
*
* @param mixed $value
* @return FunctionExpression
*/
public function countDistinct($value): FunctionExpression
{
Expand All @@ -70,7 +65,6 @@ public function countDistinct($value): FunctionExpression
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#first
*
* @param mixed $value
* @return FunctionExpression
*/
public function first($value): FunctionExpression
{
Expand All @@ -84,7 +78,6 @@ public function first($value): FunctionExpression
*
* @param array<mixed>|object $array
* @param int|object $depth
* @return FunctionExpression
*/
public function flatten(mixed $array, mixed $depth = 1): FunctionExpression
{
Expand All @@ -102,7 +95,6 @@ public function flatten(mixed $array, mixed $depth = 1): FunctionExpression
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#intersection
*
* @param array<mixed> ...$arrays
* @return FunctionExpression
*/
public function intersection(array ...$arrays): FunctionExpression
{
Expand All @@ -115,7 +107,6 @@ public function intersection(array ...$arrays): FunctionExpression
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#last
*
* @param mixed $value
* @return FunctionExpression
*/
public function last($value): FunctionExpression
{
Expand All @@ -124,9 +115,6 @@ public function last($value): FunctionExpression

/**
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#length
*
* @param mixed $value
* @return FunctionExpression
*/
public function length(mixed $value): FunctionExpression
{
Expand All @@ -139,7 +127,6 @@ public function length(mixed $value): FunctionExpression
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#shift
*
* @param array<mixed>|object $array
* @return FunctionExpression
*/
public function shift(mixed $array): FunctionExpression
{
Expand All @@ -152,7 +139,6 @@ public function shift(mixed $array): FunctionExpression
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#union
*
* @param array<mixed>|Expression|QueryBuilder $arrays
* @return FunctionExpression
*/
public function union(
array|Expression|QueryBuilder ...$arrays
Expand All @@ -166,7 +152,6 @@ public function union(
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#union_distinct
*
* @param array<mixed>|Expression|QueryBuilder $arrays
* @return FunctionExpression
*/
public function unionDistinct(
array|Expression|QueryBuilder ...$arrays
Expand All @@ -180,7 +165,6 @@ public function unionDistinct(
* @link https://www.arangodb.com/docs/stable/aql/functions-array.html#unique
*
* @param array<mixed>|object $array
* @return FunctionExpression
*/
public function unique(mixed $array): FunctionExpression
{
Expand Down
4 changes: 2 additions & 2 deletions src/AQL/HasDateFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function dateRound(
public function dateUtcToLocal(
int|string|object $date,
string|object $timezone,
null|array|object $zoneInfo = null
array|object $zoneInfo = null
): FunctionExpression {
$arguments = [
'date' => $date,
Expand All @@ -225,7 +225,7 @@ public function dateUtcToLocal(
public function dateLocalToUtc(
int|string|object $date,
string|object $timezone,
null|array|object $zoneInfo = null
array|object $zoneInfo = null
): FunctionExpression {
$arguments = [
'date' => $date,
Expand Down
8 changes: 2 additions & 6 deletions src/AQL/HasDocumentFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function keepAttributes(
string|array|object $document,
string|array|object $attributes
): FunctionExpression {
if (! is_array($attributes)) {
if (!is_array($attributes)) {
$attributes = [$attributes];
}

Expand All @@ -68,8 +68,6 @@ public function keepAttributes(
*
* @param array<mixed>|object $document
* @param array<mixed>|object $examples
* @param bool|QueryBuilder|Expression $returnIndex
* @return FunctionExpression
*/
public function matches(
array|object $document,
Expand All @@ -91,7 +89,6 @@ public function matches(
* @link https://www.arangodb.com/docs/stable/aql/functions-document.html#merge
*
* @param array<mixed>|string|Expression $documents
* @return FunctionExpression
*/
public function merge(string|array|Expression ...$documents): FunctionExpression
{
Expand All @@ -104,7 +101,6 @@ public function merge(string|array|Expression ...$documents): FunctionExpression
* @link https://www.arangodb.com/docs/stable/aql/functions-document.html#parse_identifier
*
* @param string|object $documentHandle
* @return FunctionExpression
*/
public function parseIdentifier(mixed $documentHandle): FunctionExpression
{
Expand All @@ -122,7 +118,7 @@ public function unset(
string|object $document,
string|array|object $attributes
): FunctionExpression {
if (! is_array($attributes)) {
if (!is_array($attributes)) {
$attributes = [$attributes];
}

Expand Down
Loading

0 comments on commit d7a3137

Please sign in to comment.