Skip to content

Commit

Permalink
refactor(builder): refactor from zephir.
Browse files Browse the repository at this point in the history
  • Loading branch information
noone-silent committed Jul 30, 2024
1 parent 64b90dc commit fd23ec3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Path to sources
#sonar.sources=.
sonar.exclusions=**/tests/**
sonar.exclusions=./tests/*
#sonar.inclusions=

# Path to tests
Expand Down
6 changes: 2 additions & 4 deletions src/Mvc/Model/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,8 @@ final public function getPhql(): string
}

// Only append where conditions if it's string
if (is_string($conditions)) {
if (trim($conditions) !== '') {
$phql .= " WHERE " . $conditions;
}
if (is_string($conditions) && trim($conditions) !== '') {
$phql .= " WHERE " . $conditions;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/_data/fixtures/Migrations/OrdersProductsMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ protected function getSqlMysql(): array
{
return [
"
drop table if exists private.`co_orders_x_products`;
drop table if exists `co_orders_x_products`;
",
"
CREATE TABLE private.`co_orders_x_products` (
CREATE TABLE `co_orders_x_products` (
`oxp_ord_id` int(10) unsigned NOT NULL,
`oxp_prd_id` int(10) unsigned NOT NULL,
`oxp_quantity` int(10) unsigned NOT NULL,
Expand Down

0 comments on commit fd23ec3

Please sign in to comment.