From 5ed824966cf2f32db682d4a1f5c7db6f49ab2413 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 26 Sep 2022 20:11:54 +0200 Subject: [PATCH 1/2] Migrate to nextcloud/OCP package in stable25 Signed-off-by: Joas Schilling --- .github/workflows/psalm.yml | 12 +-- .github/workflows/update-nextcloud-ocp.yml | 65 ++++++++++++++++ composer.json | 83 ++++++++++---------- composer.lock | 90 +++++++++++----------- 4 files changed, 156 insertions(+), 94 deletions(-) create mode 100644 .github/workflows/update-nextcloud-ocp.yml diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 5833989..ff271c1 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -5,20 +5,17 @@ on: push: branches: - master + - main - stable* jobs: - static-psalm-analysis: + static-analysis: runs-on: ubuntu-latest - strategy: - matrix: - ocp-version: [ 'dev-stable25' ] - name: Nextcloud ${{ matrix.ocp-version }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Set up php uses: shivammathur/setup-php@v2 @@ -29,8 +26,5 @@ jobs: - name: Install dependencies run: composer i - - name: Install dependencies - run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }} - - name: Run coding standards check run: composer run psalm diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml new file mode 100644 index 0000000..a396b6f --- /dev/null +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -0,0 +1,65 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Update nextcloud/ocp + +on: + workflow_dispatch: + schedule: + - cron: "5 4 * * 0" + +jobs: + update-nextcloud-ocp: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + branches: ["master", "stable25", "stable24", "stable23"] + + name: update-nextcloud-ocp-${{ matrix.branches }} + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branches }} + submodules: true + + - name: Set up php7.4 + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip + coverage: none + + - name: Composer install + run: composer install + + - name: Composer update nextcloud/ocp + run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }} + continue-on-error: true + + - name: Reset checkout dirs + run: | + git clean -f 3rdparty + git clean -f vendor + git checkout 3rdparty vendor + continue-on-error: true + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.COMMAND_BOT_PAT }} + commit-message: Update psalm baseline + committer: GitHub + author: nextcloud-command + signoff: true + branch: automated/noid/${{ matrix.branches }}-update-nextcloud-ocp + title: "[${{ matrix.branches }}] Update nextcloud/ocp dependency" + body: | + Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency + labels: | + dependencies + 3. to review diff --git a/composer.json b/composer.json index 3545be5..6f8c550 100644 --- a/composer.json +++ b/composer.json @@ -1,41 +1,46 @@ { - "name": "nextcloud/related_resources", - "description": "RelatedResources App", - "minimum-stability": "stable", - "license": "agpl", - "config": { - "optimize-autoloader": true, - "classmap-authoritative": true, - "autoloader-suffix": "RelatedResources", - "platform": { - "php": "7.4" - } - }, "authors": [ - { - "name": "Maxence Lange", - "email": "maxence@artificial-owl.com" - } - ], - "autoload": { - "psr-4": { - "OCA\\RelatedResources\\": "lib/" - } - }, - "scripts": { - "cs:check": "php-cs-fixer fix --dry-run --diff", - "cs:fix": "php-cs-fixer fix", - "psalm": "psalm --threads=1 --update-baseline", - "psalm:init": "psalm --init", - "psalm:update-baseline": "psalm --threads=1 --update-baseline", - "psalm:clear": "psalm --clear-cache && psalm --clear-global-cache", - "psalm:fix": "psalm --alter --issues=InvalidReturnType,MissingReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType", - "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l" - }, - "require-dev": { - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^4.22", - "christophwurst/nextcloud": "dev-stable25", - "nextcloud/coding-standard": "^1.0" - } - + "name": "nextcloud/related_resources", + "description": "RelatedResources App", + "minimum-stability": "stable", + "license": "agpl", + "config": { + "optimize-autoloader": true, + "classmap-authoritative": true, + "autoloader-suffix": "RelatedResources", + "platform": { + "php": "7.4" + } + }, + "authors": [ + { + "name": "Maxence Lange", + "email": "maxence@artificial-owl.com" + } + ], + "autoload": { + "psr-4": { + "OCA\\RelatedResources\\": "lib/" + } + }, + "scripts": { + "cs:check": "php-cs-fixer fix --dry-run --diff", + "cs:fix": "php-cs-fixer fix", + "psalm": "psalm --threads=1 --update-baseline", + "psalm:init": "psalm --init", + "psalm:update-baseline": "psalm --threads=1 --update-baseline", + "psalm:clear": "psalm --clear-cache && psalm --clear-global-cache", + "psalm:fix": "psalm --alter --issues=InvalidReturnType,MissingReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType", + "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l" + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.22", + "nextcloud/coding-standard": "^1.0", + "nextcloud/ocp": "dev-stable25" + }, + "autoload-dev": { + "psr-4": { + "OCP\\": "vendor/nextcloud/ocp/OCP" + } + } } diff --git a/composer.lock b/composer.lock index 62e4a9f..237d8df 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5496fdeca3f5f3657bd0e47cc2c58ed2", + "content-hash": "d4aca4e5ad54456d2e07c03c27f044df", "packages": [], "packages-dev": [ { @@ -173,50 +173,6 @@ ], "time": "2021-03-30T17:13:30+00:00" }, - { - "name": "christophwurst/nextcloud", - "version": "dev-stable25", - "source": { - "type": "git", - "url": "https://github.com/ChristophWurst/nextcloud_composer.git", - "reference": "f79ac43d0422211b35542856338d808bc94a116b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/f79ac43d0422211b35542856338d808bc94a116b", - "reference": "f79ac43d0422211b35542856338d808bc94a116b", - "shasum": "" - }, - "require": { - "php": "^7.4 || ~8.0 || ~8.1", - "psr/container": "^1.1.1", - "psr/event-dispatcher": "^1.0", - "psr/log": "^1.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "26.0.0-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Christoph Wurst", - "email": "christoph@winzerhof-wurst.at" - } - ], - "description": "Composer package containing Nextcloud's public API (classes, interfaces)", - "support": { - "issues": "https://github.com/ChristophWurst/nextcloud_composer/issues", - "source": "https://github.com/ChristophWurst/nextcloud_composer/tree/stable25" - }, - "abandoned": "nextcloud/ocp", - "time": "2022-09-22T12:39:39+00:00" - }, { "name": "composer/package-versions-deprecated", "version": "1.11.99.5", @@ -1105,6 +1061,48 @@ }, "time": "2021-11-10T08:44:10+00:00" }, + { + "name": "nextcloud/ocp", + "version": "dev-stable25", + "source": { + "type": "git", + "url": "https://github.com/nextcloud-deps/ocp.git", + "reference": "f79ac43d0422211b35542856338d808bc94a116b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/f79ac43d0422211b35542856338d808bc94a116b", + "reference": "f79ac43d0422211b35542856338d808bc94a116b", + "shasum": "" + }, + "require": { + "php": "^7.4 || ~8.0 || ~8.1", + "psr/container": "^1.1.1", + "psr/event-dispatcher": "^1.0", + "psr/log": "^1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "26.0.0-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Christoph Wurst", + "email": "christoph@winzerhof-wurst.at" + } + ], + "description": "Composer package containing Nextcloud's public API (classes, interfaces)", + "support": { + "source": "https://github.com/nextcloud-deps/ocp/tree/stable25" + }, + "time": "2022-09-22T12:39:39+00:00" + }, { "name": "nikic/php-parser", "version": "v4.15.1", @@ -4722,7 +4720,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "christophwurst/nextcloud": 20 + "nextcloud/ocp": 20 }, "prefer-stable": false, "prefer-lowest": false, From 82e434e8f335c4fe44090456e66fe081a74bc9da Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Sat, 8 Oct 2022 10:34:47 -0100 Subject: [PATCH 2/2] removing useless cast Signed-off-by: Maxence Lange --- composer.lock | 94 ++++++++++++++------------- lib/Tools/Db/ExtendedQueryBuilder.php | 44 ++++++------- 2 files changed, 72 insertions(+), 66 deletions(-) diff --git a/composer.lock b/composer.lock index 237d8df..c71227a 100644 --- a/composer.lock +++ b/composer.lock @@ -1067,12 +1067,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "f79ac43d0422211b35542856338d808bc94a116b" + "reference": "43944a3cec16f7faba2f648665a08d54e2d93507" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/f79ac43d0422211b35542856338d808bc94a116b", - "reference": "f79ac43d0422211b35542856338d808bc94a116b", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/43944a3cec16f7faba2f648665a08d54e2d93507", + "reference": "43944a3cec16f7faba2f648665a08d54e2d93507", "shasum": "" }, "require": { @@ -1099,9 +1099,10 @@ ], "description": "Composer package containing Nextcloud's public API (classes, interfaces)", "support": { + "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/stable25" }, - "time": "2022-09-22T12:39:39+00:00" + "time": "2022-10-04T01:00:11+00:00" }, { "name": "nikic/php-parser", @@ -1803,16 +1804,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.24", + "version": "9.5.25", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", "shasum": "" }, "require": { @@ -1834,14 +1835,14 @@ "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.1", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, "suggest": { @@ -1885,7 +1886,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" }, "funding": [ { @@ -1895,9 +1896,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-08-30T07:42:16+00:00" + "time": "2022-09-25T03:44:45+00:00" }, { "name": "psr/cache", @@ -3062,16 +3067,16 @@ }, { "name": "symfony/console", - "version": "v5.4.12", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1" + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1", - "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1", + "url": "https://api.github.com/repos/symfony/console/zipball/3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", "shasum": "" }, "require": { @@ -3141,7 +3146,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.12" + "source": "https://github.com/symfony/console/tree/v5.4.13" }, "funding": [ { @@ -3157,7 +3162,7 @@ "type": "tidelift" } ], - "time": "2022-08-17T13:18:05+00:00" + "time": "2022-08-26T13:50:20+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3392,16 +3397,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.12", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "2d67c1f9a1937406a9be3171b4b22250c0a11447" + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/2d67c1f9a1937406a9be3171b4b22250c0a11447", - "reference": "2d67c1f9a1937406a9be3171b4b22250c0a11447", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", "shasum": "" }, "require": { @@ -3436,7 +3441,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.12" + "source": "https://github.com/symfony/filesystem/tree/v5.4.13" }, "funding": [ { @@ -3452,7 +3457,7 @@ "type": "tidelift" } ], - "time": "2022-08-02T13:48:16+00:00" + "time": "2022-09-21T19:53:16+00:00" }, { "name": "symfony/finder", @@ -4304,16 +4309,16 @@ }, { "name": "symfony/stopwatch", - "version": "v5.4.5", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30" + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/4d04b5c24f3c9a1a168a131f6cbe297155bc0d30", - "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6df7a3effde34d81717bbef4591e5ffe32226d69", + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69", "shasum": "" }, "require": { @@ -4346,7 +4351,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.5" + "source": "https://github.com/symfony/stopwatch/tree/v5.4.13" }, "funding": [ { @@ -4362,20 +4367,20 @@ "type": "tidelift" } ], - "time": "2022-02-18T16:06:09+00:00" + "time": "2022-09-28T13:19:49+00:00" }, { "name": "symfony/string", - "version": "v5.4.12", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058" + "reference": "2900c668a32138a34118740de3e4d5a701801f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058", - "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058", + "url": "https://api.github.com/repos/symfony/string/zipball/2900c668a32138a34118740de3e4d5a701801f53", + "reference": "2900c668a32138a34118740de3e4d5a701801f53", "shasum": "" }, "require": { @@ -4432,7 +4437,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.12" + "source": "https://github.com/symfony/string/tree/v5.4.13" }, "funding": [ { @@ -4448,7 +4453,7 @@ "type": "tidelift" } ], - "time": "2022-08-12T17:03:11+00:00" + "time": "2022-09-01T01:52:16+00:00" }, { "name": "theseer/tokenizer", @@ -4502,16 +4507,16 @@ }, { "name": "vimeo/psalm", - "version": "4.27.0", + "version": "4.28.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff" + "reference": "52e96bea381e6cb07a672aefec791a5817694a26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/faf106e717c37b8c81721845dba9de3d8deed8ff", - "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/52e96bea381e6cb07a672aefec791a5817694a26", + "reference": "52e96bea381e6cb07a672aefec791a5817694a26", "shasum": "" }, "require": { @@ -4550,6 +4555,7 @@ "phpdocumentor/reflection-docblock": "^5", "phpmyadmin/sql-parser": "5.1.0||dev-master", "phpspec/prophecy": ">=1.9.0", + "phpstan/phpdoc-parser": "1.2.* || 1.6.4", "phpunit/phpunit": "^9.0", "psalm/plugin-phpunit": "^0.16", "slevomat/coding-standard": "^7.0", @@ -4603,9 +4609,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.27.0" + "source": "https://github.com/vimeo/psalm/tree/4.28.0" }, - "time": "2022-08-31T13:47:09+00:00" + "time": "2022-10-07T16:13:24+00:00" }, { "name": "webmozart/assert", @@ -4729,5 +4735,5 @@ "platform-overrides": { "php": "7.4" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.0.0" } diff --git a/lib/Tools/Db/ExtendedQueryBuilder.php b/lib/Tools/Db/ExtendedQueryBuilder.php index 0f002b3..818e57e 100644 --- a/lib/Tools/Db/ExtendedQueryBuilder.php +++ b/lib/Tools/Db/ExtendedQueryBuilder.php @@ -405,9 +405,9 @@ public function exprLike(string $field, string $value, string $alias = '', bool $expr = $this->expr(); if ($cs) { - return (string) $expr->like($field, $this->createNamedParameter($value)); + return $expr->like($field, $this->createNamedParameter($value)); } else { - return (string) $expr->iLike($field, $this->createNamedParameter($value)); + return $expr->iLike($field, $this->createNamedParameter($value)); } } @@ -418,14 +418,14 @@ public function exprLimit(string $field, string $value, string $alias = '', bool $expr = $this->expr(); if ($value === '') { - return (string) $expr->emptyString($field); + return $expr->emptyString($field); } if ($cs) { - return (string)$expr->eq($field, $this->createNamedParameter($value)); + return $expr->eq($field, $this->createNamedParameter($value)); } else { $func = $this->func(); - return (string)$expr->eq($func->lower($field), $func->lower($this->createNamedParameter($value))); + return $expr->eq($func->lower($field), $func->lower($this->createNamedParameter($value))); } } @@ -436,7 +436,7 @@ public function exprLimitInt(string $field, int $value, string $alias = ''): str $expr = $this->expr(); - return (string)$expr->eq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); + return $expr->eq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } @@ -454,7 +454,7 @@ public function exprLimitBool(string $field, bool $value, string $alias = ''): s $expr = $this->expr(); - return (string)$expr->eq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_BOOL)); + return $expr->eq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_BOOL)); } /** @@ -555,7 +555,7 @@ public function exprLimitInArray(string $field, array $values, string $alias = ' $expr = $this->expr(); - return (string)$expr->in($field, $this->createNamedParameter($values, IQueryBuilder::PARAM_STR_ARRAY)); + return $expr->in($field, $this->createNamedParameter($values, IQueryBuilder::PARAM_STR_ARRAY)); } @@ -573,7 +573,7 @@ public function exprLimitBitwise(string $field, int $flag, string $alias = ''): $expr = $this->expr(); - return (string)$expr->gt( + return $expr->gt( $expr->bitwiseAnd($field, $flag), $this->createNamedParameter(0, IQueryBuilder::PARAM_INT) ); @@ -596,9 +596,9 @@ public function exprLt(string $field, int $value, bool $lte = false, string $ali $expr = $this->expr(); if ($lte) { - return (string)$expr->lte($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); + return $expr->lte($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } else { - return (string)$expr->lt($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); + return $expr->lt($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } } @@ -618,9 +618,9 @@ public function exprGt(string $field, int $value, bool $gte = false, string $ali $expr = $this->expr(); if ($gte) { - return (string)$expr->gte($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); + return $expr->gte($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } else { - return (string)$expr->gt($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); + return $expr->gt($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } } @@ -726,11 +726,11 @@ public function exprUnlike(string $field, string $value, string $alias = '', boo $expr = $this->expr(); if ($cs) { - return (string) $expr->notLike($field, $this->createNamedParameter($value)); + return $expr->notLike($field, $this->createNamedParameter($value)); } else { $func = $this->func(); - return (string) $expr->notLike($func->lower($field), $func->lower($this->createNamedParameter($value))); + return $expr->notLike($func->lower($field), $func->lower($this->createNamedParameter($value))); } } @@ -750,14 +750,14 @@ public function exprFilter(string $field, string $value, string $alias = '', boo $expr = $this->expr(); if ($value === '') { - return (string) $expr->nonEmptyString($field); + return $expr->nonEmptyString($field); } if ($cs) { - return (string) $expr->neq($field, $this->createNamedParameter($value)); + return $expr->neq($field, $this->createNamedParameter($value)); } else { $func = $this->func(); - return (string) $expr->neq($func->lower($field), $func->lower($this->createNamedParameter($value))); + return $expr->neq($func->lower($field), $func->lower($this->createNamedParameter($value))); } } @@ -776,7 +776,7 @@ public function exprFilterInt(string $field, int $value, string $alias = ''): st $expr = $this->expr(); - return (string) $expr->neq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); + return $expr->neq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } @@ -794,7 +794,7 @@ public function exprFilterBool(string $field, bool $value, string $alias = ''): $expr = $this->expr(); - return (string) $expr->neq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_BOOL)); + return $expr->neq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_BOOL)); } /** @@ -895,7 +895,7 @@ public function exprFilterInArray(string $field, array $values, string $alias = $expr = $this->expr(); - return (string) $expr->notIn($field, $this->createNamedParameter($values, IQueryBuilder::PARAM_STR_ARRAY)); + return $expr->notIn($field, $this->createNamedParameter($values, IQueryBuilder::PARAM_STR_ARRAY)); } @@ -913,7 +913,7 @@ public function exprFilterBitwise(string $field, int $flag, string $alias = ''): $expr = $this->expr(); - return (string) $expr->eq( + return $expr->eq( $expr->bitwiseAnd($field, $flag), $this->createNamedParameter(0, IQueryBuilder::PARAM_INT) );