Passed
Push — master ( 8faac7...7d50f1 )
by Nicolaas
09:31 queued 07:27
created
src/Model/FlushRecord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     {
73 73
         if (Security::database_is_ready() && Director::is_cli() && false === self::$done) {
74 74
             self::$done = true;
75
-            register_shutdown_function(function () {
75
+            register_shutdown_function(function() {
76 76
                 $obj = \Sunnysideup\FlushFrontEnd\Model\FlushRecord::create();
77 77
                 $obj->write();
78 78
                 sleep(2);
Please login to merge, or discard this patch.
src/Control/FlushReceiver.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function Link($action = '')
27 27
     {
28
-        return '/'.self::join_links(self::my_url_segment(), $action);
28
+        return '/' . self::join_links(self::my_url_segment(), $action);
29 29
     }
30 30
 
31 31
     public function do($request)
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     protected function getFlushRecord(string $code): ?FlushRecord
72 72
     {
73 73
         /** @var FlushRecord $obj */
74
-        $obj = FlushRecord::get()->filter(['Done' => false, 'Code' => $code])->first();
74
+        $obj = FlushRecord::get()->filter([ 'Done' => false, 'Code' => $code ])->first();
75 75
         if ($obj) {
76 76
             return $obj;
77 77
         }
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
     // Function to delete files and folders recursively
85 85
     private function deleteFolderContents(string $folderPath)
86 86
     {
87
-        if (! is_dir($folderPath)) {
87
+        if (!is_dir($folderPath)) {
88 88
             return;
89 89
         }
90 90
 
91
-        $files = array_diff(scandir($folderPath), ['.', '..']);
91
+        $files = array_diff(scandir($folderPath), [ '.', '..' ]);
92 92
 
93 93
         foreach ($files as $file) {
94 94
             $filePath = $folderPath . '/' . $file;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,9 +28,11 @@
 block discarded – undo
28 28
         return '/'.self::join_links(self::my_url_segment(), $action);
29 29
     }
30 30
 
31
-    public function do($request)
31
+    public function do {
32
+        ($request)
32 33
     {
33 34
         $code = $request->param('ID');
35
+    }
34 36
         $obj = $this->getFlushRecord($code);
35 37
         if ($obj) {
36 38
             // mark as done first
Please login to merge, or discard this patch.