Skip to content

mrchetan/vscode-php-array-symbol-provider

Repository files navigation

Php Array Symbol Provider for VS Code

a symbol provider support for php arrays, similar to json files ex.

  • config
<?php

return [
    'connections' => [
        'pusher' => [
            'driver'  => 'pusher',
            'key'     => env('PUSHER_APP_KEY'),
            'secret'  => env('PUSHER_APP_SECRET'),
            'app_id'  => env('PUSHER_APP_ID'),
            'options' => [
                'host'      => env('PUSHER_HOST'),
            ]
        ],

        'ably' => [
            'driver' => 'ably',
            'key'    => env('ABLY_KEY'),
        ],

        // etc ...
    ],
];
  • class
<?php

class A
{
    private array $prop = [
        'hello',
        'world',
        'abc' => 1
    ];

    public function q() {
        $this->q = [
            'a',
            'b',
            'c' => 1
        ];

        $ss = [
            'x' => 0,
            'y' => 2,
            'z' => 1
        ];
    }

    public function method() {
        return [
            1,
            2,
            3,
        ];
    }
}
  • plain
<?php

$prop = [
    'hello',
    'world',
    'abc' => 1
];

function method() {
    $abc = [
        'x' => 0,
        'y' => 2,
        'z' => 1
    ];

    return [
        1,
        2,
        3,
    ];
}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published