Test Failed
Pull Request — master (#22)
by Russell
03:59
created
src/Tool/StaticSiteContentExtractor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             if (!trim($excludeSelector)) {
217 217
                 continue;
218 218
             }
219
-            $element = $this->phpQuery[$parentSelector.' '.$excludeSelector];
219
+            $element = $this->phpQuery[$parentSelector . ' ' . $excludeSelector];
220 220
             if ($element) {
221 221
                 $remove = $element->htmlOuter();
222 222
                 $content = str_replace($remove, '', $content);
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         // Run request
331 331
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
332 332
         // See: http://forums.devshed.com/php-development-5/curlopt-timeout-option-for-curl-calls-isn-t-being-obeyed-605642.html
333
-        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);		// No. seconds to wait while trying to connect.
333
+        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); // No. seconds to wait while trying to connect.
334 334
 
335 335
         // Deal to files, write to them directly and then return
336 336
         if ($this->mimeProcessor->isOfFileOrImage($this->mime)) {
Please login to merge, or discard this patch.
src/Tool/StaticSiteMimeProcessor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
         $mimeCategories = File::config()->get('app_categories');
176 176
         list($ext, $mime) = [strtolower($ext), strtolower($mime)];
177 177
 
178
-        $notAuthoratative = !isset($httpMimeTypes[$ext]);					// We've found ourselves a weird extension
179
-        $notMatch = (!$notAuthoratative && $httpMimeTypes[$ext] !== $mime);	// No match found for passed extension in our ext=>mime mapping from config
178
+        $notAuthoratative = !isset($httpMimeTypes[$ext]); // We've found ourselves a weird extension
179
+        $notMatch = (!$notAuthoratative && $httpMimeTypes[$ext] !== $mime); // No match found for passed extension in our ext=>mime mapping from config
180 180
 
181 181
         if ($notAuthoratative || $notMatch) {
182 182
             if (!$fix) {
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
             $coreExts = array_merge($mimeCategories['document'], $mimeCategories['image']);
188 188
             foreach ($coreExts as $coreExt) {
189 189
                 // Make sure we check the correct category so we don't find a match for ms-excel in the image \File category (.cel) !!
190
-                $isFile = in_array($coreExt, $mimeCategories['document']) && singleton(__CLASS__)->isOfFile($mime);		// dirty
191
-                $isImge = in_array($coreExt, $mimeCategories['image']) && singleton(__CLASS__)->isOfImage($mime);	// more dirt
190
+                $isFile = in_array($coreExt, $mimeCategories['document']) && singleton(__CLASS__)->isOfFile($mime); // dirty
191
+                $isImge = in_array($coreExt, $mimeCategories['image']) && singleton(__CLASS__)->isOfImage($mime); // more dirt
192 192
 
193 193
                 if (($isFile || $isImge) && stristr($mime, $coreExt) !== false) {
194 194
                     // "Manually" force "jpg" as the file-suffix to be returned
Please login to merge, or discard this patch.
src/Model/StaticSiteImportDataObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@
 block discarded – undo
100 100
         $relatedFailedRewriteObjects = DataObject::get(FailedURLRewriteObject::class)->filter('ImportID', $this->ID);
101 101
         $relatedFailedRewriteSummaries = DataObject::get(FailedURLRewriteSummary::class)->filter('ImportID', $this->ID);
102 102
 
103
-        $relatedFailedRewriteObjects->each(function ($item) {
103
+        $relatedFailedRewriteObjects->each(function($item) {
104 104
             $item->delete();
105 105
         });
106 106
 
107
-        $relatedFailedRewriteSummaries->each(function ($item) {
107
+        $relatedFailedRewriteSummaries->each(function($item) {
108 108
             $item->delete();
109 109
         });
110 110
     }
Please login to merge, or discard this patch.
src/Model/StaticSiteContentSourceImportSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         "Order" => DBInt::class,
45 45
         "AppliesTo" => DBVarchar::class,
46 46
         "MimeTypes" => DBText::class,
47
-        "Notes" => DBText::class,	// Purely informational. Not used in imports.
47
+        "Notes" => DBText::class, // Purely informational. Not used in imports.
48 48
     ];
49 49
 
50 50
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function getTitle(): string
98 98
     {
99
-        return $this->DataType . ' (' .$this->AppliesTo . ')';
99
+        return $this->DataType . ' (' . $this->AppliesTo . ')';
100 100
     }
101 101
 
102 102
     /**
Please login to merge, or discard this patch.
src/Report/FailedURLRewriteReport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
         return [
123 123
             'Title' => [
124 124
                 'title' => 'Imported page',
125
-                'formatting' => function ($value, $item) {
125
+                'formatting' => function($value, $item) {
126 126
                     return sprintf(
127 127
                         '<a href="admin/pages/edit/show/%s">%s</a>',
128 128
                         $item->ContainedInID,
Please login to merge, or discard this patch.
src/Extension/StaticSiteExternalContentAdminExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         }
82 82
 
83 83
         if ($imports) {
84
-            $imports->each(function ($item) {
84
+            $imports->each(function($item) {
85 85
                 $item->delete();
86 86
             });
87 87
             $messageType = 'good';
Please login to merge, or discard this patch.
src/Extension/StaticSiteDataExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     {
61 61
         parent::onAfterDelete();
62 62
         if ($failedRewriteObjects = DataObject::get(FailedURLRewriteObject::class)->filter('ContainedInID', $this->owner->ID)) {
63
-            $failedRewriteObjects->each(function ($item) {
63
+            $failedRewriteObjects->each(function($item) {
64 64
                 $item->delete();
65 65
             });
66 66
         }
Please login to merge, or discard this patch.
src/Model/StaticSiteContentSource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@
 block discarded – undo
217 217
                 $crawlButtonText = _t('StaticSiteContentSource.RECRAWL_SITE', 'Re-Crawl');
218 218
                 break;
219 219
             default:
220
-                throw new \LogicException("Invalid getSpiderStatus() value '".$this->urlList()->getSpiderStatus().";");
220
+                throw new \LogicException("Invalid getSpiderStatus() value '" . $this->urlList()->getSpiderStatus() . ";");
221 221
         }
222 222
 
223 223
         $crawlButton = FormAction::create('crawlsite', $crawlButtonText)
Please login to merge, or discard this patch.
src/Tool/StaticSiteUrlList.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@
 block discarded – undo
373 373
         foreach ($this->urls['regular'] as $url => $urlData) {
374 374
             // TODO Log this in exodus.log
375 375
             if (empty($urlData['url'])) {
376
-               // echo $urlData['mime'] . "\n";
376
+                // echo $urlData['mime'] . "\n";
377 377
                 continue;
378 378
             }
379 379
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -624,12 +624,11 @@  discard block
 block discarded – undo
624 624
              */
625 625
             $sng = singleton(StaticSiteMimeProcessor::class);
626 626
             $mime = $sng->IsOfHtml($processedURLData['mime']) ?
627
-                $processedURLData['mime'] :
628
-                self::$undefined_mime_type;
627
+                $processedURLData['mime'] : self::$undefined_mime_type;
629 628
             $processedURL = $processedURLData['url'];
630 629
         }
631 630
 
632
-        $default = function ($fragment) use ($mime) {
631
+        $default = function($fragment) use ($mime) {
633 632
             return [
634 633
                 'url' => $fragment,
635 634
                 'mime' => $mime,
@@ -699,7 +698,7 @@  discard block
 block discarded – undo
699 698
             }
700 699
 
701 700
             return $this->urls['regular'][$url];
702
-        } elseif(isset($this->urls['inferred'][$url])) {
701
+        } elseif (isset($this->urls['inferred'][$url])) {
703 702
             return $this->urls['inferred'][$url];
704 703
         }
705 704
 
Please login to merge, or discard this patch.