Skip to content

Commit

Permalink
Add input interface to AbstractSelect and AbstractInput. (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jan 11, 2024
1 parent 6863022 commit 4d1ded6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 18 deletions.
3 changes: 2 additions & 1 deletion src/Base/AbstractSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use InvalidArgumentException;
use PHPForge\Html\Attribute;
use PHPForge\Html\Input\Contract\InputInterface;
use PHPForge\Html\Label;
use PHPForge\Html\Tag;
use PHPForge\Widget\Element;
Expand All @@ -23,7 +24,7 @@
/**
* Provides a foundation for creating HTML `select` elements with various attributes and content.
*/
abstract class AbstractSelect extends Element
abstract class AbstractSelect extends Element implements InputInterface
{
use Attribute\Aria\HasAriaLabel;
use Attribute\CanBeAutofocus;
Expand Down
3 changes: 1 addition & 2 deletions src/Input/Base/AbstractButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

namespace PHPForge\Html\Input\Base;

use PHPForge\Html\Attribute;
use PHPForge\Html\Tag;
use PHPForge\Html\{Attribute, Tag};
use PHPForge\Widget\Element;

abstract class AbstractButton extends Element
Expand Down
6 changes: 2 additions & 4 deletions src/Input/Base/AbstractChoiceList.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

namespace PHPForge\Html\Input\Base;

use PHPForge\Html\Attribute;
use PHPForge\Html\Helper\Utils;
use PHPForge\Html\Input\Checkbox;
use PHPForge\Html\Input\Contract;
use PHPForge\Html\Input\Radio;
use PHPForge\Html\Tag;
use PHPForge\Html\Input\{Checkbox, Radio};
use PHPForge\Html\{Attribute, Tag};
use PHPForge\Widget\Element;

abstract class AbstractChoiceList extends Element implements
Expand Down
3 changes: 1 addition & 2 deletions src/Input/Base/AbstractHidden.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

namespace PHPForge\Html\Input\Base;

use PHPForge\Html\Attribute;
use PHPForge\Html\Tag;
use PHPForge\Html\{Attribute, Tag};
use PHPForge\Widget\Element;

abstract class AbstractHidden extends Element
Expand Down
8 changes: 3 additions & 5 deletions src/Input/Base/AbstractInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@

namespace PHPForge\Html\Input\Base;

use PHPForge\Html\Attribute;
use PHPForge\Html\Input\Contract\AriaDescribedByInterface;
use PHPForge\Html\Input\Contract\InputInterface;
use PHPForge\Html\Tag;
use PHPForge\Html\Input\Contract;
use PHPForge\Html\{Attribute, Tag};
use PHPForge\Widget\Element;

/**
* Provides a foundation for creating HTML `input` custom elements with various attributes and content.
*/
abstract class AbstractInput extends Element implements AriaDescribedByInterface, InputInterface
abstract class AbstractInput extends Element implements Contract\AriaDescribedByInterface, Contract\InputInterface
{
use Attribute\Aria\HasAriaDescribedBy;
use Attribute\Aria\HasAriaLabel;
Expand Down
4 changes: 1 addition & 3 deletions src/Input/Base/AbstractInputChoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

namespace PHPForge\Html\Input\Base;

use PHPForge\Html\Attribute;
use PHPForge\Html\Input\Contract;
use PHPForge\Html\Label;
use PHPForge\Html\Tag;
use PHPForge\Html\{Attribute, Label, Tag};
use PHPForge\Widget\Element;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Input/CheckboxList/ImmutabilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PHPForge\Html\Tests\Input\ChoiceList;
namespace PHPForge\Html\Tests\Input\CheckboxList;

use PHPForge\Html\Input\Checkbox;
use PHPForge\Html\Input\CheckboxList;
Expand Down

0 comments on commit 4d1ded6

Please sign in to comment.