Passed
Push — Auth ( 9ea218...52ac6b )
by Stone
02:22
created
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)
172 172
     {
173
-        return preg_match("/[\da-f]/",$string);
173
+        return preg_match("/[\da-f]/", $string);
174 174
     }
175 175
 
176 176
     public function isInt($int)
Please login to merge, or discard this patch.