From 99e026f3c5f3f79ebec2c2108d0acc4a436e3cb4 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 6 Oct 2019 02:13:34 +0200 Subject: [PATCH] Add phpDoc for objects using phpwaver This add phpDoc to some of the code in pts-core/objects, the types where determined by running debug-self-test through phpweaver for a few secounds and then manually verityfing the result. --- .../pts_concise_display_mode.php | 6 ++ .../objects/client/pts_argument_check.php | 13 +++- .../client/pts_test_install_request.php | 11 +++ pts-core/objects/nye_Xml/nye_XmlWriter.php | 15 ++++ .../nye_Xml/pts_config_nye_XmlReader.php | 10 +++ pts-core/objects/phodevi/phodevi_cache.php | 6 ++ .../phodevi/phodevi_device_property.php | 6 ++ pts-core/objects/phodevi/phodevi_vfs.php | 18 +++++ pts-core/objects/pts_exdep_generic_parser.php | 17 +++++ pts-core/objects/pts_storage_object.php | 25 +++++++ pts-core/objects/pts_test_file_download.php | 19 ++++++ pts-core/objects/pts_test_option.php | 68 +++++++++++++++++++ pts-core/objects/pts_test_profile.php | 56 +++++++++++++++ pts-core/objects/pts_test_profile_parser.php | 11 +++ pts-core/objects/pts_test_result.php | 13 ++++ pts-core/objects/pts_test_suite.php | 27 ++++++++ pts-core/objects/pts_virtual_test_suite.php | 3 + pts-core/pts-core.php | 22 ++++++ 18 files changed, 345 insertions(+), 1 deletion(-) diff --git a/pts-core/objects/client/display_modes/pts_concise_display_mode.php b/pts-core/objects/client/display_modes/pts_concise_display_mode.php index bbd6783ebe..77f0ef6ffd 100644 --- a/pts-core/objects/client/display_modes/pts_concise_display_mode.php +++ b/pts-core/objects/client/display_modes/pts_concise_display_mode.php @@ -522,6 +522,12 @@ public function generic_prompt($prompt_string) { echo $this->tab . $prompt_string; } + /** + * @param string $string + * @param bool $ending_line_break + * + * @return void + */ public function generic_heading($string, $ending_line_break = true) { static $shown_pts = false; diff --git a/pts-core/objects/client/pts_argument_check.php b/pts-core/objects/client/pts_argument_check.php index 3c0f6e14ad..085e7c4696 100644 --- a/pts-core/objects/client/pts_argument_check.php +++ b/pts-core/objects/client/pts_argument_check.php @@ -26,16 +26,27 @@ class pts_argument_check private $function_check; private $function_return_key; + /** + * @param int $index + * @param string[] $function + * @param $return_key set to null when you don't want it to be set + */ public function __construct($index, $function, $return_key = null) { $this->argument_index = $index; $this->function_check = $function; - $this->function_return_key = $return_key; // set to null when you don't want it to be set + $this->function_return_key = $return_key; } + /** + * @return int + */ public function get_argument_index() { return $this->argument_index; } + /** + * @return string[] + */ public function get_function_check() { return $this->function_check; diff --git a/pts-core/objects/client/pts_test_install_request.php b/pts-core/objects/client/pts_test_install_request.php index 1fe723e216..7382e823de 100644 --- a/pts-core/objects/client/pts_test_install_request.php +++ b/pts-core/objects/client/pts_test_install_request.php @@ -29,6 +29,9 @@ class pts_test_install_request public $install_error = null; public $special_environment_vars; + /** + * @param string $test + */ public function __construct($test) { if($test instanceof pts_test_profile) @@ -55,6 +58,9 @@ public function __toString() { return $this->test_profile->get_identifier(); } + /** + * @return pts_test_file_download[] + */ public function get_download_objects() { return $this->test_files; @@ -63,6 +69,11 @@ public function get_download_object_count() { return count($this->test_files); } + /** + * @param bool $do_file_checks + * + * @return void + */ public function generate_download_object_list($do_file_checks = true) { foreach($this->test_profile->get_downloads() as $download) diff --git a/pts-core/objects/nye_Xml/nye_XmlWriter.php b/pts-core/objects/nye_Xml/nye_XmlWriter.php index fffec0f148..8215f2c0d4 100644 --- a/pts-core/objects/nye_Xml/nye_XmlWriter.php +++ b/pts-core/objects/nye_Xml/nye_XmlWriter.php @@ -31,6 +31,9 @@ class nye_XmlWriter public $dom; protected $times_fallback = 0; + /** + * @param string $xsl_binding + */ public function __construct($xsl_binding = null, $force_nice_formatting = false) { $this->dom = new DOMDocument('1.0'); @@ -56,6 +59,12 @@ public function addXmlNodeWNE($xml_location, $xml_value = null) // When Not Empty, add the XML node return $xml_value === null || $xml_value === false ? false : $this->addXmlNode($xml_location, $xml_value); } + /** + * @param string $xml_location + * @param string|null $xml_value + * + * @return void + */ public function addXmlNode($xml_location, $xml_value = null) { $nodes = explode('/', $xml_location); @@ -101,6 +110,12 @@ public function addXmlNodeFromXG($xml_location, &$test_profile, $default_value = $this->addXmlNode($xml_location, $value); } + /** + * @param string $xml_location + * @param pts_config_nye_XmlReader $xml + * + * @return void + */ public function addXmlNodeFromReader($xml_location, &$xml, $default_value = null) { $value = $xml->getXmlValue($xml_location); diff --git a/pts-core/objects/nye_Xml/pts_config_nye_XmlReader.php b/pts-core/objects/nye_Xml/pts_config_nye_XmlReader.php index 46b3882661..c33d62aaf6 100644 --- a/pts-core/objects/nye_Xml/pts_config_nye_XmlReader.php +++ b/pts-core/objects/nye_Xml/pts_config_nye_XmlReader.php @@ -24,6 +24,10 @@ class pts_config_nye_XmlReader extends nye_XmlReader { protected $override_values; + /** + * @param string|null $new_values + * @param bool $override_file + */ public function __construct($new_values = null, $override_file = false) { if($override_file && is_file($override_file)) @@ -86,6 +90,12 @@ public function handleXmlZeroTagFallback($xml_tag, $fallback_value) return $fallback_value; } + /** + * @param string $xml_tag + * @param bool $fallback_value + * + * @return string + */ public function getXMLValue($xml_tag, $fallback_value = false) { if($this->override_values != false) diff --git a/pts-core/objects/phodevi/phodevi_cache.php b/pts-core/objects/phodevi/phodevi_cache.php index 1879cc837b..afb1a0a813 100644 --- a/pts-core/objects/phodevi/phodevi_cache.php +++ b/pts-core/objects/phodevi/phodevi_cache.php @@ -37,6 +37,12 @@ public function __construct($phodevi_cache, $storage_dir = null, $client_version $this->storage_dir = $storage_dir; $this->client_version = $client_version; } + /** + * @param string $storage_dir + * @param int $client_version + * + * @return array[] + */ public function restore_cache($storage_dir = null, $client_version = null) { $restore_cache = null; diff --git a/pts-core/objects/phodevi/phodevi_device_property.php b/pts-core/objects/phodevi/phodevi_device_property.php index ae834fde25..04fe1b9581 100644 --- a/pts-core/objects/phodevi/phodevi_device_property.php +++ b/pts-core/objects/phodevi/phodevi_device_property.php @@ -26,6 +26,9 @@ class phodevi_device_property private $object_function; private $cache_code; + /** + * @param bool $cache_code + */ public function __construct($function, $cache_code = false) { $this->object_function = $function; @@ -35,6 +38,9 @@ public function get_device_function() { return $this->object_function; } + /** + * @return bool + */ public function cache_code() { return $this->cache_code; diff --git a/pts-core/objects/phodevi/phodevi_vfs.php b/pts-core/objects/phodevi/phodevi_vfs.php index 2e5cb0af82..ad7475741f 100644 --- a/pts-core/objects/phodevi/phodevi_vfs.php +++ b/pts-core/objects/phodevi/phodevi_vfs.php @@ -119,6 +119,9 @@ public static function cleanse_file(&$file, $name = false) break; } } + /** + * @return void + */ public function clear_cache() { $this->cache = array(); @@ -127,6 +130,11 @@ public function cache_index() { return array_keys($this->cache); } + /** + * @param string $name + * + * @return string + */ public function __get($name) { // This assumes that isset() has been called on $name prior to actually trying to get it... @@ -198,6 +206,11 @@ public function __get($name) return false; } + /** + * @param string $name + * + * @return bool + */ public function __isset($name) { return isset($this->cache[$name]) || (PTS_IS_CLIENT && $this->cache_isset_names($name)); @@ -206,6 +219,11 @@ public function set_cache_item($name, $cache) { $this->cache[$name] = $cache; } + /** + * @param string $name + * + * @return bool + */ public function cache_isset_names($name) { // Cache the isset call names with their values when checking files/commands since Phodevi will likely hit each one potentially multiple times and little overhead to caching them diff --git a/pts-core/objects/pts_exdep_generic_parser.php b/pts-core/objects/pts_exdep_generic_parser.php index b786fe4b01..215d16bdb2 100644 --- a/pts-core/objects/pts_exdep_generic_parser.php +++ b/pts-core/objects/pts_exdep_generic_parser.php @@ -50,6 +50,13 @@ public static function get_external_dependency_path() { return PTS_CORE_PATH . 'external-test-dependencies/'; } + /** + * @param string $title + * @param string|null $file_check + * @param string|null $possible_packages + * + * @return (null|string)[] + */ public function get_package_format($title = null, $file_check = null, $possible_packages = null) { return array( @@ -62,10 +69,20 @@ public function get_available_packages() { return array_keys($this->struct['external-dependencies']['generic-packages']); } + /** + * @param string $package + * + * @return bool + */ public function is_package($package) { return isset($this->struct['external-dependencies']['generic-packages'][$package]); } + /** + * @param string $package + * + * @return string[] + */ public function get_package_data($package) { return $this->is_package($package) ? $this->struct['external-dependencies']['generic-packages'][$package] : $this->get_package_format(); diff --git a/pts-core/objects/pts_storage_object.php b/pts-core/objects/pts_storage_object.php index 2c84a54cf3..e377ef38d0 100644 --- a/pts-core/objects/pts_storage_object.php +++ b/pts-core/objects/pts_storage_object.php @@ -38,10 +38,18 @@ public function __construct($span_reboots = true, $span_versions = true) $this->pts_version = PTS_CORE_VERSION; $this->object_cache = array(); } + /** + * @param string identifier + * + * @return void + */ public function add_object($identifier, $object) { $this->object_cache[$identifier] = $object; } + /** + * @param string $identifier + */ public function read_object($identifier) { return isset($this->object_cache[$identifier]) ? $this->object_cache[$identifier] : false; @@ -50,10 +58,18 @@ public function remove_object($identifier) { unset($this->object_cache[$identifier]); } + /** + * @return array + */ public function get_objects() { return $this->object_cache; } + /** + * @param string $destination + * + * @return void + */ public function save_to_file($destination) { $this->object_cs = md5(serialize($this->get_objects())); // Checksum @@ -65,14 +81,23 @@ public function get_pts_version() { return $this->pts_version; } + /** + * @return string + */ public function get_object_checksum() { return $this->object_cs; } + /** + * @return bool + */ public function get_span_reboots() { return $this->span_reboots; } + /** + * @return bool + */ public function get_span_versions() { return $this->span_versions !== false; diff --git a/pts-core/objects/pts_test_file_download.php b/pts-core/objects/pts_test_file_download.php index 0437ab737c..0073a1fd9d 100644 --- a/pts-core/objects/pts_test_file_download.php +++ b/pts-core/objects/pts_test_file_download.php @@ -37,6 +37,16 @@ class pts_test_file_download private $download_location_type = null; private $download_location_path = null; + /** + * @param string|null $url + * @param string|null $filename + * @param int $filesize + * @param string|null $md5 + * @param string|null $sha256 + * @param string|null $platform + * @param string|null $architecture + * @param string|null $is_optional + */ public function __construct($url = null, $filename = null, $filesize = 0, $md5 = null, $sha256 = null, $platform = null, $architecture = null, $is_optional = false) { $this->filename = empty($filename) ? basename($url) : $filename; @@ -72,6 +82,9 @@ public function get_download_url_string() { return $this->url; } + /** + * @return string[] + */ public function get_platform_array() { return pts_strings::comma_explode($this->platform); @@ -80,6 +93,9 @@ public function get_platform_string() { return $this->platform; } + /** + * @return string[] + */ public function get_architecture_array() { return pts_strings::comma_explode($this->architecture); @@ -92,6 +108,9 @@ public function get_filename() { return $this->filename; } + /** + * @return string + */ public function get_filesize() { return $this->filesize; diff --git a/pts-core/objects/pts_test_option.php b/pts-core/objects/pts_test_option.php index 57d1c49ead..ef83751e82 100644 --- a/pts-core/objects/pts_test_option.php +++ b/pts-core/objects/pts_test_option.php @@ -31,20 +31,39 @@ class pts_test_option private $helper_message = null; private $options = array(); + /** + * @param string $identifier + * @param string $option + */ public function __construct($identifier, $option, $helper_message = null) { $this->identifier = $identifier; $this->option_name = $option; $this->helper_message = $helper_message; } + /** + * @param string $prefix + * + * @return void + */ public function set_option_prefix($prefix) { $this->prefix = $prefix; } + /** + * @param string $postfix + * + * @return void + */ public function set_option_postfix($postfix) { $this->postfix = $postfix; } + /** + * @param string $default_node + * + * @return void + */ public function set_option_default($default_node) { if($default_node == null || $default_node == "0") @@ -68,14 +87,23 @@ public function get_helper_message() { return $this->helper_message; } + /** + * @return string + */ public function get_name() { return $this->option_name; } + /** + * @return string + */ public function get_option_prefix() { return $this->prefix; } + /** + * @return string + */ public function get_option_postfix() { return $this->postfix; @@ -92,6 +120,13 @@ public function get_option_default() { return $this->default_entry == -1 ? $this->option_count() - 1 : $this->default_entry; } + /** + * @param string $name + * @param string $value + * @param string $message + * + * @return void + */ public function add_option($name, $value, $message) { $this->options[] = array('NAME' => $name, 'VALUE' => $value, 'MESSAGE' => $message); @@ -123,10 +158,20 @@ public function get_all_option_names_with_messages() return $names; } + /** + * @param int $index + * + * @return string + */ public function get_option_name($index) { return isset($this->options[$index]['NAME']) ? $this->options[$index]['NAME'] : null; } + /** + * @param int $index + * + * @return string + */ public function get_option_value($index) { return isset($this->options[$index]['VALUE']) ? $this->options[$index]['VALUE'] : null; @@ -135,26 +180,49 @@ public function get_option_message($index) { return isset($this->options[$index]['MESSAGE']) ? $this->options[$index]['MESSAGE'] : null; } + /** + * @return int + */ public function option_count() { return count($this->options); } + /** + * @param string $input + * + * @return string + */ public function format_option_value_from_input($input) { return $this->get_option_prefix() . $input . $this->get_option_postfix(); } + /** + * @param string $input + * + * @return string + */ public function format_option_display_from_input($input) { $name = $this->get_name(); return $name != null && $input != null ? $name . ': ' . $input : null; } + /** + * @param int $select_pos + * + * @return string + */ public function format_option_value_from_select($select_pos) { $input = $this->get_option_value($select_pos); return $this->format_option_value_from_input($input); } + /** + * @param int $select_pos + * + * @return string + */ public function format_option_display_from_select($select_pos) { $display_name = $this->get_option_name($select_pos); diff --git a/pts-core/objects/pts_test_profile.php b/pts-core/objects/pts_test_profile.php index 397b7edc7d..a7fd6b8947 100644 --- a/pts-core/objects/pts_test_profile.php +++ b/pts-core/objects/pts_test_profile.php @@ -24,6 +24,10 @@ class pts_test_profile extends pts_test_profile_parser { public $test_installation = false; + /** + * @param string $identifier + * @param bool $override_values + */ public function __construct($identifier = null, $override_values = null, $normal_init = true) { parent::__construct($identifier, $normal_init); @@ -52,6 +56,9 @@ public static function is_test_profile($identifier) } return $identifier != false && is_file(PTS_TEST_PROFILE_PATH . $identifier . '/test-definition.xml') ? $identifier : false; } + /** + * @return string + */ public function get_resource_dir() { return PTS_TEST_PROFILE_PATH . $this->identifier . '/'; @@ -84,6 +91,12 @@ public function set_override_values($override_values) } } } + /** + * @param bool $include_extensions + * @param int $divider + * + * @return int + */ public function get_download_size($include_extensions = true, $divider = 1048576) { $estimated_size = 0; @@ -117,6 +130,11 @@ public function get_download_size($include_extensions = true, $divider = 1048576 return $estimated_size; } + /** + * @param bool $include_extensions + * + * @return int + */ public function get_environment_size($include_extensions = true) { $estimated_size = parent::get_environment_size(); @@ -134,6 +152,9 @@ public function get_environment_size($include_extensions = true) return $estimated_size; } + /** + * @return string[] + */ public function get_test_extensions_recursive() { // Process Extensions / Cascading Test Profiles @@ -157,6 +178,9 @@ public function get_test_extensions_recursive() return $extensions; } + /** + * @return string[] + */ public function get_dependency_names() { $dependency_names = array(); @@ -209,6 +233,9 @@ public function get_times_to_run() return $times_to_run; } + /** + * @return int + */ public function get_estimated_run_time() { // get estimated run-time (in seconds) @@ -235,6 +262,11 @@ public function get_estimated_run_time() return $estimated_run_time; } + /** + * @param bool $report_warnings + * + * @return bool + */ public function is_supported($report_warnings = true) { $test_supported = true; @@ -279,6 +311,9 @@ public function is_supported($report_warnings = true) return $test_supported; } + /** + * @return bool + */ public function custom_test_support_check() { /* @@ -307,12 +342,18 @@ public function custom_test_support_check() return true; } + /** + * @return bool + */ public function is_test_architecture_supported() { // Check if the system's architecture is supported by a test $archs = $this->get_supported_architectures(); return !empty($archs) ? phodevi::cpu_arch_compatible($archs) : true; } + /** + * @return bool + */ public function is_core_version_supported() { // Check if the test profile's version is compatible with pts-core @@ -321,6 +362,9 @@ public function is_core_version_supported() return $core_version_min <= PTS_CORE_VERSION && $core_version_max > PTS_CORE_VERSION; } + /** + * @return bool + */ public function is_test_platform_supported() { // Check if the system's OS is supported by a test @@ -388,6 +432,9 @@ public function get_test_executable() return $exe; } + /** + * @return string + */ public function get_install_dir() { return pts_client::test_install_root_path() . $this->identifier . DIRECTORY_SEPARATOR; @@ -416,6 +463,9 @@ public function get_file_installer() return $installer; } + /** + * @return string|false + */ public function get_file_download_spec() { return is_file($this->get_resource_dir() . 'downloads.xml') ? $this->get_resource_dir() . 'downloads.xml' : false; @@ -437,6 +487,9 @@ public function get_file_parser_spec() return $spec; } + /** + * @return pts_test_profile[] + */ public function extended_test_profiles() { // Provide an array containing the location(s) of all test(s) for the supplied object name @@ -463,6 +516,9 @@ public function to_json() $simple_xml = simplexml_load_string($file); return json_encode($simple_xml); } + /** + * @return pts_test_file_download[] + */ public function get_downloads() { $download_xml_file = $this->get_file_download_spec(); diff --git a/pts-core/objects/pts_test_profile_parser.php b/pts-core/objects/pts_test_profile_parser.php index 64bf1da417..73bf427262 100644 --- a/pts-core/objects/pts_test_profile_parser.php +++ b/pts-core/objects/pts_test_profile_parser.php @@ -31,6 +31,9 @@ class pts_test_profile_parser private $file_location = false; public $no_fallbacks_on_null = false; + /** + * @param string|null $read + */ public function __construct($read = null, $normal_init = true) { $this->overrides = array(); @@ -126,6 +129,11 @@ public function xs($xpath, &$value) { $this->overrides[$xpath] = $value; } + /** + * @param string $xpath + * + * @return string|null + */ public function xg($xpath, $default_on_null = null) { if(isset($this->overrides[$xpath])) @@ -417,6 +425,9 @@ public function get_environment_size() { return $this->xg('TestProfile/EnvironmentSize', 0); } + /** + * @return string|null + */ public function get_test_extension() { return $this->xg('TestProfile/Extends'); diff --git a/pts-core/objects/pts_test_result.php b/pts-core/objects/pts_test_result.php index 49812f6519..52af6e86f3 100644 --- a/pts-core/objects/pts_test_result.php +++ b/pts-core/objects/pts_test_result.php @@ -45,6 +45,9 @@ class pts_test_result protected $already_normalized = false; public $dynamically_generated = false; + /** + * @param pts_test_profile $test_profile + */ public function __construct($test_profile) { $this->test_profile = clone $test_profile; @@ -64,6 +67,11 @@ public function set_test_result_buffer(&$test_result_buffer) { $this->test_result_buffer = $test_result_buffer; } + /** + * @param string $arguments_description + * + * @return void + */ public function set_used_arguments_description($arguments_description) { $this->used_arguments_description = $arguments_description; @@ -115,6 +123,11 @@ public function get_result_precision() return $this->result_precision; } + /** + * @param string $used_arguments + * + * @return void + */ public function set_used_arguments($used_arguments) { $this->used_arguments = $used_arguments; diff --git a/pts-core/objects/pts_test_suite.php b/pts-core/objects/pts_test_suite.php index eeffa71094..d523058c14 100644 --- a/pts-core/objects/pts_test_suite.php +++ b/pts-core/objects/pts_test_suite.php @@ -39,6 +39,9 @@ class pts_test_suite static $temp_suite; protected $xml_file_location = false; + /** + * @param string $identifier + */ public function __construct($identifier = null) { $this->test_objects = array(); @@ -185,6 +188,11 @@ public function __construct($identifier = null) } } } + /** + * @param pts_test_suite $suite + * + * @return void + */ public function add_suite_tests_to_suite($suite) { foreach($suite->get_contained_test_result_objects() as $test_result) @@ -192,6 +200,13 @@ public function add_suite_tests_to_suite($suite) $this->test_objects[] = $test_result; } } + /** + * @param pts_test_profile $test + * @param string|null $arguments + * @param string|null $arguments_description + * + * @return void + */ public function add_to_suite($test, $arguments = null, $arguments_description = null) { if(!($test instanceof pts_test_profile)) @@ -264,6 +279,9 @@ public function needs_updated_install() return false; } + /** + * @return int + */ public function is_supported($report_warnings = false) { $supported_size = $original_size = count($this->test_objects); @@ -300,6 +318,9 @@ public function get_unique_test_count() } return count($unique_tests); } + /** + * @return pts_test_result[] + */ public function get_contained_test_result_objects() { return $this->test_objects; @@ -379,6 +400,9 @@ public function set_title($s) { $this->title = $s; } + /** + * @return string + */ public function get_title() { return $this->title; @@ -403,6 +427,9 @@ public function set_suite_type($s) { $this->test_type = $s; } + /** + * @return string + */ public function get_suite_type() { return $this->test_type; diff --git a/pts-core/objects/pts_virtual_test_suite.php b/pts-core/objects/pts_virtual_test_suite.php index af970d23db..7f5cc9506f 100644 --- a/pts-core/objects/pts_virtual_test_suite.php +++ b/pts-core/objects/pts_virtual_test_suite.php @@ -33,6 +33,9 @@ class pts_virtual_test_suite private $is_virtual_installed = false; private $is_virtual_everything = false; + /** + * @param string $identifier + */ public function __construct($identifier) { $this->identifier = $identifier; diff --git a/pts-core/pts-core.php b/pts-core/pts-core.php index cf4eff5321..611bb2fae1 100644 --- a/pts-core/pts-core.php +++ b/pts-core/pts-core.php @@ -93,6 +93,11 @@ public static function program_title($show_codename = false) return 'Phoronix Test Suite v' . PTS_VERSION . ($show_codename ? ' (' . pts_core::codename() . ')' : null); } } +/** + * @param string $name + * + * @return void + */ function pts_define($name, $value = null) { static $defines; @@ -109,6 +114,9 @@ function pts_define($name, $value = null) $defines[$name] = $value; define($name, $value); } +/** + * @return void + */ function pts_define_directories() { // User's home directory for storing results, module files, test installations, etc. @@ -203,6 +211,9 @@ function pts_define_directories() pts_define('PTS_TEST_PROFILE_PATH', PTS_INTERNAL_OB_CACHE . 'test-profiles/'); } } +/** + * @return array[] + */ function pts_needed_extensions() { return array( @@ -306,6 +317,12 @@ function pts_version_codenames() if(PTS_IS_CLIENT || defined('PTS_AUTO_LOAD_OBJECTS')) { + /** + * @param string $dir + * @param string[] $files + * + * @return void + */ function pts_build_dir_php_list($dir, &$files) { if($dh = opendir($dir)) @@ -328,6 +345,11 @@ function pts_build_dir_php_list($dir, &$files) } closedir($dh); } + /** + * @param string $to_load + * + * @return bool + */ function pts_auto_load_class($to_load) { static $obj_files = null;