@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | if ($canSet) { |
| 46 | 46 | $this->assertFalse($adapter->offsetExists('fee')); |
| 47 | - $adapter->offsetSet('fee','nnn'); |
|
| 47 | + $adapter->offsetSet('fee', 'nnn'); |
|
| 48 | 48 | $this->assertTrue($adapter->offsetExists('fee')); |
| 49 | 49 | $adapter->offsetUnset('fee'); |
| 50 | 50 | $this->assertFalse($adapter->offsetExists('fee')); |
@@ -67,12 +67,12 @@ discard block |
||
| 67 | 67 | 'xggxgx' => $entry, |
| 68 | 68 | ]; |
| 69 | 69 | return [ |
| 70 | - [new \Adapter(), '', true, true, true, true ], |
|
| 71 | - [new Adapters\ArrayAdapter($_GET), IEntry::SOURCE_GET, true, true, true, true ], |
|
| 72 | - [new Adapters\VarsAdapter(), IEntry::SOURCE_GET, true, false, true, true ], |
|
| 73 | - [new Adapters\VarsAdapter(), IEntry::SOURCE_POST, false, false, false, true ], |
|
| 74 | - [new Adapters\SessionAdapter(), '', false, false, false, true ], |
|
| 75 | - [new \Files(), '', false, false, false, false ], |
|
| 70 | + [new \Adapter(), '', true, true, true, true], |
|
| 71 | + [new Adapters\ArrayAdapter($_GET), IEntry::SOURCE_GET, true, true, true, true], |
|
| 72 | + [new Adapters\VarsAdapter(), IEntry::SOURCE_GET, true, false, true, true], |
|
| 73 | + [new Adapters\VarsAdapter(), IEntry::SOURCE_POST, false, false, false, true], |
|
| 74 | + [new Adapters\SessionAdapter(), '', false, false, false, true], |
|
| 75 | + [new \Files(), '', false, false, false, false], |
|
| 76 | 76 | ]; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -160,12 +160,12 @@ discard block |
||
| 160 | 160 | public function factoryProvider(): array |
| 161 | 161 | { |
| 162 | 162 | return [ |
| 163 | - [Controls\Security\Captcha\Factory::TYPE_DISABLED, '\kalanis\kw_forms\Controls\Security\Captcha\Disabled'], |
|
| 164 | - [Controls\Security\Captcha\Factory::TYPE_TEXT, '\kalanis\kw_forms\Controls\Security\Captcha\Text'], |
|
| 165 | - [Controls\Security\Captcha\Factory::TYPE_MATH, '\kalanis\kw_forms\Controls\Security\Captcha\Numerical'], |
|
| 166 | - [Controls\Security\Captcha\Factory::TYPE_COLOUR, '\kalanis\kw_forms\Controls\Security\Captcha\ColourfulText'], |
|
| 163 | + [Controls\Security\Captcha\Factory::TYPE_DISABLED, '\kalanis\kw_forms\Controls\Security\Captcha\Disabled'], |
|
| 164 | + [Controls\Security\Captcha\Factory::TYPE_TEXT, '\kalanis\kw_forms\Controls\Security\Captcha\Text'], |
|
| 165 | + [Controls\Security\Captcha\Factory::TYPE_MATH, '\kalanis\kw_forms\Controls\Security\Captcha\Numerical'], |
|
| 166 | + [Controls\Security\Captcha\Factory::TYPE_COLOUR, '\kalanis\kw_forms\Controls\Security\Captcha\ColourfulText'], |
|
| 167 | 167 | [Controls\Security\Captcha\Factory::TYPE_NOCAPTCHA, '\kalanis\kw_forms\Controls\Security\Captcha\Nocaptcha'], |
| 168 | - [123, '\kalanis\kw_forms\Controls\Security\Captcha\Text'], |
|
| 168 | + [123, '\kalanis\kw_forms\Controls\Security\Captcha\Text'], |
|
| 169 | 169 | ]; |
| 170 | 170 | } |
| 171 | 171 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | class Graphical extends Controls\Security\Captcha\AGraphical |
| 180 | 180 | { |
| 181 | - public function set(string $alias, ArrayAccess &$session, string $errorMessage, string $font = ''): self |
|
| 181 | + public function set(string $alias, ArrayAccess & $session, string $errorMessage, string $font = ''): self |
|
| 182 | 182 | { |
| 183 | 183 | $this->font = $font; |
| 184 | 184 | $text = strtolower($this->generateRandomString(8)); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $input->resetUniq(); |
| 28 | 28 | $input->set('myown', 'original', 'not to look'); |
| 29 | 29 | $this->assertEquals( |
| 30 | - ' <input type="text" value="" class="datepicker" id="myown_0" name="myown[]" /> '. PHP_EOL |
|
| 30 | + ' <input type="text" value="" class="datepicker" id="myown_0" name="myown[]" /> ' . PHP_EOL |
|
| 31 | 31 | . ' <input type="text" value="" class="datepicker" id="myown_1" name="myown[]" /> ', $input->renderInput()); |
| 32 | 32 | } |
| 33 | 33 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function load(string $key) |
| 41 | 41 | { |
| 42 | - return isset($this->content[$key]) ? $this->content[$key] : null ; |
|
| 42 | + return isset($this->content[$key]) ? $this->content[$key] : null; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function save(string $key, $data, ?int $timeout = null): bool |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | public function current() |
| 95 | 95 | { |
| 96 | - return $this->valid() ? $this->offsetGet($this->key) : null ; |
|
| 96 | + return $this->valid() ? $this->offsetGet($this->key) : null; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | public function next() |
@@ -184,14 +184,14 @@ discard block |
||
| 184 | 184 | protected function fileDataset(): array |
| 185 | 185 | { |
| 186 | 186 | return [ |
| 187 | - 'files' => [ // simple upload |
|
| 187 | + 'files' => [// simple upload |
|
| 188 | 188 | 'name' => 'facepalm.jpg', |
| 189 | 189 | 'type' => 'image/jpeg', |
| 190 | 190 | 'tmp_name' => '/tmp/php3zU3t5', |
| 191 | 191 | 'error' => UPLOAD_ERR_OK, |
| 192 | 192 | 'size' => 591387, |
| 193 | 193 | ], |
| 194 | - 'download' => [ // multiple upload |
|
| 194 | + 'download' => [// multiple upload |
|
| 195 | 195 | 'name' => [ |
| 196 | 196 | 'file1' => 'MyFile.txt', |
| 197 | 197 | 'file2' => 'MyFile.jpg', |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | 'file2' => 3075, |
| 214 | 214 | ], |
| 215 | 215 | ], |
| 216 | - 'numbered' => [ // multiple upload |
|
| 216 | + 'numbered' => [// multiple upload |
|
| 217 | 217 | 'name' => [ |
| 218 | 218 | 0 => 'MyFile.txt', |
| 219 | 219 | 1 => 'MyFile.jpg', |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | #[\ReturnTypeWillChange] |
| 40 | 40 | public function current() |
| 41 | 41 | { |
| 42 | - return $this->valid() ? $this->offsetGet($this->key) : null ; |
|
| 42 | + return $this->valid() ? $this->offsetGet($this->key) : null; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function next(): void |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * @param ArrayAccess $cookie |
| 18 | 18 | * @param int $expire |
| 19 | 19 | */ |
| 20 | - public function init(ArrayAccess &$cookie, int $expire = 3600): void; |
|
| 20 | + public function init(ArrayAccess & $cookie, int $expire = 3600): void; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Remove known token |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | public function getValue() |
| 28 | 28 | { |
| 29 | - return $this->submitted ? $this->originalValue : '' ; |
|
| 29 | + return $this->submitted ? $this->originalValue : ''; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public function setTitle(string $title): void |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | if (empty($title) && !empty($alias)) { |
| 20 | 20 | $title = $alias; |
| 21 | 21 | } |
| 22 | - $title = empty($title) ? strval($this->originalValue) : $title ; |
|
| 22 | + $title = empty($title) ? strval($this->originalValue) : $title; |
|
| 23 | 23 | if (empty($alias)) { |
| 24 | 24 | $alias = $title; |
| 25 | 25 | } |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | |
| 165 | 165 | protected function escaped(string $content): string |
| 166 | 166 | { |
| 167 | - return static::$escapeOutput ? htmlspecialchars($content, ENT_QUOTES | ENT_HTML5, 'UTF-8', false) : $content ; |
|
| 167 | + return static::$escapeOutput ? htmlspecialchars($content, ENT_QUOTES | ENT_HTML5, 'UTF-8', false) : $content; |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | public function count(): int |