Skip to content

Commit 9080396

Browse files
committed
Fix scrut bugs
1 parent 39c1896 commit 9080396

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.scrutinizer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ filter:
6666
- src/Ubiquity/controllers/admin/
6767
- src/Ubiquity/annotations/
6868
- src/Ubiquity/utils/git/UGitRepository.php
69+
- src/Ubiquity/cache/Preloader.php
70+
- src/Ubiquity/cache/preloading/
6971
checks:
7072
php:
7173
code_rating: true

src/Ubiquity/orm/bulk/BulkUpdates.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*
1414
*/
1515
class BulkUpdates extends AbstractBulks {
16-
private $sql;
1716

1817
public function __construct($className) {
1918
parent::__construct ( $className );

src/Ubiquity/orm/traits/DAOBulkUpdatesTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
* This class is part of Ubiquity
88
*
99
* @author jcheron <myaddressmail@gmail.com>
10-
* @version 1.0.0
10+
* @version 1.0.1
1111
*
1212
*/
1313
trait DAOBulkUpdatesTrait {
1414
protected static $bulks = [ 'insert' => [ ],'update' => [ ],'delete' => [ ] ];
1515

16-
protected static function getBulk($instance, $class, $operation = 'update') {
16+
protected static function getBulk($class, $operation = 'update') {
1717
if (! isset ( self::$bulks [$operation] [$class] )) {
1818
$bulkClass = '\\Ubiquity\\orm\\bulk\\Bulk' . \ucfirst ( $operation ) . 's';
1919
self::$bulks [$operation] [$class] = new $bulkClass ( $class );
@@ -23,14 +23,14 @@ protected static function getBulk($instance, $class, $operation = 'update') {
2323

2424
protected static function toOperation($instance, string $operation): void {
2525
$class = \get_class ( $instance );
26-
self::getBulk ( $instance, $class, $operation )->addInstance ( $instance );
26+
self::getBulk ( $class, $operation )->addInstance ( $instance );
2727
}
2828

2929
protected static function toOperations(array $instances, string $operation): void {
3030
$instance = \current ( $instances );
3131
if (isset ( $instance )) {
3232
$class = \get_class ( $instance );
33-
self::getBulk ( $instance, $class, $operation )->addInstances ( $instances );
33+
self::getBulk ( $class, $operation )->addInstances ( $instances );
3434
}
3535
}
3636

src/Ubiquity/orm/traits/DAOCoreTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected static function _getAll(Database $db, $className, ConditionParser $con
117117

118118
$metaDatas = OrmUtils::getModelMetadata ( $className );
119119
$tableName = $metaDatas ['#tableName'];
120-
if ($hasIncluded = $included || (\is_array ( $included ) && \sizeof ( $included ) > 0)) {
120+
if ($hasIncluded = ($included || (\is_array ( $included ) && \sizeof ( $included ) > 0))) {
121121
self::_initRelationFields ( $included, $metaDatas, $invertedJoinColumns, $oneToManyFields, $manyToManyFields );
122122
}
123123
$transformers = $metaDatas ['#transformers'] [self::$transformerOp] ?? [ ];

0 commit comments

Comments
 (0)