Skip to content

Commit cf1d4fe

Browse files
committed
Merge branch 'php8'
2 parents 06d948c + a3a3063 commit cf1d4fe

File tree

5 files changed

+1598
-8
lines changed

5 files changed

+1598
-8
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.test_fs
22
build/
33
vendor/
4-
composer.lock

PHPCtags.class.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class PHPCtags
77
{
8-
const VERSION = '0.8.1';
8+
const VERSION = '0.9.0';
99

1010
private $mFile;
1111

@@ -323,14 +323,16 @@ private function render($structure)
323323
if (in_array('s', $this->mOptions['fields']) && !empty($struct['scope'])) {
324324
// $scope, $type, $name are current scope variables
325325
$scope = array_pop($struct['scope']);
326-
list($type, $name) = each($scope);
326+
$type = key($scope);
327+
$name = current($scope);
327328
switch ($type) {
328329
case 'class':
329330
// n_* stuffs are namespace related scope variables
330331
// current > class > namespace
331332
$n_scope = array_pop($struct['scope']);
332333
if(!empty($n_scope)) {
333-
list($n_type, $n_name) = each($n_scope);
334+
$n_type = key($n_scope);
335+
$n_name = current($n_scope);
334336
$s_str = 'class:' . $n_name . '\\' . $name;
335337
} else {
336338
$s_str = 'class:' . $name;
@@ -340,10 +342,12 @@ private function render($structure)
340342
// c_* stuffs are class related scope variables
341343
// current > method > class > namespace
342344
$c_scope = array_pop($struct['scope']);
343-
list($c_type, $c_name) = each($c_scope);
345+
$c_type = key($c_scope);
346+
$c_name = current($c_scope);
344347
$n_scope = array_pop($struct['scope']);
345348
if(!empty($n_scope)) {
346-
list($n_type, $n_name) = each($n_scope);
349+
$n_type = key($n_scope);
350+
$n_name = current($n_scope);
347351
$s_str = 'method:' . $n_name . '\\' . $c_name . '::' . $name;
348352
} else {
349353
$s_str = 'method:' . $c_name . '::' . $name;

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "library",
66
"require": {
77
"php": ">=7.0",
8-
"nikic/php-parser": "^4.5"
8+
"nikic/php-parser": "^4.10"
99
},
1010
"require-dev": {
1111
"phpunit/phpunit": "^6.5"

0 commit comments

Comments
 (0)