Skip to content

Commit 911f9fb

Browse files
committed
Rename to structs
1 parent 0c2ed9e commit 911f9fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+127
-114
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Data classes implementing ArrayAccess
2+
Structs implementing ArrayAccess
33
--FILE--
44
<?php
55

@@ -23,19 +23,19 @@ abstract class VectorBase implements ArrayAccess {
2323
}
2424
}
2525

26-
data class VectorByVal extends VectorBase {
26+
struct VectorByVal extends VectorBase {
2727
public function offsetGet(mixed $offset): mixed {
2828
return $this->elements[$offset];
2929
}
3030
}
3131

32-
data class VectorByRef extends VectorBase {
32+
struct VectorByRef extends VectorBase {
3333
public function &offsetGet(mixed $offset): mixed {
3434
return $this->elements[$offset];
3535
}
3636
}
3737

38-
data class Box {
38+
struct Box {
3939
public function __construct(
4040
public int $value,
4141
) {}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
Assign op on data classes
2+
Assign op on structs
33
--FILE--
44
<?php
55

6-
data class Box {
6+
struct Box {
77
public function __construct(
88
public $value,
99
) {}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
Assign ref on data classes
2+
Assign ref on structs
33
--FILE--
44
<?php
55

6-
data class Box {
6+
struct Box {
77
public $value;
88
}
99

Zend/tests/data_classes/assign_to_self.phpt renamed to Zend/tests/structs/assign_to_self.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
Send data classes
2+
Send structs
33
--FILE--
44
<?php
55

6-
data class Box {
6+
struct Box {
77
public function __construct(
88
public $value,
99
) {}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
Basic data classes
2+
Basic structs
33
--FILE--
44
<?php
55

6-
data class Point {
6+
struct Point {
77
public function __construct(
88
public int $x,
99
public int $y,

Zend/tests/data_classes/interior_immutability.phpt renamed to Zend/tests/structs/interior_immutability.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
Basic data classes
2+
Basic structs
33
--FILE--
44
<?php
55

6-
data class Child {
6+
struct Child {
77
public function __construct(
88
public $value,
99
) {}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
=== on data classes
2+
=== on structs
33
--FILE--
44
<?php
55

6-
data class Box {
6+
struct Box {
77
public function __construct(
88
public $value,
99
) {}
@@ -29,7 +29,7 @@ foreach ($values as $l) {
2929
}
3030

3131
#[\AllowDynamicProperties]
32-
data class Point {}
32+
struct Point {}
3333

3434
$a = new Point();
3535
$a->x = 1;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
--TEST--
2-
Iteration of data classes
2+
Iteration of structs
33
--FILE--
44
<?php
55

66
#[AllowDynamicProperties]
7-
data class Box {
7+
struct Box {
88
public $value;
99
}
1010

Zend/tests/data_classes/mutatin_in_ordinary_class.phpt renamed to Zend/tests/structs/mutatin_in_ordinary_class.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ class Point {
99

1010
?>
1111
--EXPECTF--
12-
Fatal error: Mutating modifier may only be added to data class methods in %s on line %d
12+
Fatal error: Mutating modifier may only be added to struct methods in %s on line %d

Zend/tests/data_classes/mutating_call_verification.phpt renamed to Zend/tests/structs/mutating_call_verification.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--TEST--
2-
Mutating method calls on data classes
2+
Mutating method calls on structs
33
--FILE--
44
<?php
55

6-
data class D {
6+
struct D {
77
public function nonMutating() {
88
echo __FUNCTION__, "\n";
99
}

0 commit comments

Comments
 (0)