diff --git a/gulpfile.js b/gulpfile.js index f35e848..11a4122 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,7 +1,7 @@ /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ const { src, dest, series, parallel, watch } = require('gulp'); @@ -43,4 +43,4 @@ function watch_php() { } exports.default = series(watch_php); -exports.help = help; \ No newline at end of file +exports.help = help; diff --git a/src/bootstrap/auto_loader.php b/src/bootstrap/auto_loader.php index 4caf8df..5edb50b 100644 --- a/src/bootstrap/auto_loader.php +++ b/src/bootstrap/auto_loader.php @@ -6,6 +6,8 @@ namespace bs_tts; /** * @author http://php-fig.org/ + * @copyright Copyright (c) 2013-2017 PHP Framework Interop Group + * @license MIT * @site https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md */ class Psr4AutoloaderClass { diff --git a/src/bootstrap/common.php b/src/bootstrap/common.php index 3a9f81d..4ede048 100644 --- a/src/bootstrap/common.php +++ b/src/bootstrap/common.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace bs_tts; diff --git a/src/bootstrap/errors.php b/src/bootstrap/errors.php index 091808b..4eceab5 100644 --- a/src/bootstrap/errors.php +++ b/src/bootstrap/errors.php @@ -7,7 +7,7 @@ namespace bs_tts; /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ define('WORD_WRAP_CHRS', 80); // Letters before Line Wrap on Errors diff --git a/src/bootstrap/requires.php b/src/bootstrap/requires.php index c83fd6d..6defc14 100644 --- a/src/bootstrap/requires.php +++ b/src/bootstrap/requires.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace bs_tts; diff --git a/src/classes/api.php b/src/classes/api.php index d5eb8c4..1652568 100644 --- a/src/classes/api.php +++ b/src/classes/api.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/app.php b/src/classes/app.php index 1f0f5c0..c04555d 100644 --- a/src/classes/app.php +++ b/src/classes/app.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/assets.php b/src/classes/assets.php index e8ecdc8..c6cf0dc 100644 --- a/src/classes/assets.php +++ b/src/classes/assets.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/console_app.php b/src/classes/console_app.php index 1b75f76..8033d6d 100644 --- a/src/classes/console_app.php +++ b/src/classes/console_app.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/database/dummy_data.php b/src/classes/database/dummy_data.php index 7853728..fbf5ac2 100644 --- a/src/classes/database/dummy_data.php +++ b/src/classes/database/dummy_data.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\database; diff --git a/src/classes/database/model.php b/src/classes/database/model.php index b8069f9..17d01f9 100644 --- a/src/classes/database/model.php +++ b/src/classes/database/model.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\database; diff --git a/src/classes/database/paginate.php b/src/classes/database/paginate.php index 1c0354f..8ce5353 100644 --- a/src/classes/database/paginate.php +++ b/src/classes/database/paginate.php @@ -5,6 +5,10 @@ declare(strict_types=1); /** * FROM site: * @link https://code.tutsplus.com/tutorials/how-to-paginate-data-with-php--net-2928 + * @author Jason + * @copyright 12/30/2020 + * + * Emailed on July 30th, 2023 for permission to use/license type */ namespace tts\database; diff --git a/src/classes/enum/safer_io_enums.php b/src/classes/enum/safer_io_enums.php index 8354238..1c45737 100644 --- a/src/classes/enum/safer_io_enums.php +++ b/src/classes/enum/safer_io_enums.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\enum; diff --git a/src/classes/extras/safer_sql.php b/src/classes/extras/safer_sql.php index 3e65308..e6a8203 100644 --- a/src/classes/extras/safer_sql.php +++ b/src/classes/extras/safer_sql.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ /** diff --git a/src/classes/html.php b/src/classes/html.php index 84b2afb..cb895c9 100644 --- a/src/classes/html.php +++ b/src/classes/html.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/html_document.php b/src/classes/html_document.php index 30e1bfd..b81868e 100644 --- a/src/classes/html_document.php +++ b/src/classes/html_document.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/loadall.php b/src/classes/loadall.php index a0198de..37b183c 100644 --- a/src/classes/loadall.php +++ b/src/classes/loadall.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/memory_usage.php b/src/classes/memory_usage.php index 6daae6e..eb68f9b 100644 --- a/src/classes/memory_usage.php +++ b/src/classes/memory_usage.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/misc.php b/src/classes/misc.php index 7ee37f7..f224038 100644 --- a/src/classes/misc.php +++ b/src/classes/misc.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/obsolete/http_socket_request.php b/src/classes/obsolete/http_socket_request.php index 81ef70e..1a0dbc3 100644 --- a/src/classes/obsolete/http_socket_request.php +++ b/src/classes/obsolete/http_socket_request.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ /** diff --git a/src/classes/page_not_found.php b/src/classes/page_not_found.php index 673ef57..3c2bc69 100644 --- a/src/classes/page_not_found.php +++ b/src/classes/page_not_found.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/random_engine.php b/src/classes/random_engine.php index 718d019..8f8f3f3 100644 --- a/src/classes/random_engine.php +++ b/src/classes/random_engine.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/router.php b/src/classes/router.php index 95012d8..f53fd5e 100644 --- a/src/classes/router.php +++ b/src/classes/router.php @@ -3,8 +3,9 @@ declare(strict_types=1); /** - * @ MIT License + * @license MIT * @copyright (c) 2018, Patrik MokrĂ˝ + * @author Patrik MokrĂ˝ * @link https://github.com/MokryPatrik/PHP-Router */ @@ -558,9 +559,11 @@ class router } } - // Call method - $returned = call_user_func_array([$controller, $method], $resortedParams); - return ["found"=> true, "returned"=> $returned]; + //Call method + if (method_exists($controller, $method)) { + $returned = call_user_func_array([$controller, $method], $resortedParams); + return ["found"=> true, "returned"=> $returned]; + } } } } diff --git a/src/classes/security.php b/src/classes/security.php index b3e94a6..b24afc7 100644 --- a/src/classes/security.php +++ b/src/classes/security.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; @@ -253,6 +253,7 @@ final class security { $line = fgets($file_handle); $pos = strpos($line, ' * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services\cache; diff --git a/src/classes/services/cache/redis_db.php b/src/classes/services/cache/redis_db.php index 75661b2..d6136be 100644 --- a/src/classes/services/cache/redis_db.php +++ b/src/classes/services/cache/redis_db.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services\cache; diff --git a/src/classes/services/emailer.php b/src/classes/services/emailer.php index eed86e4..10c5e9f 100644 --- a/src/classes/services/emailer.php +++ b/src/classes/services/emailer.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services; diff --git a/src/classes/services/encryption.php b/src/classes/services/encryption.php index a4055d6..219f0b6 100644 --- a/src/classes/services/encryption.php +++ b/src/classes/services/encryption.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services; diff --git a/src/classes/services/http_requests/http_curl_request.php b/src/classes/services/http_requests/http_curl_request.php index a64e23f..38b8a94 100644 --- a/src/classes/services/http_requests/http_curl_request.php +++ b/src/classes/services/http_requests/http_curl_request.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services\http_requests; diff --git a/src/classes/services/log.php b/src/classes/services/log.php index 4073640..9a1e030 100644 --- a/src/classes/services/log.php +++ b/src/classes/services/log.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services; diff --git a/src/classes/services/paragon_crypto/crypto.php b/src/classes/services/paragon_crypto/crypto.php index 6f52109..9c8b187 100644 --- a/src/classes/services/paragon_crypto/crypto.php +++ b/src/classes/services/paragon_crypto/crypto.php @@ -2,9 +2,9 @@ declare(strict_types=1); /* - * @author Paragon Initiative Enterprises - * @copyright MIT - * https://paragonie.com/book/pecl-libsodium/read/05-publickey-crypto.md + * @license ISC + * @copyright Copyright (c) 2016-2023, Paragon Initiative Enterprises + * @link https://paragonie.com/book/pecl-libsodium/read/05-publickey-crypto.md */ namespace tts\services\paragon_crypto; diff --git a/src/classes/services/paragon_crypto/password_storage.php b/src/classes/services/paragon_crypto/password_storage.php index 65be14d..678a922 100644 --- a/src/classes/services/paragon_crypto/password_storage.php +++ b/src/classes/services/paragon_crypto/password_storage.php @@ -5,9 +5,9 @@ declare(strict_types=1); namespace tts\services\paragon_crypto; /* - * @author Paragon Initiative Enterprises - * @copyright MIT - * https://github.com/paragonie/pecl-libsodium-doc/blob/master/chapters/09-recipes.md + * @copyright Paragon Initiative Enterprises + * @license Creative Commons Attribution 4.0 International / ISC + * @link https://github.com/paragonie/pecl-libsodium-doc/blob/master/chapters/09-recipes.md */ class password_storage { diff --git a/src/classes/services/paragon_crypto/sodium_storage.php b/src/classes/services/paragon_crypto/sodium_storage.php index 75672a2..17ce07b 100644 --- a/src/classes/services/paragon_crypto/sodium_storage.php +++ b/src/classes/services/paragon_crypto/sodium_storage.php @@ -3,8 +3,8 @@ declare(strict_types=1); /** + * @license MIT/ISC * @author Robert Strutts, Original works by Paragon Initiative Enterprises - * @license MIT * @link https://github.com/paragonie/pecl-libsodium-doc/blob/master/chapters/09-recipes.md * * I've added HKDF extracts a pseudorandom key (PRK) using an HMAC hash function diff --git a/src/classes/services/sessions/cookie_sessions.php b/src/classes/services/sessions/cookie_sessions.php index 5ee66d8..d45674c 100644 --- a/src/classes/services/sessions/cookie_sessions.php +++ b/src/classes/services/sessions/cookie_sessions.php @@ -7,7 +7,7 @@ namespace tts\services\sessions; /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ class cookie_sessions_handler_exception extends \Exception {} diff --git a/src/classes/services/sessions/file_sessions.php b/src/classes/services/sessions/file_sessions.php index 5a23a56..599d98d 100644 --- a/src/classes/services/sessions/file_sessions.php +++ b/src/classes/services/sessions/file_sessions.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services\sessions; diff --git a/src/classes/services/sessions/redis_sessions.php b/src/classes/services/sessions/redis_sessions.php index 05978a6..974ab1a 100644 --- a/src/classes/services/sessions/redis_sessions.php +++ b/src/classes/services/sessions/redis_sessions.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\services\sessions; diff --git a/src/classes/services/simple_rest.php b/src/classes/services/simple_rest.php index 49f1d74..193d7a3 100644 --- a/src/classes/services/simple_rest.php +++ b/src/classes/services/simple_rest.php @@ -19,7 +19,9 @@ class simple_rest { return ['uri' => $uri, 'method' => $request_method]; } - // https://developer.okta.com/blog/2019/03/08/simple-rest-api-php + /** + * @link https://developer.okta.com/blog/2019/03/08/simple-rest-api-php + */ public function set_http_headers($content_type = "application/json; charset=UTF-8", $status_code = 200) { $status_message = $this->get_http_status_message($status_code); header("Access-Control-Allow-Origin: *"); @@ -30,7 +32,9 @@ class simple_rest { header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"); } - // https://phppot.com/php/php-restful-web-service/ + /** + * @link https://phppot.com/php/php-restful-web-service/ + */ public function get_http_status_message($status_code): string { return match ($status_code) { 100 => 'Continue', diff --git a/src/classes/session_management.php b/src/classes/session_management.php index 3e8d107..59dffc1 100644 --- a/src/classes/session_management.php +++ b/src/classes/session_management.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/tag_matches.php b/src/classes/tag_matches.php index 1481d5b..6e2882d 100644 --- a/src/classes/tag_matches.php +++ b/src/classes/tag_matches.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/time_zones.php b/src/classes/time_zones.php index b63c0c9..c7c619a 100644 --- a/src/classes/time_zones.php +++ b/src/classes/time_zones.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/classes/traits/database/validation.php b/src/classes/traits/database/validation.php index 79316d6..9740422 100644 --- a/src/classes/traits/database/validation.php +++ b/src/classes/traits/database/validation.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts\traits\database; diff --git a/src/classes/traits/security/session_hijacking_functions.php b/src/classes/traits/security/session_hijacking_functions.php index 868176f..7bb4cae 100644 --- a/src/classes/traits/security/session_hijacking_functions.php +++ b/src/classes/traits/security/session_hijacking_functions.php @@ -4,7 +4,8 @@ declare(strict_types=1); namespace tts\traits\security; /** - * @site https://gist.github.com/ohidxy/cc361bb40fb3fbb3fe9112c99d51f69e + * author site did not work to contact him July 30th, 2023 + * @link https://gist.github.com/ohidxy/cc361bb40fb3fbb3fe9112c99d51f69e * Codes to prevent SESSION Hijacking and Fixation in PHP */ diff --git a/src/classes/validator.php b/src/classes/validator.php index 9a0582a..ccf2bef 100644 --- a/src/classes/validator.php +++ b/src/classes/validator.php @@ -3,6 +3,7 @@ declare(strict_types=1); /** + * Emailed contact us form on July, 30th, 2023 for permission to use, author, and copyright... * @link https://www.phptutorial.net/php-tutorial/php-validation/ */ diff --git a/src/classes/view.php b/src/classes/view.php index 5b1514a..bdbe049 100644 --- a/src/classes/view.php +++ b/src/classes/view.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace tts; diff --git a/src/compiler.php b/src/compiler.php index fe2803d..8f25c0d 100644 --- a/src/compiler.php +++ b/src/compiler.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ $show_authors = true; diff --git a/src/main.inc.php b/src/main.inc.php index ca49023..8a184fa 100644 --- a/src/main.inc.php +++ b/src/main.inc.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ namespace main_tts; diff --git a/src/views/on_error/404_page.php b/src/views/on_error/404_page.php index e94dbda..e95324b 100644 --- a/src/views/on_error/404_page.php +++ b/src/views/on_error/404_page.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ $protocol = "HTTP/1.0"; diff --git a/src/views/on_error/prod_error.php b/src/views/on_error/prod_error.php index 99b91cb..0749939 100644 --- a/src/views/on_error/prod_error.php +++ b/src/views/on_error/prod_error.php @@ -5,7 +5,7 @@ declare(strict_types=1); /** * @author Robert Strutts * @copyright Copyright (c) 2022, Robert Strutts. - * @license https://mit-license.org/ + * @license MIT */ define('PRODUCTION', 600);