Passed
Push — master ( 989332...b2746c )
by Darko
21:31 queued 08:33
created
app/Services/ReleaseCleaningService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                 foreach ($hit as $val) {
115 115
                     $title = Predb::query()->where('title', trim($val))->first(['title', 'id']);
116 116
                     // don't match against ab.teevee if title is for just the season
117
-                    if (! empty($title) && $groupName === 'alt.binaries.teevee' && preg_match('/\.S\d\d\./', $title['title'], $hit)) {
117
+                    if (!empty($title) && $groupName === 'alt.binaries.teevee' && preg_match('/\.S\d\d\./', $title['title'], $hit)) {
118 118
                         $title = null;
119 119
                     }
120 120
                     if ($title !== null) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                     }
159 159
                     break;
160 160
             }
161
-            if ($title === null && ! empty($reqGname)) {
161
+            if ($title === null && !empty($reqGname)) {
162 162
                 $title = Predb::query()->where(['predb.requestid' => $hit[1], 'g.name' => $reqGname])->join('usenet_groups as g', 'g.id', '=', 'predb.groups_id')->first(['predb.title', 'predb.id']);
163 163
             }
164 164
             // don't match against ab.teevee if title is for just the season
Please login to merge, or discard this patch.
app/Services/ReleaseRemoverService.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
         }
123 123
         $this->query = $this->cleanSpaces($this->query);
124 124
 
125
-        if (! $this->checkUserResponse()) {
125
+        if (!$this->checkUserResponse()) {
126 126
             return false;
127 127
         }
128 128
 
129
-        if (! $this->checkSelectQuery()) {
129
+        if (!$this->checkSelectQuery()) {
130 130
             return $this->returnError();
131 131
         }
132 132
 
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
         $this->blacklistID = $this->formatBlacklistID($blacklistID);
156 156
         $type = strtolower(trim($type));
157 157
 
158
-        if (! $this->initCrapTime(trim($time), $type)) {
158
+        if (!$this->initCrapTime(trim($time), $type)) {
159 159
             return $this->returnError();
160 160
         }
161 161
 
162 162
         $this->deletedCount = 0;
163 163
 
164
-        if (! $this->executeRemoval($type)) {
164
+        if (!$this->executeRemoval($type)) {
165 165
             return $this->returnError();
166 166
         }
167 167
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             return true;
196 196
         }
197 197
 
198
-        if (! is_numeric($time)) {
198
+        if (!is_numeric($time)) {
199 199
             $this->error = 'Error, time must be a number or full.';
200 200
 
201 201
             return false;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             return $this->executeAllRemovals();
217 217
         }
218 218
 
219
-        if (! isset($this->removalHandlers[$type])) {
219
+        if (!isset($this->removalHandlers[$type])) {
220 220
             $this->error = 'Wrong type: '.$type;
221 221
 
222 222
             return false;
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         $this->method = $method;
287 287
         $this->query = $query;
288 288
 
289
-        if (! $this->checkSelectQuery()) {
289
+        if (!$this->checkSelectQuery()) {
290 290
             return $this->returnError();
291 291
         }
292 292
 
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 
591 591
         $searchResult = app(\App\Services\Search\ManticoreSearchService::class)->searchIndexes('releases_rt', $regexMatch, ['name,searchname']);
592 592
 
593
-        return ! empty($searchResult) ? Arr::wrap(Arr::get($searchResult, 'id')) : '';
593
+        return !empty($searchResult) ? Arr::wrap(Arr::get($searchResult, 'id')) : '';
594 594
     }
595 595
 
596 596
     /**
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
         $this->query = sprintf(
660 660
             'SELECT r.guid, r.searchname, r.id FROM releases r %s %s %s %s',
661 661
             $regexSQL,
662
-            ! empty($searchResult) ? ' WHERE r.id IN ('.implode(',', $searchResult).')' : '',
662
+            !empty($searchResult) ? ' WHERE r.id IN ('.implode(',', $searchResult).')' : '',
663 663
             $groupID,
664 664
             $this->crapTime
665 665
         );
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
         // Columns that support equals, bigger, smaller
932 932
         $numericColumns = ['totalpart', 'size'];
933 933
         if (in_array($column, $numericColumns)) {
934
-            if ($column === 'size' && ! is_numeric($value)) {
934
+            if ($column === 'size' && !is_numeric($value)) {
935 935
                 return false;
936 936
             }
937 937
 
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
         // Date columns (note: bigger means older, smaller means newer)
942 942
         $dateColumns = ['adddate', 'postdate'];
943 943
         if (in_array($column, $dateColumns)) {
944
-            if (! is_numeric($value)) {
944
+            if (!is_numeric($value)) {
945 945
                 return false;
946 946
             }
947 947
 
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
      */
1051 1051
     private function buildCompletionClause(string $modifier, string $value): bool|string
1052 1052
     {
1053
-        if (! is_numeric($value) || $modifier !== 'smaller') {
1053
+        if (!is_numeric($value) || $modifier !== 'smaller') {
1054 1054
             return false;
1055 1055
         }
1056 1056
 
@@ -1139,7 +1139,7 @@  discard block
 block discarded – undo
1139 1139
             }
1140 1140
 
1141 1141
             // Handle simple quote stripping patterns
1142
-            if (! empty($pattern['stripQuotes'])) {
1142
+            if (!empty($pattern['stripQuotes'])) {
1143 1143
                 return str_replace('\'', '', $dbRegex);
1144 1144
             }
1145 1145
 
@@ -1148,18 +1148,18 @@  discard block
 block discarded – undo
1148 1148
                 continue;
1149 1149
             }
1150 1150
 
1151
-            $parenPos = ! empty($pattern['useLastParen'])
1151
+            $parenPos = !empty($pattern['useLastParen'])
1152 1152
                 ? strrpos($dbRegex, ')')
1153 1153
                 : strpos($dbRegex, ')');
1154 1154
 
1155 1155
             $extracted = substr($dbRegex, $searchPos, $parenPos - $searchPos);
1156 1156
 
1157 1157
             // Apply specific transformations
1158
-            if (! empty($pattern['wrapQuotes'])) {
1158
+            if (!empty($pattern['wrapQuotes'])) {
1159 1159
                 return '"'.str_replace('|', '" "', $extracted).'"';
1160 1160
             }
1161 1161
 
1162
-            if (! empty($pattern['cleanChars'])) {
1162
+            if (!empty($pattern['cleanChars'])) {
1163 1163
                 return str_replace(
1164 1164
                     ['-', '(', ')', '.', '?', 'nl  subed|bed|s'],
1165 1165
                     ['', '', '', ' ', '', 'nlsubs|nlsubbed|nlsubed'],
@@ -1167,11 +1167,11 @@  discard block
 block discarded – undo
1167 1167
                 );
1168 1168
             }
1169 1169
 
1170
-            if (! empty($pattern['replace4u'])) {
1170
+            if (!empty($pattern['replace4u'])) {
1171 1171
                 return str_replace(['4u.nl', 'nov[ a]*rip'], ['"4u" "nl"', 'nova'], $extracted);
1172 1172
             }
1173 1173
 
1174
-            if (! empty($pattern['replaceBdDl'])) {
1174
+            if (!empty($pattern['replaceBdDl'])) {
1175 1175
                 return str_replace(['bd|dl)mux', '\\', ']', '['], ['bdmux|dlmux', '', '', ''], $extracted);
1176 1176
             }
1177 1177
 
Please login to merge, or discard this patch.
app/Services/CollectionsCleaningService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
     protected function generic(): array
122 122
     {
123 123
         // For non-music groups
124
-        if (! $this->isMusicGroup()) {
124
+        if (!$this->isMusicGroup()) {
125 125
             return $this->cleanGenericSubject();
126 126
         }
127 127
 
Please login to merge, or discard this patch.