Skip to content

Commit

Permalink
Changing a few strings to Class::class format
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Vison committed Feb 9, 2018
1 parent be6ee9e commit f19cba1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Service/SyncService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Doctrine\ORM\EntityManagerInterface;
use NTI\SyncBundle\Entity\SyncDeleteState;
use NTI\SyncBundle\Entity\SyncMapping;
use NTI\SyncBundle\Entity\SyncNewItemState;
use NTI\SyncBundle\Entity\SyncState;
use NTI\SyncBundle\Interfaces\SyncRepositoryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
Expand Down Expand Up @@ -53,14 +54,14 @@ public function getFromMappings($mappings) {
$mappingName = $mapping["mapping"];
$serializationGroup = (isset($mapping["serializer"])) ? $mapping["serializer"] : "sync_basic";

$syncMapping = $this->em->getRepository('NTISyncBundle:SyncMapping')->findOneBy(array("name" => $mappingName));
$syncMapping = $this->em->getRepository(SyncMapping::class)->findOneBy(array("name" => $mappingName));

if(!$syncMapping) {
continue;
}

$deletes = $this->em->getRepository('NTISyncBundle:SyncDeleteState')->findFromTimestamp($mappingName, $timestamp);
$newItems = $this->em->getRepository('NTISyncBundle:SyncNewItemState')->findFromTimestampAndMapping($mappingName, $timestamp);
$deletes = $this->em->getRepository(SyncDeleteState::class)->findFromTimestamp($mappingName, $timestamp);
$newItems = $this->em->getRepository(SyncNewItemState::class)->findFromTimestampAndMapping($mappingName, $timestamp);

/** @var SyncRepositoryInterface $repository */
$repository = $this->em->getRepository($syncMapping->getClass());
Expand Down Expand Up @@ -116,7 +117,7 @@ public function addToDeleteSyncState($class, $id) {

$this->em = $this->container->get('doctrine')->getManager();

$mapping = $this->em->getRepository('NTISyncBundle:SyncMapping')->findOneBy(array("class" => $class));
$mapping = $this->em->getRepository(SyncMapping::class)->findOneBy(array("class" => $class));
if(!$mapping) {
return;
}
Expand Down

0 comments on commit f19cba1

Please sign in to comment.