Completed
Push — develop ( 62f68e...872778 )
by Carsten
13s
created
DoctrineMongoODM/Event/AbstractUpdateFilesPermissionsSubscriber.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function getSubscribedEvents()
52 52
     {
53
-        return [ Events::onFlush ];
53
+        return [Events::onFlush];
54 54
     }
55 55
 
56 56
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $dm = $args->getDocumentManager();
64 64
         $uow = $dm->getUnitOfWork();
65 65
 
66
-        $filter = function ($element) {
66
+        $filter = function($element) {
67 67
             return $element instanceof $this->targetDocument
68 68
                    && $element instanceof PermissionsAwareInterface
69 69
                    && $element->getPermissions()->hasChanged();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             }
128 128
         }
129 129
 
130
-        return array_filter($files, function ($i) {
130
+        return array_filter($files, function($i) {
131 131
             return $i instanceof PermissionsAwareInterface;
132 132
         });
133 133
     }
Please login to merge, or discard this patch.
module/Core/src/Repository/DoctrineMongoODM/Event/EventArgs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function get($key)
23 23
     {
24 24
         if (!isset($this->values[$key])) {
25
-            throw new \OutOfBoundsException('Invalid key "' . $key . '"');
25
+            throw new \OutOfBoundsException('Invalid key "'.$key.'"');
26 26
         }
27 27
         return $this->values[$key];
28 28
     }
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
     
46 46
     public function __call($method, $params)
47 47
     {
48
-        $type   = substr($method, 0, 3);
48
+        $type = substr($method, 0, 3);
49 49
         
50 50
         if ('get' == $type || 'set' == $type) {
51
-            $filter = function ($match) {
52
-                return '_' . strtolower($match[0]);
51
+            $filter = function($match) {
52
+                return '_'.strtolower($match[0]);
53 53
             };
54 54
             $key = lcfirst(substr($method, 3));
55 55
             $key = preg_replace_callback('~([A-Z])~', $filter, $key);
@@ -57,6 +57,6 @@  discard block
 block discarded – undo
57 57
             return 'get' == $type ? $this->get($key) : $this->set($key, (isset($params[0]) ? $params[0] : null));
58 58
         }
59 59
         
60
-        throw new \BadMethodCallException('Unknown method: ' . $method);
60
+        throw new \BadMethodCallException('Unknown method: '.$method);
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
Repository/DoctrineMongoODM/Event/AbstractUpdatePermissionsSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         $repository     = $dm->getRepository($repositoryName);
99 99
         
100 100
         $criteria = array(
101
-            'permissions.assigned.' . $resourceId => array(
101
+            'permissions.assigned.'.$resourceId => array(
102 102
                 '$exists' => true
103 103
             )
104 104
         );
Please login to merge, or discard this patch.
Core/src/Repository/DoctrineMongoODM/Event/PreUpdateDocumentsSubscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
         $document->preUpdate($prePersist);
43 43
         
44 44
         if (!$prePersist) {
45
-            $dm         = $eventArgs->getDocumentManager();
46
-            $uow       = $dm->getUnitOfWork();
45
+            $dm = $eventArgs->getDocumentManager();
46
+            $uow = $dm->getUnitOfWork();
47 47
             $uow->recomputeSingleDocumentChangeSet($dm->getClassMetadata(get_class($document)), $document);
48 48
         }
49 49
     }
Please login to merge, or discard this patch.
module/Core/src/Repository/SnapshotRepository.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             'entity' => $snapshot
125 125
         ]);
126 126
         $this->dm->getEventManager()
127
-                 ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs);
127
+                    ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs);
128 128
 
129 129
         $this->copy($source, $snapshot);
130 130
 
@@ -200,12 +200,12 @@  discard block
 block discarded – undo
200 200
     public function findLatest($sourceId, $isDraft = false)
201 201
     {
202 202
         $entity = $this->createQueryBuilder()
203
-          ->field('snapshotEntity')->equals(new \MongoId($sourceId))
204
-          ->field('snapshotMeta.isDraft')->equals($isDraft)
205
-          ->sort('snapshotMeta.dateCreated.date', 'desc')
206
-          ->limit(1)
207
-          ->getQuery()
208
-          ->getSingleResult()
203
+            ->field('snapshotEntity')->equals(new \MongoId($sourceId))
204
+            ->field('snapshotMeta.isDraft')->equals($isDraft)
205
+            ->sort('snapshotMeta.dateCreated.date', 'desc')
206
+            ->limit(1)
207
+            ->getQuery()
208
+            ->getSingleResult()
209 209
         ;
210 210
         if ($entity) {
211 211
             $this->dm->getEventManager()->dispatchEvent(
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     protected $snapshotAttributes = [];
50 50
 
51 51
     /**
52
-     * @param \Zend\Hydrator\HydratorInterface $hydrator
52
+     * @param EntityHydrator $hydrator
53 53
      *
54 54
      * @return self
55 55
      */
Please login to merge, or discard this patch.
module/Core/src/Repository/Filter/PropertyToKeywords.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             $entity = $value;
24 24
             $value = array();
25 25
             foreach ($entity->getSearchableProperties() as $name) {
26
-                $result = $entity->{'get' .$name}();
26
+                $result = $entity->{'get'.$name}();
27 27
                 if (is_array($result)) {
28 28
                     $value = array_merge($value, $result);
29 29
                 } else {
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
         $innerPattern = StringUtils::hasPcreUnicodeSupport()
49 49
                       ? '[^\p{L}]'
50 50
                       : '[^a-z0-9ßäöü ]';
51
-        $pattern      = '~' . $innerPattern . '~isu';
52
-        $stripPattern = '~^' . $innerPattern . '+|' . $innerPattern . '+$~isu';
51
+        $pattern      = '~'.$innerPattern.'~isu';
52
+        $stripPattern = '~^'.$innerPattern.'+|'.$innerPattern.'+$~isu';
53 53
         $parts     = array();
54 54
         $textParts = explode(' ', $string);
55 55
         foreach ($textParts as $part) {
Please login to merge, or discard this patch.
module/Core/src/Repository/Filter/AbstractPaginationQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         
44 44
         if ($this->repositoryName) {
45 45
             $nameParts = explode('/', $this->repositoryName);
46
-            $entityClass = $nameParts[0] . '\\Entity\\' . $nameParts[1];
46
+            $entityClass = $nameParts[0].'\\Entity\\'.$nameParts[1];
47 47
             $queryBuilder->find($entityClass);
48 48
         }
49 49
         return $this->createQuery($value, $queryBuilder);
Please login to merge, or discard this patch.
module/Core/src/Repository/RepositoryService.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $name = "\\$namespace\\Entity\\$entityName";
39 39
         }
40 40
         
41
-        $repository  = $this->dm->getRepository($name);
41
+        $repository = $this->dm->getRepository($name);
42 42
 
43 43
         if (!$repository instanceof AbstractRepository) {
44 44
             $eventArgs = new DoctrineMongoODM\Event\EventArgs(
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         && $events->dispatchEvent('postCommit', new EventArgs(array('document' => $entity, 'documentManager' => $this->dm)));
74 74
     }
75 75
 
76
-    public function remove(EntityInterface $entity, $flush=false)
76
+    public function remove(EntityInterface $entity, $flush = false)
77 77
     {
78 78
         $dm     = $this->dm;
79 79
         $events = $dm->getEventManager();
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
         return $repository;
53 53
     }
54 54
     
55
+    /**
56
+     * @return string
57
+     */
55 58
     public function createQueryBuilder()
56 59
     {
57 60
         return $this->dm->createQueryBuilder();
Please login to merge, or discard this patch.
module/Core/src/Form/Element/DateRange.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,9 +97,9 @@
 block discarded – undo
97 97
     {
98 98
         $name = $this->getName();
99 99
         
100
-        $this->startDateElement->setName($name . '[startDate]');
101
-        $this->endDateElement->setName($name . '[endDate]');
102
-        $this->currentCheckbox->setName($name . '[current]');
100
+        $this->startDateElement->setName($name.'[startDate]');
101
+        $this->endDateElement->setName($name.'[endDate]');
102
+        $this->currentCheckbox->setName($name.'[current]');
103 103
     }
104 104
     
105 105
     public function __clone()
Please login to merge, or discard this patch.