Skip to content

Commit

Permalink
Added novalidate to boolean attributes array
Browse files Browse the repository at this point in the history
  • Loading branch information
garryxigen committed Jun 29, 2024
1 parent 8e3cc77 commit dea11fd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/View/Helper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ abstract class AbstractHelper extends BaseAbstractHelper
* @var array
*/
protected $booleanAttributes = [
'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus
'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked
'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled
'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope
'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple
'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly
'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required
'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected
'autofocus' => ['on' => 'autofocus', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-autofocus

Check failure on line 54 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 2 spaces before double arrow; 1 found

Check failure on line 54 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 1 space after "=>"; 2 found
'checked' => ['on' => 'checked', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-checked

Check failure on line 55 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 4 spaces before double arrow; 3 found

Check failure on line 55 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 1 space after "=>"; 2 found
'disabled' => ['on' => 'disabled', 'off' => ''], // https://html.spec.whatwg.org/#attr-fe-disabled

Check failure on line 56 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 3 spaces before double arrow; 2 found

Check failure on line 56 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 1 space after "=>"; 2 found
'itemscope' => ['on' => 'itemscope', 'off' => ''], // https://html.spec.whatwg.org/#attr-itemscope

Check failure on line 57 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 2 spaces before double arrow; 1 found

Check failure on line 57 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 1 space after "=>"; 2 found
'multiple' => ['on' => 'multiple', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-multiple

Check failure on line 58 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 3 spaces before double arrow; 2 found

Check failure on line 58 in src/View/Helper/AbstractHelper.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Expected 1 space after "=>"; 2 found
'readonly' => ['on' => 'readonly', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-readonly
'required' => ['on' => 'required', 'off' => ''], // https://html.spec.whatwg.org/#attr-input-required
'selected' => ['on' => 'selected', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected
'novalidate' => ['on' => 'novalidate', 'off' => ''], // https://html.spec.whatwg.org/#attr-option-selected
];

/**
Expand Down

0 comments on commit dea11fd

Please sign in to comment.