Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
add unit test error_reporting
add strict mode to new files
  • Loading branch information
k0ka committed Jan 21, 2024
1 parent ea71c10 commit ddf7d31
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion phpunit.sample.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value=""/>
<ini name="error_reporting" value="-1"/>
<ini name="display_errors" value="On"/>
<ini name="display_startup_errors" value="On"/>
</php>
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value=""/>
<ini name="error_reporting" value="-1"/>
<ini name="display_errors" value="On"/>
<ini name="display_startup_errors" value="On"/>
</php>
Expand Down
8 changes: 4 additions & 4 deletions src/Networking/v2/Extensions/Layer3/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function tenantIdJson(): array
];
}

public function floatingNetworkIdJson()
public function floatingNetworkIdJson(): array
{
return [
'type' => self::STRING_TYPE,
Expand All @@ -28,7 +28,7 @@ public function floatingNetworkIdJson()
];
}

public function fixedIpAddressJson()
public function fixedIpAddressJson(): array
{
return [
'type' => self::STRING_TYPE,
Expand All @@ -37,7 +37,7 @@ public function fixedIpAddressJson()
];
}

public function floatingIpAddressJson()
public function floatingIpAddressJson(): array
{
return [
'type' => self::STRING_TYPE,
Expand All @@ -46,7 +46,7 @@ public function floatingIpAddressJson()
];
}

public function portIdJson()
public function portIdJson(): array
{
return [
'type' => self::STRING_TYPE,
Expand Down
2 changes: 2 additions & 0 deletions src/Networking/v2/Extensions/Layer3/ServiceTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace OpenStack\Networking\v2\Extensions\Layer3;

use OpenStack\Networking\v2\Extensions\Layer3\Models\FloatingIp;
Expand Down
2 changes: 2 additions & 0 deletions src/Networking/v2/Extensions/SecurityGroups/ApiTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace OpenStack\Networking\v2\Extensions\SecurityGroups;

/**
Expand Down
18 changes: 9 additions & 9 deletions src/Networking/v2/Extensions/SecurityGroups/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@
*/
class Params extends \OpenStack\Networking\v2\Params
{
public function directionJson()
public function directionJson(): array
{
return [
'type' => self::STRING_TYPE,
'description' => 'Ingress or egress: the direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.',
];
}

public function ethertypeJson()
public function ethertypeJson(): array
{
return [
'type' => self::STRING_TYPE,
'description' => 'Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.',
];
}

public function idJson()
public function idJson(): array
{
return [
'type' => self::STRING_TYPE,
'description' => 'The UUID of the security group rule.',
];
}

public function portRangeMaxJson()
public function portRangeMaxJson(): array
{
return [
'type' => self::STRING_TYPE,
Expand All @@ -42,7 +42,7 @@ public function portRangeMaxJson()
];
}

public function portRangeMinJson()
public function portRangeMinJson(): array
{
return [
'sentAs' => 'port_range_min',
Expand All @@ -51,15 +51,15 @@ public function portRangeMinJson()
];
}

public function protocolJson()
public function protocolJson(): array
{
return [
'type' => self::STRING_TYPE,
'description' => 'The protocol that is matched by the security group rule. Value is null, icmp, icmpv6, tcp, or udp.',
];
}

public function remoteGroupIdJson()
public function remoteGroupIdJson(): array
{
return [
'sentAs' => 'remote_group_id',
Expand All @@ -68,7 +68,7 @@ public function remoteGroupIdJson()
];
}

public function remoteIpPrefixJson()
public function remoteIpPrefixJson(): array
{
return [
'sentAs' => 'remote_ip_prefix',
Expand All @@ -77,7 +77,7 @@ public function remoteIpPrefixJson()
];
}

public function securityGroupIdJson()
public function securityGroupIdJson(): array
{
return [
'sentAs' => 'security_group_id',
Expand Down
2 changes: 2 additions & 0 deletions src/Networking/v2/Extensions/SecurityGroups/ParamsTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace OpenStack\Networking\v2\Extensions\SecurityGroups;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Networking/v2/Extensions/SecurityGroups/ServiceTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace OpenStack\Networking\v2\Extensions\SecurityGroups;

use OpenStack\Networking\v2\Extensions\SecurityGroups\Models\SecurityGroup;
Expand Down

0 comments on commit ddf7d31

Please sign in to comment.