Completed
Pull Request — develop (#429)
by Carsten
07:02
created
module/Core/src/Core/Entity/SnapshotMeta.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /**
33 33
      * Sets the entity
34 34
      *
35
-     * @param $entity
35
+     * @param EntityInterface $entity
36 36
      * @throws \Core\Exception\ImmutablePropertyException
37 37
      */
38 38
     public function __construct($entity)
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/SnapshotTrait.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -67,6 +67,9 @@  discard block
 block discarded – undo
67 67
         return $return === $entity ? $this : $return;
68 68
     }
69 69
 
70
+    /**
71
+     * @param string $property
72
+     */
70 73
     protected function inaccessible($property)
71 74
     {
72 75
         throw new \DomainException(sprintf(
@@ -75,6 +78,9 @@  discard block
 block discarded – undo
75 78
         ));
76 79
     }
77 80
 
81
+    /**
82
+     * @param string $property
83
+     */
78 84
     protected function immutable($property)
79 85
     {
80 86
         throw new ImmutablePropertyException($property, $this);
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         if (!is_callable($callback)) {
59 59
             throw new \BadMethodCallException(sprintf(
60 60
                 'Proxy error: Method "%s" does not exist in proxied "%s"',
61
-                 $method, get_class($entity)
61
+                    $method, get_class($entity)
62 62
             ));
63 63
         }
64 64
 
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/SnapshotRepository.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -140,12 +140,12 @@
 block discarded – undo
140 140
     public function findLatest($sourceId, $isDraft = false)
141 141
     {
142 142
         return $this->createQueryBuilder()
143
-          ->field('snapshotMeta.entity.$id')->equals(new \MongoId($sourceId))
144
-          ->field('snapshotMeta.isDraft')->equals($isDraft)
145
-          ->sort('snapshotMeta.dateCreated.date', 'desc')
146
-          ->limit(1)
147
-          ->getQuery()
148
-          ->getSingleResult();
143
+            ->field('snapshotMeta.entity.$id')->equals(new \MongoId($sourceId))
144
+            ->field('snapshotMeta.isDraft')->equals($isDraft)
145
+            ->sort('snapshotMeta.dateCreated.date', 'desc')
146
+            ->limit(1)
147
+            ->getQuery()
148
+            ->getSingleResult();
149 149
 
150 150
     }
151 151
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
 
190 190
     protected function checkEntityType($entity)
191 191
     {
192
-        if ( !is_a($entity,  $this->getDocumentName()) ) {
192
+        if (!is_a($entity, $this->getDocumentName())) {
193 193
             throw new \InvalidArgumentException(sprintf(
194 194
                 'Entity must be of type %s but recieved %s instead',
195 195
                 $this->getDocumentName(),
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/MetaDataProviderTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     public function setMetaData($key, $value = null)
32 32
     {
33 33
         if (is_array($key)) {
34
-            $this->metaData  = $key;
34
+            $this->metaData = $key;
35 35
 
36 36
         } else {
37 37
             $this->metaData[$key] = $value;
Please login to merge, or discard this patch.
module/Core/src/Core/Service/SnapshotGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
         }
90 90
 
91 91
         if (!$target) {
92
-            $target = get_class($source) . 'Snapshot';
92
+            $target = get_class($source).'Snapshot';
93 93
             $target = new $target($source);
94 94
         }
95 95
 
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/ClonePropertiesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
                     $collection->add(clone $item);
48 48
                 }
49 49
                 $value = $collection;
50
-            } elseif(null === $value) {
50
+            } elseif (null === $value) {
51 51
 
52 52
             } else {
53 53
                 $value = clone $value;
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/JobboardSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function init()
46 46
     {
47
-        $this->setAttribute('id','jobs-list-filter');
47
+        $this->setAttribute('id', 'jobs-list-filter');
48 48
         $this->setOption('text_span', 5);
49 49
         parent::init();
50 50
         $this->setButtonElement('q');
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 ),
84 84
                 'attributes' => [
85 85
                     'value'            => '10', // default distance
86
-                    'data-searchbox'   => -1,  // hide the search box
86
+                    'data-searchbox'   => -1, // hide the search box
87 87
                     'data-allowclear'  => 'false', // allow to clear a selected value
88 88
                     'data-placeholder' => /*@translate*/ 'Distance',
89 89
                     'data-width'       => '100%',
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/SearchForm.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,10 +46,8 @@
 block discarded – undo
46 46
      *
47 47
      * Proxies to {@link get()}
48 48
      *
49
-     * @param string|array     $elementsFieldset
50
-     * @param null|string $buttonsFieldset
51 49
      *
52
-     * @return \Core\Form\TextSearchForm
50
+     * @return \Core\Form\SearchForm
53 51
      */
54 52
     public function __invoke($form, $options = null, $params = null)
55 53
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@
 block discarded – undo
72 72
     public function get($form, $options = null, $params = null)
73 73
     {
74 74
         if (!is_object($form)) {
75
-            $form             = $this->formElementManager->get($form, $options);
75
+            $form = $this->formElementManager->get($form, $options);
76 76
         }
77 77
 
78 78
         /** @noinspection PhpUndefinedMethodInspection */
79
-        $params           = $params ?: clone $this->getController()->getRequest()->getQuery();
79
+        $params = $params ?: clone $this->getController()->getRequest()->getQuery();
80 80
 
81 81
         /* I tried using form methods (bind, isValid)...
82 82
          * but because the search form could be in an invalidated state
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Repository/Filter/PaginationQuery.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@
 block discarded – undo
85 85
         if (isset($params['l'])) {
86 86
 
87 87
             $coords = $params['l']->getCoordinates()->getCoordinates();
88
-            $queryBuilder->field('locations.coordinates')->geoWithinCenter((float) $coords[0], (float) $coords[1], (float) $this->value['d']/100);
88
+            $queryBuilder->field('locations.coordinates')->geoWithinCenter((float) $coords[0], (float) $coords[1], (float) $this->value['d'] / 100);
89 89
         }
90 90
 
91
-        if (isset($params['channel']) && !empty($params['channel']) && $params['channel']!="default" ){
91
+        if (isset($params['channel']) && !empty($params['channel']) && $params['channel'] != "default") {
92 92
             $queryBuilder->field('portals')->equals($params['channel']);
93 93
         }
94 94
 
Please login to merge, or discard this patch.