@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 9 | 9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 10 | 10 | use Symfony\Component\HttpFoundation\Request; |
| 11 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 12 | 11 | use Xtools\ProjectRepository; |
| 13 | 12 | use Xtools\Page; |
| 14 | 13 | use Xtools\PagesRepository; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * @Route("/rfx/{project}", name="rfxAnalysisProject") |
| 45 | 45 | * @Route("/rfx/{project}/{type}", name="rfxAnalysisProjectType") |
| 46 | 46 | * |
| 47 | - * @return Response|RedirectResponse |
|
| 47 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 48 | 48 | */ |
| 49 | 49 | public function indexAction(Request $request, $project = null, $type = null) |
| 50 | 50 | { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * |
| 111 | 111 | * @Route("/rfx/{project}/{type}/{username}", name="rfxAnalysisResult") |
| 112 | 112 | * |
| 113 | - * @return Response|RedirectResponse |
|
| 113 | + * @return \Symfony\Component\HttpFoundation\Response |
|
| 114 | 114 | */ |
| 115 | 115 | public function resultAction($project, $type, $username) |
| 116 | 116 | { |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | $neutral = $rfx->getSection('neutral'); |
| 167 | 167 | $dup = $rfx->getDuplicates(); |
| 168 | 168 | |
| 169 | - $total = count($support) + count($oppose) + count($neutral); |
|
| 169 | + $total = count($support)+count($oppose)+count($neutral); |
|
| 170 | 170 | |
| 171 | 171 | if ($total === 0) { |
| 172 | 172 | $this->addFlash('notice', ['no-result', $pagename]); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * Returns matches. |
| 36 | 36 | * |
| 37 | 37 | * @param string $input The line we're looking for |
| 38 | - * @param array $matches Pointer to an array where we stash results |
|
| 38 | + * @param string[] $matches Pointer to an array where we stash results |
|
| 39 | 39 | * |
| 40 | 40 | * @TODO: Make this cleaner |
| 41 | 41 | * |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - $final = []; // initialize the final array |
|
| 122 | + $final = []; // initialize the final array |
|
| 123 | 123 | $finalRaw = []; // Initialize the raw data array |
| 124 | 124 | |
| 125 | 125 | foreach ($this->data as $key => $value) { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | $final = array_count_values($final); // find repetition and its count |
| 134 | 134 | |
| 135 | - $final = array_diff($final, [1]); // remove single occurrences |
|
| 135 | + $final = array_diff($final, [1]); // remove single occurrences |
|
| 136 | 136 | |
| 137 | 137 | $this->duplicates = array_keys($final); |
| 138 | 138 | } |