Files
cacti/tests/fixtures/Core/PublicMethodContractProbe.php
T
Thomas Vincent 08d0f94f24 Fix develop client behavior, popup isolation and PHP method visibility (#8292)
* fix(core): correct client state and declare public method contracts

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(security): isolate Midwinter external homepage popup

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(client): isolate menu state and simplify validated JavaScript guards

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(auth): use certificate expiry truth in rendering assertions

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* refactor(js): remove unused local storage while retaining initializer calls

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(js): encode inline translated values through the shared JSON boundary

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* style(js): wrap encoded translation literals without changing messages

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* fix(client): remove unused checkbox reads from graph resizing

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* refactor(client): declare repeated function locals once

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(ui): run column width regression in browser CI

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-10-11 21:15:39 -04:00

50 lines
1.8 KiB
PHP

<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2026 The Cacti Group |
| Licensed under the GNU General Public License, version 2 or later. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDtool-based Graphing Solution |
+-------------------------------------------------------------------------+
*/
require_once dirname(__DIR__, 3) . '/lib/ping.php';
require_once dirname(__DIR__, 3) . '/lib/ldap.php';
require_once dirname(__DIR__, 3) . '/lib/mib_cache.php';
require_once dirname(__DIR__, 3) . '/lib/mib_parser.php';
$contracts = [];
foreach (['Net_Ping', 'Ldap', 'MibParser'] as $class) {
foreach ((new ReflectionClass($class))->getMethods() as $method) {
if ($method->getDeclaringClass()->getName() !== $class) {
continue;
}
$parameters = [];
foreach ($method->getParameters() as $parameter) {
$parameters[] = [
'name' => $parameter->getName(),
'reference' => $parameter->isPassedByReference(),
'variadic' => $parameter->isVariadic(),
'type' => $parameter->hasType() ? (string) $parameter->getType() : null,
'optional' => $parameter->isOptional(),
'default' => !$parameter->isDefaultValueAvailable() ? null :
($parameter->isDefaultValueConstant() ?
['constant' => $parameter->getDefaultValueConstantName()] :
['value' => $parameter->getDefaultValue()]),
];
}
$contracts[$class . '::' . $method->getName()] = [
'public' => $method->isPublic(),
'static' => $method->isStatic(),
'parameters' => $parameters,
'return' => $method->hasReturnType() ? (string) $method->getReturnType() : null,
];
}
}
print json_encode($contracts, JSON_THROW_ON_ERROR);