aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Event/Subscriber
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/Subscriber')
-rw-r--r--src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php8
-rw-r--r--src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php2
-rw-r--r--src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php
index 4ebe837b..1dd0a1a4 100644
--- a/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php
+++ b/src/Wallabag/CoreBundle/Event/Subscriber/DownloadImagesSubscriber.php
@@ -2,13 +2,13 @@
2 2
3namespace Wallabag\CoreBundle\Event\Subscriber; 3namespace Wallabag\CoreBundle\Event\Subscriber;
4 4
5use Symfony\Component\EventDispatcher\EventSubscriberInterface; 5use Doctrine\ORM\EntityManager;
6use Psr\Log\LoggerInterface; 6use Psr\Log\LoggerInterface;
7use Wallabag\CoreBundle\Helper\DownloadImages; 7use Symfony\Component\EventDispatcher\EventSubscriberInterface;
8use Wallabag\CoreBundle\Entity\Entry; 8use Wallabag\CoreBundle\Entity\Entry;
9use Wallabag\CoreBundle\Event\EntrySavedEvent;
10use Wallabag\CoreBundle\Event\EntryDeletedEvent; 9use Wallabag\CoreBundle\Event\EntryDeletedEvent;
11use Doctrine\ORM\EntityManager; 10use Wallabag\CoreBundle\Event\EntrySavedEvent;
11use Wallabag\CoreBundle\Helper\DownloadImages;
12 12
13class DownloadImagesSubscriber implements EventSubscriberInterface 13class DownloadImagesSubscriber implements EventSubscriberInterface
14{ 14{
diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php
index 5e6af8cc..9c1d8a1d 100644
--- a/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php
+++ b/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php
@@ -2,10 +2,10 @@
2 2
3namespace Wallabag\CoreBundle\Event\Subscriber; 3namespace Wallabag\CoreBundle\Event\Subscriber;
4 4
5use Doctrine\Bundle\DoctrineBundle\Registry;
5use Doctrine\Common\EventSubscriber; 6use Doctrine\Common\EventSubscriber;
6use Doctrine\ORM\Event\LifecycleEventArgs; 7use Doctrine\ORM\Event\LifecycleEventArgs;
7use Wallabag\CoreBundle\Entity\Entry; 8use Wallabag\CoreBundle\Entity\Entry;
8use Doctrine\Bundle\DoctrineBundle\Registry;
9 9
10/** 10/**
11 * SQLite doesn't care about cascading remove, so we need to manually remove associated stuf for an Entry. 11 * SQLite doesn't care about cascading remove, so we need to manually remove associated stuf for an Entry.
diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php
index 711c3bf8..35902654 100644
--- a/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php
+++ b/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php
@@ -39,12 +39,12 @@ class TablePrefixSubscriber implements EventSubscriber
39 return; 39 return;
40 } 40 }
41 41
42 $classMetadata->setPrimaryTable(['name' => $this->prefix.$classMetadata->getTableName()]); 42 $classMetadata->setPrimaryTable(['name' => $this->prefix . $classMetadata->getTableName()]);
43 43
44 foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) { 44 foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) {
45 if ($mapping['type'] === ClassMetadataInfo::MANY_TO_MANY && isset($classMetadata->associationMappings[$fieldName]['joinTable']['name'])) { 45 if ($mapping['type'] === ClassMetadataInfo::MANY_TO_MANY && isset($classMetadata->associationMappings[$fieldName]['joinTable']['name'])) {
46 $mappedTableName = $classMetadata->associationMappings[$fieldName]['joinTable']['name']; 46 $mappedTableName = $classMetadata->associationMappings[$fieldName]['joinTable']['name'];
47 $classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->prefix.$mappedTableName; 47 $classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->prefix . $mappedTableName;
48 } 48 }
49 } 49 }
50 } 50 }