Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},

"require-dev": {
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.2",
"phpunit/phpunit": "^10.3",
"phpmd/phpmd": "^2.13",
"squizlabs/php_codesniffer": "^4.0"
Expand Down
23 changes: 17 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/InsertBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @method self into(string...$tables)
* @method self columns(string...$columns)
* @method self values(mixed...$values)
* @method self set(array|string...$assignments)
* @method self set(array<string, mixed>|string ...$assignments)
*/
class InsertBuilder extends AbstractQueryBuilder {
const QUERY_PARTS = [
Expand Down
2 changes: 1 addition & 1 deletion src/Query/SelectQuery.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace GT\SqlBuilder\Query;

/** @SuppressWarnings(PHPMD.TooManyPublicMethods) */
/** @SuppressWarnings("PHPMD.TooManyPublicMethods") */
abstract class SelectQuery extends SqlQuery {
public function __construct(
protected bool $subQuery = false
Expand Down
7 changes: 3 additions & 4 deletions src/Query/SqlQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use GT\SqlBuilder\SqlBuilderException;
use Stringable;

/** @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */
/** @SuppressWarnings("PHPMD.ExcessiveClassComplexity") */
abstract class SqlQuery implements Stringable {
const PRE_QUERY_COMMENT = "/* preQuery */";
const POST_QUERY_COMMENT = "/* postQuery */";
Expand All @@ -33,7 +33,7 @@ public function postQuery():string {

/**
* @param array<string, string>|array<string, string[]|mixed> $clauses
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
* @phpcs:disable Generic.Metrics.CyclomaticComplexity
*/
protected function processClauseList(array $clauses):string {
Expand Down Expand Up @@ -140,7 +140,7 @@ protected function processClause(
return $query;
}

/** @param string[] $parts */
/** @param array<string|Condition> $parts */
protected function processWhereClause(
string $name,
array $parts
Expand All @@ -159,7 +159,6 @@ protected function processWhereClause(
$part = new AndCondition($part);
}

/** @var Condition $part */
if($partShortParameterSyntax = $part->getShortParameterSyntax()) {
if($shortParameterSyntax) {
if($shortParameterSyntax !== $partShortParameterSyntax) {
Expand Down
Loading