Passed
Push — Auth ( b5e900...aacdac )
by Stone
04:19 queued 01:34
created
App/Controllers/Ajax/postModification.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $this->onlyAdmin();
28 28
         $this->onlyPost();
29
-        $state = (bool)($this->request->getData("state") === 'true');
30
-        $postId = (int)$this->request->getData("postId");
29
+        $state = (bool) ($this->request->getData("state") === 'true');
30
+        $postId = (int) $this->request->getData("postId");
31 31
 
32 32
         $result = array();
33 33
         $result["success"] = $this->postModule->setPublished(!$state, $postId);
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $this->onlyAdmin();
46 46
         $this->onlyPost();
47
-        $state = (bool)($this->request->getData("state") === 'true');
48
-        $postId = (int)$this->request->getData("postId");
47
+        $state = (bool) ($this->request->getData("state") === 'true');
48
+        $postId = (int) $this->request->getData("postId");
49 49
 
50 50
         $result = array();
51 51
         $result["success"] = $this->postModule->setOnFrontPage(!$state, $postId);
Please login to merge, or discard this patch.
Core/Traits/StringFunctions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         //Searching for the page break tag
85 85
         $breakTagPosition = strpos($text, "<!-- EndOfExcerptBlogOc -->");
86
-        if($breakTagPosition > 0){
86
+        if ($breakTagPosition > 0) {
87 87
             return $this->completeDom(substr($text, 0, $breakTagPosition));
88 88
         }
89 89
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $string = preg_split('/(<img[^>]+\>)|(<p[^>]+\>)|(<span[^>]+\>)|\s/', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
92 92
 
93 93
         //The preg split can return false, probably will never happen but just in case.
94
-        if(!$string)
94
+        if (!$string)
95 95
         {
96 96
             throw new \Error("excerpt generation failed");
97 97
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $trimed .= $string[$wordCounter];
105 105
             if ($wordCounter < $count - 1) {
106 106
                 $trimed .= " ";
107
-            } else {
107
+            }else {
108 108
                 $trimed .= "[...]";
109 109
             }
110 110
         }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $result = true;
156 156
         foreach ($strings as $string)
157 157
         {
158
-            if(!$this->isAlphaNum($string))
158
+            if (!$this->isAlphaNum($string))
159 159
             {
160 160
                 $result = false;
161 161
             }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function isHexa(string $string):bool
172 172
     {
173
-        return preg_match("/[\da-f]/",$string);
173
+        return preg_match("/[\da-f]/", $string);
174 174
     }
175 175
 
176 176
     /**
Please login to merge, or discard this patch.
Core/Dependency/Cookie.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Core\Dependency;
4 4
 
5
-class Cookie{
5
+class Cookie {
6 6
 
7 7
     /**
8 8
      * set a cookie
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function deleteCookie(string $name):void
23 23
     {
24
-        setcookie($name, "", time()-3600); //expire the cookie
24
+        setcookie($name, "", time() - 3600); //expire the cookie
25 25
     }
26 26
 
27 27
     /**
Please login to merge, or discard this patch.