Passed
Push — 3.x ( 671c26...8e752a )
by Enjoys
02:29
created
src/Captcha/Defaults/Defaults.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
         $this->generateCode($element);
70 70
         $img = $this->createImage(
71 71
             $this->getCode(),
72
-            (int)$this->getOption('width', 150),
73
-            (int)$this->getOption('height', 50)
72
+            (int) $this->getOption('width', 150),
73
+            (int) $this->getOption('height', 50)
74 74
         );
75 75
 
76 76
         //dump($this->session->get($this->getName()));
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     private function generateCode(\Enjoys\Forms\Element $element): void
90 90
     {
91
-        $max = (int)$this->getOption('size', 6);
91
+        $max = (int) $this->getOption('size', 6);
92 92
         $chars = $this->getOption('chars', 'qwertyuiopasdfghjklzxcvbnm1234567890');
93 93
         $size = StrLen($chars) - 1;
94 94
         // Определяем пустую переменную, в которую и будем записывать символы.
@@ -148,15 +148,15 @@  discard block
 block discarded – undo
148 148
 
149 149
             // Формируем координаты для вывода символа
150 150
             if (empty($x)) {
151
-                $x = (int)($width * 0.08);
151
+                $x = (int) ($width * 0.08);
152 152
             } else {
153
-                $x = (int)($x + ($width * 0.8) / \count($letters) + \rand(0, (int)($width * 0.01)));
153
+                $x = (int) ($x + ($width * 0.8) / \count($letters) + \rand(0, (int) ($width * 0.01)));
154 154
             }
155 155
 
156 156
             if ($h == rand(1, 2)) {
157
-                $y = (int)((($height * 1) / 4) + \rand(0, (int)($height * 0.1)));
157
+                $y = (int) ((($height * 1) / 4) + \rand(0, (int) ($height * 0.1)));
158 158
             } else {
159
-                $y = (int)((($height * 1) / 4) - \rand(0, (int)($height * 0.1)));
159
+                $y = (int) ((($height * 1) / 4) - \rand(0, (int) ($height * 0.1)));
160 160
             }
161 161
 
162 162
 
Please login to merge, or discard this patch.