Skip to content

Commit

Permalink
phalcon#16477 - Add return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Dec 23, 2023
1 parent 647e491 commit 6e00fe0
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 51 deletions.
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/AddCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AddCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-27
*/
public function filterValidationAdd(IntegrationTester $I)
public function filterValidationAdd(IntegrationTester $I): void
{
$I->wantToTest('Validation - add()');

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/Filter/Validation/AllowEmptyCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AllowEmptyCest
* @author Phalcon Team <team@phalcon.io>
* @since 2021-11-07
*/
public function filterValidationAllowEmptyFalse(IntegrationTester $I)
public function filterValidationAllowEmptyFalse(IntegrationTester $I): void
{
$I->wantToTest('Validation - allowEmpty() - false');

Expand All @@ -38,7 +38,7 @@ public function filterValidationAllowEmptyFalse(IntegrationTester $I)
$I->assertCount(0, $messages);
}

public function filterValidationAllowEmptyTrue(IntegrationTester $I)
public function filterValidationAllowEmptyTrue(IntegrationTester $I): void
{
$I->wantToTest('Validation - allowEmpty() - true');

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/Filter/Validation/AppendMessageCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
use Phalcon\Messages\Messages;
use stdClass;

/**
* Class AppendMessageCest
*/
class AppendMessageCest
{
/**
Expand All @@ -31,7 +28,7 @@ class AppendMessageCest
* @author Phalcon Team <team@phalcon.io>
* @since 2019-04-16
*/
public function filterValidationAppendMessage(IntegrationTester $I)
public function filterValidationAppendMessage(IntegrationTester $I): void
{
$I->wantToTest('Validation - appendMessage()');
$validator = new PresenceOf();
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/BindCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BindCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-04-17
*/
public function filterValidationBind(IntegrationTester $I)
public function filterValidationBind(IntegrationTester $I): void
{
$I->wantToTest('Validation - bind()');

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/ConstructCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ConstructCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-25
*/
public function filterValidationConstruct(IntegrationTester $I)
public function filterValidationConstruct(IntegrationTester $I): void
{
$I->wantToTest('Validation - __construct()');

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/GetDataCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GetDataCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-04-17
*/
public function filterValidationGetData(IntegrationTester $I)
public function filterValidationGetData(IntegrationTester $I): void
{
$I->wantToTest('Validation - getData()');

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/Filter/Validation/GetEntityCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
use Phalcon\Filter\Validation;
use stdClass;

/**
* Class GetEntityCest
*/
class GetEntityCest
{
/**
Expand All @@ -28,7 +25,7 @@ class GetEntityCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-04-17
*/
public function filterValidationGetEntity(IntegrationTester $I)
public function filterValidationGetEntity(IntegrationTester $I): void
{
$I->wantToTest('Validation - getEntity()');

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/Filter/Validation/GetMessagesCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
use Phalcon\Messages\Messages;
use stdClass;

/**
* Class GetMessagesCest
*/
class GetMessagesCest
{
/**
Expand All @@ -31,7 +28,7 @@ class GetMessagesCest
* @author Phalcon Team <team@phalcon.io>
* @since 2019-04-16
*/
public function filterValidationGetMessages(IntegrationTester $I)
public function filterValidationGetMessages(IntegrationTester $I): void
{
$I->wantToTest('Validation - getMessages()');

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/GetSetFiltersCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GetSetFiltersCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-27
*/
public function filterValidationGetFilters(IntegrationTester $I)
public function filterValidationGetFilters(IntegrationTester $I): void
{
$I->wantToTest('Validation - getFilters()/setFilters()');

Expand Down
4 changes: 1 addition & 3 deletions tests/integration/Filter/Validation/GetSetLabelCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
use function intval;
use function uniqid;

/**
*/
class GetSetLabelCest
{
/**
Expand All @@ -34,7 +32,7 @@ class GetSetLabelCest
* @author Phalcon Team <team@phalcon.io>
* @since 2019-04-16
*/
public function filterValidationGetLabel(IntegrationTester $I)
public function filterValidationGetLabel(IntegrationTester $I): void
{
$I->wantToTest('Validation - getLabel()');
$validator = new PresenceOf();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GetSetValidatorsCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-25
*/
public function filterValidationGetSetValidators(IntegrationTester $I)
public function filterValidationGetSetValidators(IntegrationTester $I): void
{
$I->wantToTest('Validation - getValidators()/setValidators()');

Expand Down
7 changes: 2 additions & 5 deletions tests/integration/Filter/Validation/GetValueByDataCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
use Phalcon\Filter\Validation;
use Phalcon\Tests\Models\EntityWithPublic;

/**
* Class GetValueByDataCest
*/
class GetValueByDataCest
{
public const NAME = 'John Doe';
Expand All @@ -30,7 +27,7 @@ class GetValueByDataCest
* @author Phalcon Team <team@phalcon.io>
* @since 2021-11-07
*/
public function filterValidationGetValueByDataArray(IntegrationTester $I)
public function filterValidationGetValueByDataArray(IntegrationTester $I): void
{
$I->wantToTest('Validation - getValueByData()');

Expand All @@ -44,7 +41,7 @@ public function filterValidationGetValueByDataArray(IntegrationTester $I)
$I->assertSame($data['name'], $value);
}

public function filterValidationGetValueByDataObject(IntegrationTester $I)
public function filterValidationGetValueByDataObject(IntegrationTester $I): void
{
$I->wantToTest('Validation - getValueByData()');

Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Filter/Validation/GetValueByEntityCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
use Phalcon\Tests\Models\EntityWithHook;
use Phalcon\Tests\Models\EntityWithPublic;

/**
* Class GetValueByEntityCest
*/
class GetValueByEntityCest
{
public const NAME = 'John Doe';
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/Filter/Validation/GetValueCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class GetValueCest
*/
class GetValueCest
{
/**
Expand All @@ -26,7 +23,7 @@ class GetValueCest
* @author Phalcon Team <team@phalcon.io>
* @since 2019-04-16
*/
public function filterValidationGetValue(IntegrationTester $I)
public function filterValidationGetValue(IntegrationTester $I): void
{
$I->wantToTest('Validation - getValue()');

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/RuleCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RuleCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-27
*/
public function filterValidationRule(IntegrationTester $I)
public function filterValidationRule(IntegrationTester $I): void
{
$I->wantToTest('Validation - rule()');

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/RulesCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RulesCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-27
*/
public function filterValidationRules(IntegrationTester $I)
public function filterValidationRules(IntegrationTester $I): void
{
$I->wantToTest('Validation - rules()');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class SetDefaultMessagesCest
*/
class SetDefaultMessagesCest
{
/**
Expand All @@ -26,7 +23,7 @@ class SetDefaultMessagesCest
* @author Phalcon Team <team@phalcon.io>
* @since 2019-04-16
*/
public function filterValidationSetDefaultMessages(IntegrationTester $I)
public function filterValidationSetDefaultMessages(IntegrationTester $I): void
{
$I->wantToTest('Validation - setDefaultMessages()');

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Filter/Validation/SetEntityCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SetEntityCest
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-04-17
*/
public function filterValidationSetEntity(IntegrationTester $I)
public function filterValidationSetEntity(IntegrationTester $I): void
{
$I->wantToTest('Validation - setEntity()');

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/Filter/Validation/UnderscoreGetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class UnderscoreGetCest
*/
class UnderscoreGetCest
{
/**
Expand All @@ -26,7 +23,7 @@ class UnderscoreGetCest
* @author Phalcon Team <team@phalcon.io>
* @since 2019-04-16
*/
public function filterValidationUnderscoreGet(IntegrationTester $I)
public function filterValidationUnderscoreGet(IntegrationTester $I): void
{
$I->wantToTest('Validation - __get()');

Expand Down
5 changes: 1 addition & 4 deletions tests/integration/Filter/Validation/ValidateCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@

use function date;

/**
* Class ValidateCest
*/
class ValidateCest
{
/**
Expand All @@ -34,7 +31,7 @@ class ValidateCest
* @since 2016-06-27
* @issue 10405
*/
public function filterValidationValidateMessageToNonObject(IntegrationTester $I)
public function filterValidationValidateMessageToNonObject(IntegrationTester $I): void
{
$myValidator = new PresenceOf();
$validation = new Validation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class NewInstanceCest
* @author Phalcon Team <team@phalcon.io>
* @since 2019-05-18
*/
public function filterValidationValidatorFactoryNewInstance(IntegrationTester $I)
public function filterValidationValidatorFactoryNewInstance(IntegrationTester $I): void
{
$I->wantToTest('Validation\ValidatorFactory - newInstance()');

Expand Down

0 comments on commit 6e00fe0

Please sign in to comment.