-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc656ec
commit 92139d8
Showing
7 changed files
with
69 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...Rector/v13/v0/MigrateExpressionBuilderTrimMethodSecondParameterRector/Fixture/fixture.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace Ssch\TYPO3Rector\Tests\Rector\v13\v0\MigrateExpressionBuilderTrimMethodSecondParameterRector\Fixture; | ||
|
||
use Doctrine\DBAL\Platforms\TrimMode; | ||
use TYPO3\CMS\Core\Database\Connection; | ||
use TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
|
||
$queryBuilder = GeneralUtility::makeInstance(Connection::class)->createQueryBuilder(); | ||
$queryBuilder->expr() | ||
->comparison( | ||
$queryBuilder->expr() | ||
->trim('string', 0), | ||
ExpressionBuilder::EQ, | ||
$queryBuilder->createNamedParameter('', Connection::PARAM_STR) | ||
); | ||
|
||
$queryBuilder->expr() | ||
->comparison( | ||
$queryBuilder->expr() | ||
->trim('string', 1), | ||
ExpressionBuilder::EQ, | ||
$queryBuilder->createNamedParameter('', Connection::PARAM_STR) | ||
); | ||
|
||
$queryBuilder->expr() | ||
->comparison( | ||
$queryBuilder->expr() | ||
->trim('string', 2), | ||
ExpressionBuilder::EQ, | ||
$queryBuilder->createNamedParameter('', Connection::PARAM_STR) | ||
); | ||
|
||
$queryBuilder->expr() | ||
->comparison( | ||
$queryBuilder->expr() | ||
->trim('string', 3), | ||
ExpressionBuilder::EQ, | ||
$queryBuilder->createNamedParameter('', Connection::PARAM_STR) | ||
); | ||
|
||
$queryBuilder->expr() | ||
->comparison( | ||
$queryBuilder->expr() | ||
->trim('string', 5), | ||
ExpressionBuilder::EQ, | ||
$queryBuilder->createNamedParameter('', Connection::PARAM_STR) | ||
); | ||
|
||
$queryBuilder->expr() | ||
->comparison( | ||
$queryBuilder->expr() | ||
->trim('string', TrimMode::LEADING), | ||
ExpressionBuilder::EQ, | ||
$queryBuilder->createNamedParameter('', Connection::PARAM_STR) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters