-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
7 changed files
with
12 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,7 @@ | |
$header = <<<EOF | ||
League CSV Doctrine Collection Bridge (https://github.com/bakame-php/csv-doctrine-bridge) | ||
@author Ignace Nyamagana Butera <[email protected]> | ||
@license https://github.com/bakame-php/csv-doctrine-bridge/blob/master/LICENSE (MIT License) | ||
@version 1.0.0 | ||
@link https://github.com/bakame-php/csv-doctrine-bridge | ||
(c) Ignace Nyamagana Butera <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
|
@@ -33,8 +30,9 @@ return PhpCsFixer\Config::create() | |
'no_leading_import_slash' => true, | ||
'no_superfluous_phpdoc_tags' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_superfluous_phpdoc_tags' => true, | ||
'no_unused_imports' => true, | ||
'ordered_imports' => ['importsOrder' => null, 'sortAlgorithm' => 'alpha'], | ||
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'], | ||
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false], | ||
'phpdoc_align' => true, | ||
'phpdoc_no_empty_return' => true, | ||
|
@@ -52,6 +50,7 @@ return PhpCsFixer\Config::create() | |
'trailing_comma_in_multiline_array' => true, | ||
'trim_array_spaces' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
'yoda_style' => true, | ||
]) | ||
->setFinder($finder) | ||
; |
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 |
---|---|---|
|
@@ -3,21 +3,18 @@ | |
/** | ||
* League CSV Doctrine Collection Bridge (https://github.com/bakame-php/csv-doctrine-bridge) | ||
* | ||
* @author Ignace Nyamagana Butera <[email protected]> | ||
* @license https://github.com/bakame-php/csv-doctrine-bridge/blob/master/LICENSE (MIT License) | ||
* @version 1.0.0 | ||
* @link https://github.com/bakame-php/csv-doctrine-bridge | ||
* (c) Ignace Nyamagana Butera <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Bakame\Csv\Extension; | ||
|
||
use function array_reverse; | ||
use Doctrine\Common\Collections\Criteria; | ||
use Doctrine\Common\Collections\Expr\ClosureExpressionVisitor; | ||
use League\Csv\Statement; | ||
use function array_reverse; | ||
|
||
final class CriteriaConverter | ||
{ | ||
|
@@ -64,7 +61,7 @@ public static function addOrderBy(Criteria $criteria, Statement $stmt = null): S | |
foreach (array_reverse($criteria->getOrderings()) as $field => $ordering) { | ||
$next = ClosureExpressionVisitor::sortByField( | ||
$field, | ||
$ordering === Criteria::DESC ? -1 : 1, | ||
Criteria::DESC === $ordering ? -1 : 1, | ||
$next | ||
); | ||
} | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,7 @@ | |
/** | ||
* League CSV Doctrine Collection Bridge (https://github.com/bakame-php/csv-doctrine-bridge) | ||
* | ||
* @author Ignace Nyamagana Butera <[email protected]> | ||
* @license https://github.com/bakame-php/csv-doctrine-bridge/blob/master/LICENSE (MIT License) | ||
* @version 1.0.0 | ||
* @link https://github.com/bakame-php/csv-doctrine-bridge | ||
* (c) Ignace Nyamagana Butera <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,7 @@ | |
/** | ||
* League CSV Doctrine Collection Bridge (https://github.com/bakame-php/csv-doctrine-bridge) | ||
* | ||
* @author Ignace Nyamagana Butera <[email protected]> | ||
* @license https://github.com/bakame-php/csv-doctrine-bridge/blob/master/LICENSE (MIT License) | ||
* @version 1.0.0 | ||
* @link https://github.com/bakame-php/csv-doctrine-bridge | ||
* (c) Ignace Nyamagana Butera <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,7 @@ | |
/** | ||
* League CSV Doctrine Collection Bridge (https://github.com/bakame-php/csv-doctrine-bridge) | ||
* | ||
* @author Ignace Nyamagana Butera <[email protected]> | ||
* @license https://github.com/bakame-php/csv-doctrine-bridge/blob/master/LICENSE (MIT License) | ||
* @version 1.0.0 | ||
* @link https://github.com/bakame-php/csv-doctrine-bridge | ||
* (c) Ignace Nyamagana Butera <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,7 @@ | |
/** | ||
* League CSV Doctrine Collection Bridge (https://github.com/bakame-php/csv-doctrine-bridge) | ||
* | ||
* @author Ignace Nyamagana Butera <[email protected]> | ||
* @license https://github.com/bakame-php/csv-doctrine-bridge/blob/master/LICENSE (MIT License) | ||
* @version 1.0.0 | ||
* @link https://github.com/bakame-php/csv-doctrine-bridge | ||
* (c) Ignace Nyamagana Butera <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
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 |
---|---|---|
|
@@ -3,10 +3,7 @@ | |
/** | ||
* League CSV Doctrine Collection Bridge (https://github.com/bakame-php/csv-doctrine-bridge) | ||
* | ||
* @author Ignace Nyamagana Butera <[email protected]> | ||
* @license https://github.com/bakame-php/csv-doctrine-bridge/blob/master/LICENSE (MIT License) | ||
* @version 1.0.0 | ||
* @link https://github.com/bakame-php/csv-doctrine-bridge | ||
* (c) Ignace Nyamagana Butera <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|