Code clean up for Basic Class clean up

Fix all other class code for calling former Basic class methods.
Also try to replace all remaining array() calls to [] type

Some docblock updates when missing or wrong set
This commit is contained in:
Clemens Schwaighofer
2021-06-14 15:00:02 +09:00
parent cb17b553b0
commit 3035287b5c
26 changed files with 228 additions and 199 deletions

View File

@@ -27,6 +27,7 @@ $LOG_FILE_ID = 'classTest-json';
ob_end_flush();
use CoreLibs\Check\Jason;
use CoreLibs\Debug\Support as DgS;
$basic = new CoreLibs\Basic();
$json_class = 'CoreLibs\Check\Jason';
@@ -39,29 +40,29 @@ print '<div><a href="class_test.php">Class Test Master</a></div>';
$json = '{"foo": "bar"}';
$output = Jason::jsonConvertToArray($json);
print "S::JSON: $json: ".$basic->printAr($output)."<br>";
print "S::JSON: $json: ".DgS::printAr($output)."<br>";
print "S::JSON ERROR: ".Jason::jsonGetLastError().": ".Jason::jsonGetLastError(true)."<br>";
$json = '["f: {b"""ar}]';
$output = Jason::jsonConvertToArray($json);
print "S::E-JSON: $json: ".$basic->printAr($output)."<br>";
print "S::E-JSON: $json: ".DgS::printAr($output)."<br>";
print "S::E-JSON ERROR: ".Jason::jsonGetLastError().": ".Jason::jsonGetLastError(true)."<br>";
// direct
$json = '{"direct": "static function call"}';
$output = $json_class::jsonConvertToArray($json);
print "J/S::JSON: $json: ".$basic->printAr($output)."<br>";
print "J/S::JSON: $json: ".DgS::printAr($output)."<br>";
print "J/S::JSON ERROR: ".$json_class::jsonGetLastError().": ".$json_class::jsonGetLastError(true)."<br>";
$json = '["f: {b"""ar}]';
$output = $json_class::jsonConvertToArray($json);
print "J/S::E-JSON: $json: ".$basic->printAr($output)."<br>";
print "J/S::E-JSON: $json: ".DgS::printAr($output)."<br>";
print "J/S::E-JSON ERROR: ".$json_class::jsonGetLastError().": ".$json_class::jsonGetLastError(true)."<br>";
// DEPRECATE TEST
/* $json = '["f: {b"""ar}]';
$output = $basic->jsonConvertToArray($json);
print "E-JSON: $json: ".$basic->printAr($output)."<br>";
print "E-JSON: $json: ".DgS::printAr($output)."<br>";
print "E-JSON ERROR: ".$basic->jsonGetLastError().": ".$basic->jsonGetLastError(true)."<br>"; */
// error message