Skip to content

Commit

Permalink
BUGFIX: Do not fail if source file was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Mar 8, 2020
1 parent d96c676 commit b388f72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Classes/Synchronization/SourceFileCollection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);

namespace DL\AssetSync\Synchronization;

Expand Down Expand Up @@ -38,9 +39,7 @@ public function add($element)
*/
public function getSourceFileByFileIdentifierHash(string $fileIdentifierHash): ?SourceFile
{
if (isset($this->fileIdentifierHashIndex[$fileIdentifierHash])) {
return $this->fileIdentifierHashIndex[$fileIdentifierHash];
}
return $this->fileIdentifierHashIndex[$fileIdentifierHash] ?? null;
}

/**
Expand All @@ -55,7 +54,7 @@ public function filterByIdentifierPattern(string $identifierPattern): SourceFile
return $this;
}

$filteredCollection = new SourceFileCollection();
$filteredCollection = new self();

foreach ($this as $sourceFile) {
/** @var SourceFile $sourceFile */
Expand Down
2 changes: 1 addition & 1 deletion Classes/Synchronization/Synchronizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class Synchronizer
{

const BATCH_SIZE = 1000;
protected const BATCH_SIZE = 1000;

/**
* @Flow\Inject
Expand Down

0 comments on commit b388f72

Please sign in to comment.