atom/language-php

PHP Attributes not fully supported

Closed this issue · 1 comments

<?php

#[Attribute]
class Test {
	function __construct(array $data) {}
}

$data = [
    'value' => true
];

function method1(#[Test(['value' => true])] $data) {}

function method2(
	#[Test(['value' => true])]
	$data
) {}

function method3(
	#[Test([
        	'value' => true
	])]
	$data
) {}

The first #[Attribute] has the meta.attribute.php scope so that seems correct. The other attributes don't. The first #[Test... has

meta.function.parameters.php
meta.function.php
source.php
...

Are the other usages maybe not handled correctly?

Thanks for reporting, PR #416