change variable name

This commit is contained in:
aynsix
2019-12-11 18:18:30 +04:00
parent 9ac196784a
commit 8eb6ae5dfa
7 changed files with 15 additions and 14 deletions

View File

@@ -37,7 +37,7 @@ abstract class AbstractChecker implements CheckerInterface
/**
* @var \collection[]
*/
protected $ignoreCollections = [];
protected $compareIgnoreCollections = [];
public function __construct(Application $app)
{
@@ -100,9 +100,9 @@ abstract class AbstractChecker implements CheckerInterface
return $this->collections;
}
public function setIgnoreCollections($collections)
public function setCompareIgnoreCollections($collections)
{
$this->ignoreCollections = $collections;
$this->compareIgnoreCollections = $collections;
}
/**

View File

@@ -46,8 +46,8 @@ class Filename extends AbstractChecker
public function check(EntityManager $em, File $file)
{
$excludedCollIds = [];
if (!empty($this->ignoreCollections)) {
foreach ($this->ignoreCollections as $collection) {
if (!empty($this->compareIgnoreCollections)) {
foreach ($this->compareIgnoreCollections as $collection) {
// use only collection in the same databox and retrieve the coll_id
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
$excludedCollIds[] = $collection->get_coll_id();

View File

@@ -35,8 +35,8 @@ class Sha256 extends AbstractChecker
public function check(EntityManager $em, File $file)
{
$excludedCollIds = [];
if (!empty($this->ignoreCollections)) {
foreach ($this->ignoreCollections as $collection) {
if (!empty($this->compareIgnoreCollections)) {
foreach ($this->compareIgnoreCollections as $collection) {
// use only collection in the same databox and retrieve the coll_id
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
$excludedCollIds[] = $collection->get_coll_id();

View File

@@ -34,8 +34,8 @@ class UUID extends AbstractChecker
public function check(EntityManager $em, File $file)
{
$excludedCollIds = [];
if (!empty($this->ignoreCollections)) {
foreach ($this->ignoreCollections as $collection) {
if (!empty($this->compareIgnoreCollections)) {
foreach ($this->compareIgnoreCollections as $collection) {
// use only collection in the same databox and retrieve the coll_id
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
$excludedCollIds[] = $collection->get_coll_id();

View File

@@ -89,7 +89,7 @@ class BorderManagerServiceProvider implements ServiceProviderInterface
}
}
$checkerObj->setIgnoreCollections($collections);
$checkerObj->setCompareIgnoreCollections($collections);
}
$registeredCheckers[] = $checkerObj;

View File

@@ -138,7 +138,8 @@ class LegacyRecordRepository implements RecordRepository
if (!$sql) {
$qb = $this->createSelectBuilder()
->where('uuid = :uuid');
->where('uuid = :uuid')
;
if (!empty($excludedCollIds)) {
$qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id'));
@@ -149,8 +150,8 @@ class LegacyRecordRepository implements RecordRepository
$result = $this->databox->get_connection()->fetchAll($sql,
[
'uuid' => $uuid,
'coll_id' => $excludedCollIds
'uuid' => $uuid,
'coll_id' => $excludedCollIds
],
[
':coll_id' => Connection::PARAM_INT_ARRAY

View File

@@ -1692,7 +1692,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
$qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id'));
$params['coll_id'] = $excludedCollIds;
$types[':coll_id'] = Connection::PARAM_INT_ARRAY;
$types[':coll_id'] = Connection::PARAM_INT_ARRAY;
}
$sql = $qb->setFirstResult($offset_start)