Passed
Push — master ( b91050...6fb96f )
by Jens
02:59
created
src/components/LanguageComponent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function __construct($template, Request $request, $parameters, $matchedSitemapItem)
41 41
     {
42
-        $this->parameters = (array)$parameters;
42
+        $this->parameters = (array) $parameters;
43 43
         $this->checkParameters();
44 44
 
45 45
         $lang = substr(isset($_SERVER[self::HTTP_ACCEPT_LANGUAGE]) ? $_SERVER[self::HTTP_ACCEPT_LANGUAGE] : self::$DEFAULT_LANGUAGE, 0, 2);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             unset($this->parameters[self::PARAMETER_LANGUAGE_PARAMETER_NAME]);
77 77
         }
78 78
         if (isset($this->parameters[self::PARAMETER_FORCE_REDIRECT])) {
79
-            $this->forceRedirect = (bool)$this->parameters[self::PARAMETER_FORCE_REDIRECT];
79
+            $this->forceRedirect = (bool) $this->parameters[self::PARAMETER_FORCE_REDIRECT];
80 80
             unset($this->parameters[self::PARAMETER_FORCE_REDIRECT]);
81 81
         }
82 82
     }
Please login to merge, or discard this patch.
src/storage/factories/ValuelistFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             }
36 36
             $object_vars = get_object_vars($valuelistObject->pairs);
37 37
             ksort($object_vars);
38
-            $valuelistObject->pairs = (object)$object_vars;
38
+            $valuelistObject->pairs = (object) $object_vars;
39 39
 
40 40
             return new Valuelist($valuelistObject);
41 41
         } else {
Please login to merge, or discard this patch.
src/components/BaseComponent.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
          * @param null | Application $application
97 97
          * @param Application $application
98 98
          *
99
-         * @return mixed|string
99
+         * @return string|null
100 100
          * @throws \Exception
101 101
          */
102 102
         public function renderTemplate($template = '', $obClean = true, $application = null)
@@ -141,8 +141,9 @@  discard block
 block discarded – undo
141 141
         }
142 142
 
143 143
         /**
144
-         * @param $template
144
+         * @param string $template
145 145
          * @param null | Application $application
146
+         * @param Application $application
146 147
          * @return string
147 148
          */
148 149
         protected function getTemplateDir($template, $application = null)
Please login to merge, or discard this patch.
src/cc/application/UrlMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function redirectMatching(Request $request)
37 37
     {
38
-        $redirects =$this->storage->getRedirects()->getRedirects();
38
+        $redirects = $this->storage->getRedirects()->getRedirects();
39 39
         $relativeUri = '/' . $request::$relativeUri;
40 40
 
41 41
         foreach ($redirects as $redirect) {
Please login to merge, or discard this patch.
src/search/Search.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $errorMsg = $errorInfo[2];
88 88
             throw new \Exception('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
89 89
         }
90
-        return (int)$result;
90
+        return (int) $result;
91 91
     }
92 92
 
93 93
     /**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                     $resultObj = new SearchResult();
184 184
                     $resultObj->documentPath = $result->documentPath;
185 185
                     $resultObj->matchingTokens = array($token);
186
-                    $resultObj->score = (float)$result->score;
186
+                    $resultObj->score = (float) $result->score;
187 187
                     $resultObj->setStorage($this->storage);
188 188
                     $finalResults[$result->documentPath] = $resultObj;
189 189
                 }
Please login to merge, or discard this patch.
src/search/indexer/TermFrequency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
             $values = array();
55 55
             $i = 0;
56 56
             foreach ($termsForDocumentField as $term) {
57
-                $frequency = (int)$term->count / $documentField->totalTermCount;
57
+                $frequency = (int) $term->count / $documentField->totalTermCount;
58 58
                 $values[] = $quotedDocumentPath . ',' . $quotedField . ', ' . $db->quote($term->term) . ', ' . $db->quote($frequency);
59 59
                 $i += 1;
60 60
                 if ($i >= Indexer::SQLITE_MAX_COMPOUND_SELECT) {
Please login to merge, or discard this patch.
src/search/indexer/TermFieldLengthNorm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $values = array();
58 58
         $i = 0;
59 59
         foreach ($uniqueFieldsPerDocument as $fieldRow) {
60
-            $values[] = 'UPDATE term_frequency SET termNorm = 1/sqrt(' . (int)$fieldRow->termCount . ') WHERE documentPath = ' . $db->quote($fieldRow->documentPath) . ' AND field = ' . $db->quote($fieldRow->field) . ';';
60
+            $values[] = 'UPDATE term_frequency SET termNorm = 1/sqrt(' . (int) $fieldRow->termCount . ') WHERE documentPath = ' . $db->quote($fieldRow->documentPath) . ' AND field = ' . $db->quote($fieldRow->field) . ';';
61 61
             $i += 1;
62 62
             if ($i >= Indexer::SQLITE_MAX_COMPOUND_SELECT) {
63 63
                 $this->executeUpdateTermNorm($values, $db);
Please login to merge, or discard this patch.
src/storage/factories/DocumentFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $documentObj->documentTypeSlug = $documentType->slug;
54 54
         $documentObj->state = isset($postValues['state']) ? 'published' : 'unpublished';
55 55
         $documentObj->lastModificationDate = time();
56
-        $documentObj->creationDate = isset($postValues['creationDate']) ? (int)$postValues['creationDate'] : time();
56
+        $documentObj->creationDate = isset($postValues['creationDate']) ? (int) $postValues['creationDate'] : time();
57 57
         $documentObj->lastModifiedBy = $_SESSION['cloudcontrol']->username;
58 58
 
59 59
         return $documentObj;
Please login to merge, or discard this patch.
src/storage/repository/ContentRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@
 block discarded – undo
240 240
             if (!is_array($result)) {
241 241
                 return 0;
242 242
             }
243
-            return (int)current($result);
243
+            return (int) current($result);
244 244
         }
245 245
 
246 246
         /**
Please login to merge, or discard this patch.