Completed
Push — master ( ad9544...2f2f35 )
by Florian
03:00
created
Controller/SearchController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	private $searchService;
56 56
 
57 57
 	public function searchAction(Request $request) {
58
-		if($request->query->get('term', false) !== false) {
58
+		if ($request->query->get('term', false) !== false) {
59 59
 			$this->setSearchTerm($request->getSession(), $request->query->get('term'));
60 60
 			return $this->redirectToRoute('stinger_soft_entity_search_search');
61 61
 		}
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 			'used_facets' => $query->getUsedFacets() 
70 70
 		));
71 71
 		
72
-		if($request->isMethod('POST')) {
72
+		if ($request->isMethod('POST')) {
73 73
 			$facetForm->handleRequest($request);
74 74
 			
75
-			if($facetForm->get('clear')->isClicked()) {
75
+			if ($facetForm->get('clear')->isClicked()) {
76 76
 				$query->setFacets($this->getDefaultFacets());
77 77
 			}
78 78
 			$this->setSearchTerm($request->getSession(), $query->getSearchTerm());
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		
89 89
 		$page = $request->query->get('page', 1);
90 90
 		$results = array();
91
-		if($result instanceof PaginatableResultSet) {
91
+		if ($result instanceof PaginatableResultSet) {
92 92
 			$results = $result->paginate($page, self::RESULTS_PER_PAGE);
93 93
 		} else {
94 94
 			$results = $result->getResults(($page - 1) * self::RESULTS_PER_PAGE, self::RESULTS_PER_PAGE);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 * @return string[string][]
138 138
 	 */
139 139
 	protected function getSearchFacets(SessionInterface $session) {
140
-		$facets = $session()->get(self::SESSION_PREFIX . '_facets', false);
140
+		$facets = $session()->get(self::SESSION_PREFIX.'_facets', false);
141 141
 		return $facets ? json_decode($facets, true) : $this->getDefaultFacets();
142 142
 	}
143 143
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @param string[string][] $facets
149 149
 	 */
150 150
 	protected function setSearchFacets(SessionInterface $session, $facets) {
151
-		$session->set(self::SESSION_PREFIX . '_facets', json_encode($facets));
151
+		$session->set(self::SESSION_PREFIX.'_facets', json_encode($facets));
152 152
 	}
153 153
 
154 154
 	/**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * @return mixed
159 159
 	 */
160 160
 	protected function getSearchTerm(SessionInterface $session) {
161
-		return $session->get(self::SESSION_PREFIX . '_term', false);
161
+		return $session->get(self::SESSION_PREFIX.'_term', false);
162 162
 	}
163 163
 
164 164
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 * @param string $term        	
169 169
 	 */
170 170
 	protected function setSearchTerm(SessionInterface $session, $term) {
171
-		$session->set(self::SESSION_PREFIX . '_term', $term);
171
+		$session->set(self::SESSION_PREFIX.'_term', $term);
172 172
 	}
173 173
 
174 174
 	/**
Please login to merge, or discard this patch.