Completed
Pull Request — develop (#284)
by
unknown
08:46
created
module/Solr/src/Solr/Bridge/Manager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class Manager
26 26
 {
27
-    const SOLR_DATE_FORMAT  = 'Y-m-d\TH:i:s\Z';
27
+    const SOLR_DATE_FORMAT = 'Y-m-d\TH:i:s\Z';
28 28
 
29 29
     /**
30 30
      * @var ModuleOptions
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param string $path
47 47
      * @return \SolrClient
48 48
      */
49
-    public function getClient($path='/solr')
49
+    public function getClient($path = '/solr')
50 50
     {
51 51
         $options = $this->options;
52 52
         $options = [
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
      * @param string $path
70 70
      * @throws ServerException When failed adding document to server
71 71
      */
72
-    public function addDocument(\SolrInputDocument $document,$path='/solr')
72
+    public function addDocument(\SolrInputDocument $document, $path = '/solr')
73 73
     {
74 74
         $client = $this->getClient($path);
75
-        try{
75
+        try {
76 76
             $client->addDocument($document);
77 77
             $client->commit();
78 78
             $client->optimize();
79
-        }catch (\Exception $e){
80
-            throw new ServerException('Can not add document to server!',$e->getCode(),$e);
79
+        } catch (\Exception $e) {
80
+            throw new ServerException('Can not add document to server!', $e->getCode(), $e);
81 81
         }
82 82
     }
83 83
 
Please login to merge, or discard this patch.
module/Solr/src/Solr/Entity/JobProxy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
         )
151 151
 	    {
152 152
 	        // get concatenated list of cities from the locations
153
-	        $locations = trim(implode(', ', array_unique(array_map(function (ArrayAccess $doc)
153
+	        $locations = trim(implode(', ', array_unique(array_map(function(ArrayAccess $doc)
154 154
 	        {
155 155
 	            return isset($doc->city) ? trim($doc->city) : '';
156 156
 	        }, $this->solrResult['locations']['docs']))));
Please login to merge, or discard this patch.
module/Solr/src/Solr/Filter/JobBoardPaginationQuery.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@
 block discarded – undo
48 48
         $query->addFilterQuery('isActive:1');
49 49
         $query->addField('*');
50 50
         
51
-        if(isset($params['location'])){
51
+        if (isset($params['location'])) {
52 52
             /* @var Location $location */
53 53
             $location = $params['location'];
54
-            if(is_object($location->getCoordinates())){
54
+            if (is_object($location->getCoordinates())) {
55 55
                 $coordinate = Util::convertLocationCoordinates($location);
56 56
 
57 57
                 $query->addFilterQuery(
Please login to merge, or discard this patch.
module/Solr/src/Solr/Paginator/Adapter/SolrAdapter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         return $this->resultConverter->convert(
92 92
             $this->filter,
93
-            $this->getResponse($offset,$itemCountPerPage)->getResponse()
93
+            $this->getResponse($offset, $itemCountPerPage)->getResponse()
94 94
         );
95 95
     }
96 96
 
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
      * @return  \SolrQueryResponse
122 122
      * @throws  ServerException
123 123
      */
124
-    protected function getResponse($offset=0,$itemCountPerPage=0)
124
+    protected function getResponse($offset = 0, $itemCountPerPage = 0)
125 125
     {
126 126
         $id = md5($offset.$itemCountPerPage);
127
-        if(!isset($this->responses[$id])){
127
+        if (!isset($this->responses[$id])) {
128 128
             $query = new \SolrDisMaxQuery();
129 129
             $query->useEDisMaxQueryParser();
130
-            $query = $this->filter->filter($this->params,$query);
130
+            $query = $this->filter->filter($this->params, $query);
131 131
             $this->facets->setupQuery($query);
132 132
             $query->setStart($offset);
133 133
             $query->setRows($itemCountPerPage);
134
-            try{
134
+            try {
135 135
                 $this->responses[$id] = $this->client->query($query);
136
-            }catch (\Exception $e){
136
+            } catch (\Exception $e) {
137 137
                 $message = 'Failed to process query';
138
-                throw new ServerException($message,$e->getCode(),$e);
138
+                throw new ServerException($message, $e->getCode(), $e);
139 139
             }
140 140
         }
141 141
 
Please login to merge, or discard this patch.
module/Solr/src/Solr/Paginator/PaginatorFactoryAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
  * @since 0.26
27 27
  * @package Solr\Paginator
28 28
  */
29
-abstract class PaginatorFactoryAbstract implements FactoryInterface,MutableCreationOptionsInterface
29
+abstract class PaginatorFactoryAbstract implements FactoryInterface, MutableCreationOptionsInterface
30 30
 {
31 31
     /**
32 32
      * @var array
Please login to merge, or discard this patch.
module/Solr/src/Solr/Facets.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 }
95 95
                 
96 96
                 // cast to array to workaround the 'Notice: Illegal member variable name' for PHP <= 5.6.20
97
-                $result = (array)$this->facetResult[$definition['type']][$name];
97
+                $result = (array) $this->facetResult[$definition['type']][$name];
98 98
                 // remove empty value
99 99
                 unset($result['']);
100 100
                 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             $query->$method($name);
141 141
             
142 142
             if (isset($this->params[$name]) && is_array($this->params[$name])) {
143
-                $valueList = array_filter(array_map(function ($value) {
143
+                $valueList = array_filter(array_map(function($value) {
144 144
                     return trim(SolrUtils::escapeQueryChars($value));
145 145
                 }, array_keys($this->params[$name])));
146 146
                 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      */
216 216
     protected function assertValidName($name)
217 217
     {
218
-        if (! isset($this->definitions[$name])) {
218
+        if (!isset($this->definitions[$name])) {
219 219
             throw new InvalidArgumentException();
220 220
         }
221 221
     }
Please login to merge, or discard this patch.