From 58b17906f512866c2e34844fa497ecdf7f1e1e3d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 3 Feb 2020 13:41:31 +0100 Subject: Apply tidy formatting Mostly reindent PHP scripts to spaces. --- scripts/dev/search_underscores.php | 72 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'scripts/dev/search_underscores.php') diff --git a/scripts/dev/search_underscores.php b/scripts/dev/search_underscores.php index 5c2016e489..ff766bcf1f 100755 --- a/scripts/dev/search_underscores.php +++ b/scripts/dev/search_underscores.php @@ -34,38 +34,38 @@ $classes = array_merge(get_declared_classes(), get_declared_interfaces()); $extensions = array(); foreach(get_loaded_extensions() as $ext) { - $cnt_modules++; - if (strpos($ext, "_") !== false) { - $err++; - $extensions[$ext] = array(); - } + $cnt_modules++; + if (strpos($ext, "_") !== false) { + $err++; + $extensions[$ext] = array(); + } } $cnt_classes = count($classes); foreach($classes as $c) { - if (strpos($c, "_") !== false) { - $err++; - $ref = new ReflectionClass($c); - if (!($ext = $ref->getExtensionName())) {; - $ext = $ref->isInternal() ? "" : ""; - } - if (!array_key_exists($ext, $extensions)) { - $extensions[$ext] = array(); - } - $extensions[$ext][$c] = array(); - foreach(get_class_methods($c) as $method) { - $cnt_methods++; - if (strpos(substr($method, substr($method, 0, 2) != "__" ? 0 : 2), "_") !== false) { - $err++; - $extensions[$ext][$c][] = $method; - } - } - } - else - { - $cnt_methods += count(get_class_methods($c)); - } + if (strpos($c, "_") !== false) { + $err++; + $ref = new ReflectionClass($c); + if (!($ext = $ref->getExtensionName())) {; + $ext = $ref->isInternal() ? "" : ""; + } + if (!array_key_exists($ext, $extensions)) { + $extensions[$ext] = array(); + } + $extensions[$ext][$c] = array(); + foreach(get_class_methods($c) as $method) { + $cnt_methods++; + if (strpos(substr($method, substr($method, 0, 2) != "__" ? 0 : 2), "_") !== false) { + $err++; + $extensions[$ext][$c][] = $method; + } + } + } + else + { + $cnt_methods += count(get_class_methods($c)); + } } $cnt = $cnt_modules + $cnt_classes + $cnt_methods; @@ -81,15 +81,15 @@ printf("\n"); ksort($extensions); foreach($extensions as $ext => &$classes) { - echo "Extension: $ext\n"; - ksort($classes); - foreach($classes as $classname => &$methods) { - echo " Class: $classname\n"; - ksort($methods); - foreach($methods as $method) { - echo " Method: $method\n"; - } - } + echo "Extension: $ext\n"; + ksort($classes); + foreach($classes as $classname => &$methods) { + echo " Class: $classname\n"; + ksort($methods); + foreach($methods as $method) { + echo " Method: $method\n"; + } + } } printf("\n"); -- cgit v1.2.1