Skip to content

Commit 97d4e4f

Browse files
committed
Review fixes
1 parent b5f14f1 commit 97d4e4f

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

ext/zend_test/test.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ trait _ZendTestTrait {
5151
/** @var mixed */
5252
public $testProp;
5353

54-
#[Attribute(Attribute::TARGET_METHOD)]
54+
#[ZendTestAttribute]
5555
public function testMethod(): bool {}
5656
}
5757

ext/zend_test/test_arginfo.h

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
gen_stub.php: Test that attributes are applied to methods
3+
--EXTENSIONS--
4+
zend_test
5+
--FILE--
6+
<?php
7+
8+
class Foo {
9+
use _ZendTestTrait;
10+
}
11+
12+
$reflection = new ReflectionMethod(Foo::class, "testMethod");
13+
14+
var_dump($reflection->getAttributes()[0]->getName());
15+
16+
?>
17+
--EXPECTF--
18+
string(%d) "ZendTestAttribute"

0 commit comments

Comments
 (0)