Completed
Push — master ( 7f186d...ef28ef )
by Philip
03:23
created
src/Dontdrinkandroot/Repository/OrmEntityRepository.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function persist($entity, $flush = true)
27 27
     {
28 28
         return $this->transactionManager->transactional(
29
-            function () use ($entity, $flush) {
29
+            function() use ($entity, $flush) {
30 30
                 $this->getEntityManager()->persist($entity);
31 31
 
32 32
                 if ($flush) {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function merge($entity, $flush = false)
45 45
     {
46 46
         return $this->transactionManager->transactional(
47
-            function () use ($entity, $flush) {
47
+            function() use ($entity, $flush) {
48 48
                 $entity = $this->getEntityManager()->merge($entity);
49 49
 
50 50
                 if ($flush) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function remove($entity, $flush = false)
79 79
     {
80 80
         return $this->transactionManager->transactional(
81
-            function () use ($entity, $flush) {
81
+            function() use ($entity, $flush) {
82 82
                 $this->getEntityManager()->remove($entity);
83 83
 
84 84
                 if ($flush) {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     public function removeById($id, $flush = false)
95 95
     {
96 96
         return $this->transactionManager->transactional(
97
-            function () use ($id, $flush) {
97
+            function() use ($id, $flush) {
98 98
                 /** @var EntityInterface $entity */
99 99
                 $entity = $this->find($id);
100 100
                 $this->remove($entity, $flush);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function removeAll($flush = false, $iterate = true)
109 109
     {
110 110
         return $this->transactionManager->transactional(
111
-            function () use ($flush, $iterate) {
111
+            function() use ($flush, $iterate) {
112 112
                 if ($iterate) {
113 113
                     $this->removeAllByIterating();
114 114
                 } else {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     protected function removeAllByIterating($batchSize = 100)
134 134
     {
135 135
         return $this->transactionManager->transactional(
136
-            function () use ($batchSize) {
136
+            function() use ($batchSize) {
137 137
                 $entities = $this->findAll();
138 138
                 $count = 0;
139 139
                 foreach ($entities as $entity) {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     protected function removeAllByQuery()
152 152
     {
153 153
         return $this->transactionManager->transactional(
154
-            function () {
154
+            function() {
155 155
                 $queryBuilder = $this->createQueryBuilder('entity');
156 156
                 $queryBuilder->delete();
157 157
                 $query = $queryBuilder->getQuery();
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     public function findPaginatedBy($page = 1, $perPage = 10, array $criteria = [], array $orderBy = null)
167 167
     {
168 168
         return $this->transactionManager->transactional(
169
-            function () use ($page, $perPage, $criteria, $orderBy) {
169
+            function() use ($page, $perPage, $criteria, $orderBy) {
170 170
                 $persister = $this->getEntityManager()->getUnitOfWork()->getEntityPersister($this->_entityName);
171 171
                 $total = $this->count($criteria);
172 172
                 $results = $persister->loadAll($criteria, $orderBy, $perPage, ($page - 1) * $perPage);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     public function countAll()
215 215
     {
216 216
         return $this->transactionManager->transactional(
217
-            function () {
217
+            function() {
218 218
                 $queryBuilder = $this->getEntityManager()->createQueryBuilder();
219 219
                 $queryBuilder
220 220
                     ->select('count(entity)')
Please login to merge, or discard this patch.