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[] * @var \collection[]
*/ */
protected $ignoreCollections = []; protected $compareIgnoreCollections = [];
public function __construct(Application $app) public function __construct(Application $app)
{ {
@@ -100,9 +100,9 @@ abstract class AbstractChecker implements CheckerInterface
return $this->collections; 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) public function check(EntityManager $em, File $file)
{ {
$excludedCollIds = []; $excludedCollIds = [];
if (!empty($this->ignoreCollections)) { if (!empty($this->compareIgnoreCollections)) {
foreach ($this->ignoreCollections as $collection) { foreach ($this->compareIgnoreCollections as $collection) {
// use only collection in the same databox and retrieve the coll_id // use only collection in the same databox and retrieve the coll_id
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) { if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
$excludedCollIds[] = $collection->get_coll_id(); $excludedCollIds[] = $collection->get_coll_id();

View File

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

View File

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

View File

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

View File

@@ -138,7 +138,8 @@ class LegacyRecordRepository implements RecordRepository
if (!$sql) { if (!$sql) {
$qb = $this->createSelectBuilder() $qb = $this->createSelectBuilder()
->where('uuid = :uuid'); ->where('uuid = :uuid')
;
if (!empty($excludedCollIds)) { if (!empty($excludedCollIds)) {
$qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id')); $qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id'));