Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Nette 3 support #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,27 @@
},

"require": {
"php" : ">=7.0.0",
"php" : ">=7.1.0",

"ipub/phone" : "~1.2",
"ipub/phone" : "^3.0",
"ipub/phone-ui" : "^2.0",

"nette/application" : "~2.3@dev",
"nette/di" : "~2.3@dev",
"nette/forms" : "~2.3@dev",
"nette/utils" : "~2.3@dev",
"nette/application" : "^3.0",
"nette/di" : "^3.0",
"nette/forms" : "^3.0",
"nette/utils" : "^3.0",

"latte/latte" : "~2.3@dev"
"latte/latte" : "^2.5"
},

"require-dev": {
"nette/bootstrap" : "~2.3@dev",
"nette/mail" : "~2.3@dev",
"nette/safe-stream" : "~2.3@dev",
"nette/robot-loader" : "~2.3@dev",
"nette/tester" : "@dev",
"nette/bootstrap" : "^3.0",
"nette/mail" : "^3.0",
"nette/safe-stream" : "^2.4",
"nette/robot-loader" : "^3.0",
"nette/tester" : "^2.0",

"tracy/tracy" : "@dev",
"tracy/tracy" : "^2.6",

"pds/skeleton" : "^1.0"
},
Expand Down
12 changes: 6 additions & 6 deletions src/IPub/FormPhone/Controls/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function getValue()
*
* @return void
*/
public function loadHttpData()
public function loadHttpData(): void
{
$country = $this->getHttpData(Forms\Form::DATA_LINE, '[' . self::FIELD_COUNTRY . ']');
$this->country = ($country === '' || $country === NULL) ? NULL : (string) $country;
Expand All @@ -331,7 +331,7 @@ public function loadHttpData()
/**
* @return Utils\Html
*/
public function getControl()
public function getControl(): Utils\Html
{
$el = Utils\Html::el();
$el->addHtml($this->getControlPart(self::FIELD_COUNTRY) . $this->getControlPart(self::FIELD_NUMBER));
Expand All @@ -340,11 +340,11 @@ public function getControl()
}

/**
* @return Utils\Html
* @return Utils\Html|null
*
* @throws Exceptions\InvalidArgumentException
*/
public function getControlPart()
public function getControlPart(): ?Utils\Html
{
$args = func_get_args();
$key = reset($args);
Expand Down Expand Up @@ -442,7 +442,7 @@ public function getControlPart()
/**
* {@inheritdoc}
*/
public function getLabel($caption = NULL)
public function getLabel($caption = NULL): ?Utils\Html
{
$label = parent::getLabel($caption);
$label->for = $this->getHtmlId() . '-' . self::FIELD_NUMBER;
Expand All @@ -453,7 +453,7 @@ public function getLabel($caption = NULL)
/**
* {@inheritdoc}
*/
public function getLabelPart()
public function getLabelPart(): ?Utils\Html
{
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/IPub/FormPhone/Forms/PhoneValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
* @author Adam Kadlec <adam.kadlec@fastybird.com>
*/
class PhoneValidator extends Phone\Forms\PhoneValidator
class PhoneValidator extends \IPub\PhoneUI\Forms\PhoneValidator
{
/**
* Define validator calling constant
Expand Down