From b7ec33cd5618f2e4d31fbc2df2f95879c8b7e07a Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" <51850998+paulbalandan@users.noreply.github.com> Date: Sat, 24 Jul 2021 19:30:51 +0800 Subject: [PATCH] Remove superfluous phpdoc tags (#4941) --- app/Config/Format.php | 2 - app/Config/Mimes.php | 3 - app/Controllers/BaseController.php | 4 - system/API/ResponseTrait.php | 22 +-- system/Autoloader/Autoloader.php | 14 -- system/Autoloader/FileLocator.php | 31 ---- system/BaseModel.php | 24 --- system/CLI/BaseCommand.php | 28 +-- system/CLI/CLI.php | 47 +---- system/CLI/CommandRunner.php | 4 - system/CLI/Commands.php | 13 -- system/CLI/Console.php | 6 - system/CLI/Exceptions/CLIException.php | 3 - system/CLI/GeneratorTrait.php | 39 ---- system/Cache/CacheFactory.php | 4 - system/Cache/CacheInterface.php | 2 - system/Cache/Exceptions/CacheException.php | 2 - system/Cache/Handlers/DummyHandler.php | 2 - system/Cache/Handlers/FileHandler.php | 8 - system/Cache/Handlers/MemcachedHandler.php | 4 - system/Cache/Handlers/PredisHandler.php | 4 - system/Cache/Handlers/RedisHandler.php | 4 - system/Cache/Handlers/WincacheHandler.php | 4 - system/CodeIgniter.php | 34 ---- system/Commands/Cache/ClearCache.php | 2 - system/Commands/Cache/InfoCache.php | 2 - system/Commands/Database/CreateDatabase.php | 2 - system/Commands/Database/Migrate.php | 2 - system/Commands/Database/MigrateRefresh.php | 2 - system/Commands/Database/MigrateRollback.php | 2 - system/Commands/Database/Seed.php | 2 - system/Commands/Encryption/GenerateKey.php | 25 --- .../Commands/Generators/CommandGenerator.php | 6 - .../Commands/Generators/ConfigGenerator.php | 6 - .../Generators/ControllerGenerator.php | 6 - .../Commands/Generators/EntityGenerator.php | 2 - .../Commands/Generators/FilterGenerator.php | 2 - system/Commands/Generators/MigrateCreate.php | 2 - .../Generators/MigrationGenerator.php | 10 - system/Commands/Generators/ModelGenerator.php | 6 - .../Commands/Generators/ScaffoldGenerator.php | 2 - .../Commands/Generators/SeederGenerator.php | 2 - .../Generators/SessionMigrationGenerator.php | 10 - .../Generators/ValidationGenerator.php | 2 - system/Commands/Help.php | 2 - .../Commands/Housekeeping/ClearDebugbar.php | 2 - system/Commands/Housekeeping/ClearLogs.php | 2 - system/Commands/ListCommands.php | 6 - system/Commands/Utilities/Environment.php | 4 - system/Commands/Utilities/Namespaces.php | 2 - system/Commands/Utilities/Routes.php | 2 - system/Common.php | 87 +-------- system/ComposerScripts.php | 11 -- system/Config/BaseConfig.php | 9 +- system/Config/BaseService.php | 22 +-- system/Config/Config.php | 1 - system/Config/DotEnv.php | 25 --- system/Config/Factories.php | 15 -- system/Config/Services.php | 100 +--------- system/Controller.php | 8 - system/Cookie/CloneableCookieInterface.php | 18 -- system/Cookie/Cookie.php | 22 --- system/Cookie/CookieInterface.php | 32 ---- system/Cookie/CookieStore.php | 39 ---- system/Cookie/Exceptions/CookieException.php | 6 - system/Database/BaseBuilder.php | 172 +++--------------- system/Database/BaseConnection.php | 116 +----------- system/Database/BasePreparedQuery.php | 21 +-- system/Database/BaseResult.php | 35 ---- system/Database/BaseUtils.php | 14 -- system/Database/Config.php | 4 - system/Database/ConnectionInterface.php | 24 +-- system/Database/Database.php | 17 -- system/Database/Exceptions/DataException.php | 8 - system/Database/Forge.php | 57 +----- system/Database/MigrationRunner.php | 46 +---- system/Database/ModelFactory.php | 1 - system/Database/MySQLi/Builder.php | 2 - system/Database/MySQLi/Connection.php | 40 ---- system/Database/MySQLi/Forge.php | 8 - system/Database/MySQLi/PreparedQuery.php | 9 +- system/Database/MySQLi/Result.php | 10 - system/Database/MySQLi/Utils.php | 2 - system/Database/Postgre/Builder.php | 34 ---- system/Database/Postgre/Connection.php | 40 ---- system/Database/Postgre/Forge.php | 14 -- system/Database/Postgre/PreparedQuery.php | 13 +- system/Database/Postgre/Result.php | 10 - system/Database/Postgre/Utils.php | 2 - system/Database/PreparedQueryInterface.php | 9 +- system/Database/Query.php | 49 +---- system/Database/QueryInterface.php | 21 +-- system/Database/ResultInterface.php | 31 ---- system/Database/SQLSRV/Builder.php | 40 +--- system/Database/SQLSRV/Connection.php | 40 ---- system/Database/SQLSRV/Forge.php | 21 --- system/Database/SQLSRV/PreparedQuery.php | 11 +- system/Database/SQLSRV/Result.php | 10 - system/Database/SQLSRV/Utils.php | 2 - system/Database/SQLite3/Builder.php | 6 - system/Database/SQLite3/Connection.php | 40 ---- system/Database/SQLite3/Forge.php | 26 +-- system/Database/SQLite3/PreparedQuery.php | 9 +- system/Database/SQLite3/Result.php | 10 - system/Database/SQLite3/Table.php | 11 -- system/Database/SQLite3/Utils.php | 2 - system/Database/Seeder.php | 11 -- system/Debug/Exceptions.php | 40 ---- system/Debug/Iterator.php | 8 - system/Debug/Timer.php | 6 - system/Debug/Toolbar.php | 26 +-- .../Toolbar/Collectors/BaseCollector.php | 28 --- system/Debug/Toolbar/Collectors/Config.php | 2 - system/Debug/Toolbar/Collectors/Database.php | 10 - system/Debug/Toolbar/Collectors/Events.php | 8 - system/Debug/Toolbar/Collectors/Files.php | 8 - system/Debug/Toolbar/Collectors/History.php | 8 - system/Debug/Toolbar/Collectors/Logs.php | 6 - system/Debug/Toolbar/Collectors/Routes.php | 6 - system/Debug/Toolbar/Collectors/Timers.php | 2 - system/Debug/Toolbar/Collectors/Views.php | 8 - system/Email/Email.php | 2 + system/Encryption/Encryption.php | 2 - .../Exceptions/EncryptionException.php | 2 - system/Encryption/Handlers/BaseHandler.php | 4 - system/Entity/Entity.php | 26 --- system/Entity/Exceptions/CastException.php | 6 - system/Events/Events.php | 13 +- system/Exceptions/DebugTraceableTrait.php | 4 - system/Files/File.php | 19 -- system/Filters/Exceptions/FilterException.php | 4 - system/Filters/FilterInterface.php | 7 +- system/Filters/Filters.php | 26 +-- system/Filters/Honeypot.php | 7 +- system/Format/Exceptions/FormatException.php | 4 - system/Format/Format.php | 6 - system/Format/XMLFormatter.php | 1 - system/HTTP/CLIRequest.php | 16 -- system/HTTP/CURLRequest.php | 82 +-------- system/HTTP/ContentSecurityPolicy.php | 37 +--- system/HTTP/DownloadResponse.php | 23 --- system/HTTP/Exceptions/HTTPException.php | 31 ---- system/HTTP/Files/FileCollection.php | 12 -- system/HTTP/Files/UploadedFile.php | 16 -- system/HTTP/Files/UploadedFileInterface.php | 16 -- system/HTTP/Header.php | 7 - system/HTTP/IncomingRequest.php | 41 ----- system/HTTP/Message.php | 12 -- system/HTTP/MessageInterface.php | 11 -- system/HTTP/MessageTrait.php | 15 -- system/HTTP/Negotiate.php | 49 +---- system/HTTP/RedirectResponse.php | 14 +- system/HTTP/Request.php | 6 - system/HTTP/RequestInterface.php | 4 - system/HTTP/RequestTrait.php | 5 +- system/HTTP/Response.php | 5 - system/HTTP/ResponseInterface.php | 32 +--- system/HTTP/ResponseTrait.php | 29 +-- system/HTTP/URI.php | 62 +------ system/HTTP/UserAgent.php | 36 ---- system/Helpers/array_helper.php | 9 - system/Helpers/cookie_helper.php | 7 - system/Helpers/date_helper.php | 4 - system/Helpers/filesystem_helper.php | 28 +-- system/Helpers/form_helper.php | 121 ++---------- system/Helpers/html_helper.php | 72 +------- system/Helpers/inflector_helper.php | 22 --- system/Helpers/number_helper.php | 20 +- system/Helpers/security_helper.php | 12 -- system/Helpers/test_helper.php | 1 + system/Helpers/text_helper.php | 48 ----- system/Helpers/url_helper.php | 45 +---- system/Helpers/xml_helper.php | 5 - system/Honeypot/Honeypot.php | 10 - system/I18n/Exceptions/I18nException.php | 15 -- system/I18n/Time.php | 123 +------------ system/I18n/TimeDifference.php | 21 --- system/Images/Handlers/BaseHandler.php | 53 +----- system/Images/Handlers/GDHandler.php | 27 +-- system/Images/Handlers/ImageMagickHandler.php | 23 --- system/Images/Image.php | 4 - system/Images/ImageHandlerInterface.php | 27 +-- system/Language/Language.php | 34 +--- system/Log/Handlers/BaseHandler.php | 12 -- system/Log/Handlers/ChromeLoggerHandler.php | 4 - system/Log/Handlers/ErrorlogHandler.php | 7 - system/Log/Handlers/FileHandler.php | 4 - system/Log/Handlers/HandlerInterface.php | 8 - system/Log/Logger.php | 35 ---- system/Model.php | 10 - system/Modules/Modules.php | 4 - system/Pager/Pager.php | 80 +------- system/Pager/PagerInterface.php | 53 ------ system/Pager/PagerRenderer.php | 32 ---- system/RESTful/BaseResource.php | 4 - system/RESTful/ResourceController.php | 2 - system/Router/Exceptions/RouterException.php | 5 - system/Router/RouteCollection.php | 149 +-------------- system/Router/RouteCollectionInterface.php | 22 +-- system/Router/Router.php | 21 +-- system/Router/RouterInterface.php | 3 +- system/Security/Security.php | 30 --- system/Security/SecurityInterface.php | 16 -- system/Session/Handlers/ArrayHandler.php | 10 - system/Session/Handlers/BaseHandler.php | 13 -- system/Session/Handlers/DatabaseHandler.php | 19 -- system/Session/Handlers/FileHandler.php | 13 -- system/Session/Handlers/MemcachedHandler.php | 17 -- system/Session/Handlers/RedisHandler.php | 17 -- system/Session/Session.php | 9 - system/Session/SessionInterface.php | 4 - system/Test/CIUnitTestCase.php | 27 +-- system/Test/Constraints/SeeInDatabase.php | 13 -- system/Test/ControllerResponse.php | 4 - system/Test/ControllerTestTrait.php | 7 +- system/Test/ControllerTester.php | 7 +- system/Test/DOMParser.php | 41 +---- system/Test/DatabaseTestTrait.php | 21 --- system/Test/Fabricator.php | 10 - system/Test/FeatureTestCase.php | 40 +--- system/Test/FeatureTestTrait.php | 40 +--- system/Test/FilterTestTrait.php | 6 - system/Test/Mock/MockCache.php | 2 - system/Test/Mock/MockCommon.php | 2 - system/Test/Mock/MockConnection.php | 54 +----- system/Test/Mock/MockLanguage.php | 8 - system/Test/Mock/MockResult.php | 8 - system/Test/TestLogger.php | 4 - system/Test/TestResponse.php | 50 +---- system/Throttle/Throttler.php | 10 - system/Throttle/ThrottlerInterface.php | 2 - system/Typography/Typography.php | 21 +-- system/Validation/CreditCardRules.php | 7 - system/Validation/FileRules.php | 30 --- system/Validation/FormatRules.php | 63 ------- system/Validation/Rules.php | 57 +----- system/Validation/Validation.php | 68 +------ system/Validation/ValidationInterface.php | 26 --- system/View/Cell.php | 13 +- system/View/Filters.php | 68 +------ system/View/Parser.php | 77 +------- system/View/Plugins.php | 22 --- system/View/RendererInterface.php | 15 +- system/View/Table.php | 2 - system/View/View.php | 41 +---- tests/_support/Autoloader/FatalLocator.php | 6 - tests/_support/Commands/Unsuffixable.php | 2 - tests/_support/Config/Services.php | 1 - tests/_support/Log/Handlers/TestHandler.php | 2 - tests/_support/Services.php | 4 - .../system/Cache/Handlers/BaseHandlerTest.php | 2 + .../system/Cache/Handlers/FileHandlerTest.php | 3 + tests/system/Commands/GenerateKeyTest.php | 2 - tests/system/CommonFunctionsTest.php | 3 + tests/system/CommonSingleServiceTest.php | 8 - tests/system/Config/MimesTest.php | 4 + tests/system/Cookie/CookieTest.php | 7 - tests/system/Database/BaseQueryTest.php | 3 + tests/system/Database/Builder/WhereTest.php | 4 + tests/system/Debug/ExceptionsTest.php | 3 + tests/system/Email/EmailTest.php | 2 + tests/system/Format/XMLFormatterTest.php | 3 - tests/system/HTTP/CLIRequestTest.php | 4 + tests/system/HTTP/IncomingRequestTest.php | 3 + tests/system/HTTP/MessageTest.php | 4 + tests/system/HTTP/RequestTest.php | 4 + tests/system/HTTP/URITest.php | 18 ++ tests/system/Helpers/ArrayHelperTest.php | 19 +- .../system/Helpers/URLHelper/MiscUrlTest.php | 47 +++++ tests/system/Language/LanguageTest.php | 2 + .../Log/Handlers/ErrorlogHandlerTest.php | 2 - tests/system/Models/DeleteModelTest.php | 6 + tests/system/Models/FindModelTest.php | 9 + tests/system/Models/GeneralModelTest.php | 7 - tests/system/Models/LiveModelTestCase.php | 5 - tests/system/Router/RouteCollectionTest.php | 4 + tests/system/Test/DOMParserTest.php | 4 + tests/system/Test/FeatureTestTraitTest.php | 4 + .../system/Validation/CreditCardRulesTest.php | 3 - tests/system/Validation/FormatRulesTest.php | 4 + tests/system/Validation/RulesTest.php | 10 + tests/system/Validation/ValidationTest.php | 20 +- tests/system/View/ParserTest.php | 3 + utils/PhpCsFixer/CodeIgniter4.php | 19 +- 284 files changed, 376 insertions(+), 4810 deletions(-) diff --git a/app/Config/Format.php b/app/Config/Format.php index fb2bfde593..533540e279 100644 --- a/app/Config/Format.php +++ b/app/Config/Format.php @@ -64,8 +64,6 @@ class Format extends BaseConfig /** * A Factory method to return the appropriate formatter for the given mime type. * - * @param string $mime - * * @return FormatterInterface * * @deprecated This is an alias of `\CodeIgniter\Format\Format::getFormatter`. Use that instead. diff --git a/app/Config/Mimes.php b/app/Config/Mimes.php index 628dd0db2f..973fb39849 100644 --- a/app/Config/Mimes.php +++ b/app/Config/Mimes.php @@ -485,8 +485,6 @@ class Mimes /** * Attempts to determine the best mime type for the given file extension. * - * @param string $extension - * * @return string|null The mime type found, or none if unable to determine. */ public static function guessTypeFromExtension(string $extension) @@ -503,7 +501,6 @@ class Mimes /** * Attempts to determine the best file extension for a given mime type. * - * @param string $type * @param string|null $proposedExtension - default extension (in case there is more than one with the same mime type) * * @return string|null The extension determined, or null if unable to match. diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index ce357b843f..0328f140bf 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -39,10 +39,6 @@ class BaseController extends Controller /** * Constructor. - * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param LoggerInterface $logger */ public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { diff --git a/system/API/ResponseTrait.php b/system/API/ResponseTrait.php index d83238f66e..f1be275cc9 100644 --- a/system/API/ResponseTrait.php +++ b/system/API/ResponseTrait.php @@ -87,7 +87,6 @@ trait ResponseTrait * * @param array|string|null $data * @param int $status - * @param string $message * * @return mixed */ @@ -125,9 +124,8 @@ trait ResponseTrait * Used for generic failures that no custom methods exist for. * * @param array|string $messages - * @param int $status HTTP status code - * @param string|null $code Custom, API-specific, error code - * @param string $customMessage + * @param int $status HTTP status code + * @param string|null $code Custom, API-specific, error code * * @return mixed */ @@ -207,9 +205,7 @@ trait ResponseTrait * or had bad authorization credentials. User is encouraged to try again * with the proper information. * - * @param string $description * @param string $code - * @param string $message * * @return mixed */ @@ -222,9 +218,7 @@ trait ResponseTrait * Used when access is always denied to this resource and no amount * of trying again will help. * - * @param string $description * @param string $code - * @param string $message * * @return mixed */ @@ -236,9 +230,7 @@ trait ResponseTrait /** * Used when a specified resource cannot be found. * - * @param string $description * @param string $code - * @param string $message * * @return mixed */ @@ -250,9 +242,7 @@ trait ResponseTrait /** * Used when the data provided by the client cannot be validated. * - * @param string $description * @param string $code - * @param string $message * * @return mixed * @@ -267,8 +257,6 @@ trait ResponseTrait * Used when the data provided by the client cannot be validated on one or more fields. * * @param string|string[] $errors - * @param string|null $code - * @param string $message * * @return mixed */ @@ -280,9 +268,7 @@ trait ResponseTrait /** * Use when trying to create a new resource and it already exists. * - * @param string $description * @param string $code - * @param string $message * * @return mixed */ @@ -296,9 +282,7 @@ trait ResponseTrait * Not Found, because here we know the data previously existed, but is now gone, * where Not Found means we simply cannot find any information about it. * - * @param string $description * @param string $code - * @param string $message * * @return mixed */ @@ -310,9 +294,7 @@ trait ResponseTrait /** * Used when the user has made too many requests for the resource recently. * - * @param string $description * @param string $code - * @param string $message * * @return mixed */ diff --git a/system/Autoloader/Autoloader.php b/system/Autoloader/Autoloader.php index 53d5654905..dfe1c72a55 100644 --- a/system/Autoloader/Autoloader.php +++ b/system/Autoloader/Autoloader.php @@ -80,9 +80,6 @@ class Autoloader * Reads in the configuration array (described above) and stores * the valid parts that we'll need. * - * @param Autoload $config - * @param Modules $modules - * * @return $this */ public function initialize(Autoload $config, Modules $modules) @@ -136,7 +133,6 @@ class Autoloader * Registers namespaces with the autoloader. * * @param array|string $namespace - * @param string|null $path * * @return $this */ @@ -168,8 +164,6 @@ class Autoloader * * If a prefix param is set, returns only paths to the given prefix. * - * @param string|null $prefix - * * @return array */ public function getNamespace(?string $prefix = null) @@ -184,8 +178,6 @@ class Autoloader /** * Removes a single namespace from the psr4 settings. * - * @param string $namespace - * * @return $this */ public function removeNamespace(string $namespace) @@ -200,8 +192,6 @@ class Autoloader /** * Load a class using available class mapping. * - * @param string $class - * * @return false|string */ public function loadClassmap(string $class) @@ -266,8 +256,6 @@ class Autoloader /** * A central way to include a file. Split out primarily for testing purposes. * - * @param string $file - * * @return false|string The filename on success, false if the file is not loaded */ protected function includeFile(string $file) @@ -292,8 +280,6 @@ class Autoloader * dashes with a single dash. Trim period, dash and underscore from beginning * and end of filename. * - * @param string $filename - * * @return string The sanitized filename */ public function sanitizeFilename(string $filename): string diff --git a/system/Autoloader/FileLocator.php b/system/Autoloader/FileLocator.php index 00d4a8ffe9..882815b213 100644 --- a/system/Autoloader/FileLocator.php +++ b/system/Autoloader/FileLocator.php @@ -28,8 +28,6 @@ class FileLocator /** * Constructor - * - * @param Autoloader $autoloader */ public function __construct(Autoloader $autoloader) { @@ -118,10 +116,6 @@ class FileLocator /** * Examines a file and returns the fully qualified domain name. - * - * @param string $file - * - * @return string */ public function getClassname(string $file): string { @@ -175,12 +169,6 @@ class FileLocator * 'app/Modules/foo/Config/Routes.php', * 'app/Modules/bar/Config/Routes.php', * ] - * - * @param string $path - * @param string $ext - * @param bool $prioritizeApp - * - * @return array */ public function search(string $path, string $ext = 'php', bool $prioritizeApp = true): array { @@ -214,11 +202,6 @@ class FileLocator /** * Ensures a extension is at the end of a filename - * - * @param string $path - * @param string $ext - * - * @return string */ protected function ensureExt(string $path, string $ext): string { @@ -272,8 +255,6 @@ class FileLocator * Find the qualified name of a file according to * the namespace of the first matched namespace path. * - * @param string $path - * * @return false|string The qualified name or false if the path is not found */ public function findQualifiedNameFromPath(string $path) @@ -315,10 +296,6 @@ class FileLocator /** * Scans the defined namespaces, returning a list of all files * that are contained within the subpath specified by $path. - * - * @param string $path - * - * @return array */ public function listFiles(string $path): array { @@ -350,11 +327,6 @@ class FileLocator /** * Scans the provided namespace, returning a list of all files * that are contained within the subpath specified by $path. - * - * @param string $prefix - * @param string $path - * - * @return array */ public function listNamespaceFiles(string $prefix, string $path): array { @@ -388,9 +360,6 @@ class FileLocator * Checks the app folder to see if the file can be found. * Only for use with filenames that DO NOT include namespacing. * - * @param string $file - * @param string|null $folder - * * @return false|string The path to the file, or false if not found. */ protected function legacyLocate(string $file, ?string $folder = null) diff --git a/system/BaseModel.php b/system/BaseModel.php index 12747fef78..172776c658 100644 --- a/system/BaseModel.php +++ b/system/BaseModel.php @@ -387,8 +387,6 @@ abstract class BaseModel * * @param array|int|string|null $id ID * @param array|null $data Data - * - * @return bool */ abstract protected function doUpdate($id = null, $data = null): bool; @@ -658,8 +656,6 @@ abstract class BaseModel * @param array|object $data Data * * @throws ReflectionException - * - * @return bool */ public function save($data): bool { @@ -685,8 +681,6 @@ abstract class BaseModel * If this method return false insert operation will be executed * * @param array|object $data Data - * - * @return bool */ protected function shouldUpdate($data): bool { @@ -839,8 +833,6 @@ abstract class BaseModel * @param array|object|null $data Data * * @throws ReflectionException - * - * @return bool */ public function update($id = null, $data = null): bool { @@ -1142,8 +1134,6 @@ abstract class BaseModel * @param array $data Data * * @throws DataException - * - * @return array */ protected function doProtectFields(array $data): array { @@ -1339,8 +1329,6 @@ abstract class BaseModel * specified in the class property, $validationRules. * * @param array|object $data Data - * - * @return bool */ public function validate($data): bool { @@ -1371,8 +1359,6 @@ abstract class BaseModel * can be used elsewhere, if needed. * * @param array $options Options - * - * @return array */ public function getValidationRules(array $options = []): array { @@ -1396,8 +1382,6 @@ abstract class BaseModel /** * Returns the model's define validation messages so they * can be used elsewhere, if needed. - * - * @return array */ public function getValidationMessages(): array { @@ -1411,8 +1395,6 @@ abstract class BaseModel * * @param array $rules Array containing field name and rule * @param array|null $data Data - * - * @return array */ protected function cleanValidationRules(array $rules, ?array $data = null): array { @@ -1588,8 +1570,6 @@ abstract class BaseModel * @throws DataException * @throws InvalidArgumentException * @throws ReflectionException - * - * @return array */ protected function transformDataToArray($data, string $type): array { @@ -1643,8 +1623,6 @@ abstract class BaseModel * Checks for the existence of properties across this model, and db connection. * * @param string $name Name - * - * @return bool */ public function __isset(string $name): bool { @@ -1693,8 +1671,6 @@ abstract class BaseModel * @codeCoverageIgnore * * @deprecated use fillPlaceholders($rules, $data) from Validation instead - * - * @return array */ protected function fillPlaceholders(array $rules, array $data): array { diff --git a/system/CLI/BaseCommand.php b/system/CLI/BaseCommand.php index 2d15f15f57..62957f76a4 100644 --- a/system/CLI/BaseCommand.php +++ b/system/CLI/BaseCommand.php @@ -89,9 +89,6 @@ abstract class BaseCommand /** * BaseCommand constructor. - * - * @param LoggerInterface $logger - * @param Commands $commands */ public function __construct(LoggerInterface $logger, Commands $commands) { @@ -102,17 +99,12 @@ abstract class BaseCommand /** * Actually execute a command. * This has to be over-ridden in any concrete implementation. - * - * @param array $params */ abstract public function run(array $params); /** * Can be used by a command to run other commands. * - * @param string $command - * @param array $params - * * @throws ReflectionException * * @return mixed @@ -124,8 +116,6 @@ abstract class BaseCommand /** * A simple method to display an error with line/file, in child commands. - * - * @param Throwable $e */ protected function showError(Throwable $e) { @@ -184,12 +174,7 @@ abstract class BaseCommand /** * Pads our string out so that all titles are the same length to nicely line up descriptions. * - * @param string $item - * @param int $max - * @param int $extra How many extra spaces to add at the end - * @param int $indent - * - * @return string + * @param int $extra How many extra spaces to add at the end */ public function setPad(string $item, int $max, int $extra = 2, int $indent = 0): string { @@ -201,11 +186,6 @@ abstract class BaseCommand /** * Get pad for $key => $value array output * - * @param array $array - * @param int $pad - * - * @return int - * * @deprecated Use setPad() instead. * * @codeCoverageIgnore @@ -224,8 +204,6 @@ abstract class BaseCommand /** * Makes it simple to access our protected properties. * - * @param string $key - * * @return mixed */ public function __get(string $key) @@ -235,10 +213,6 @@ abstract class BaseCommand /** * Makes it simple to check our protected properties. - * - * @param string $key - * - * @return bool */ public function __isset(string $key): bool { diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index be3d444fbe..4821800983 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -178,8 +178,6 @@ class CLI * * @param string $prefix * - * @return string - * * @codeCoverageIgnore */ public static function input(?string $prefix = null): string @@ -273,8 +271,6 @@ class CLI * @param string $value Input value * @param array|string $rules Validation rules * - * @return bool - * * @codeCoverageIgnore */ protected static function validate(string $field, string $value, $rules): bool @@ -302,10 +298,6 @@ class CLI /** * Outputs a string to the CLI without any surrounding newlines. * Useful for showing repeating elements on a single line. - * - * @param string $text - * @param string|null $foreground - * @param string|null $background */ public static function print(string $text = '', ?string $foreground = null, ?string $background = null) { @@ -342,9 +334,7 @@ class CLI /** * Outputs an error to the CLI using STDERR instead of STDOUT * - * @param string $text The text to output, or array of errors - * @param string $foreground - * @param string|null $background + * @param string $text The text to output, or array of errors */ public static function error(string $text, string $foreground = 'light_red', ?string $background = null) { @@ -404,8 +394,6 @@ class CLI /** * if operating system === windows - * - * @return bool */ public static function isWindows(): bool { @@ -510,8 +498,6 @@ class CLI * and ignores styles set by the color() function * * @param string $string - * - * @return int */ public static function strlen(?string $string): int { @@ -536,10 +522,7 @@ class CLI * Checks whether the current stream resource supports or * refers to a valid terminal type device. * - * @param string $function * @param resource $resource - * - * @return bool */ public static function streamSupports(string $function, $resource): bool { @@ -564,8 +547,6 @@ class CLI * Reference: https://github.com/composer/xdebug-handler/blob/master/src/Process.php * * @param resource $resource - * - * @return bool */ public static function hasColorSupport($resource): bool { @@ -593,10 +574,6 @@ class CLI /** * Attempts to determine the width of the viewable CLI window. - * - * @param int $default - * - * @return int */ public static function getWidth(int $default = 80): int { @@ -609,10 +586,6 @@ class CLI /** * Attempts to determine the height of the viewable CLI window. - * - * @param int $default - * - * @return int */ public static function getHeight(int $default = 32): int { @@ -677,7 +650,6 @@ class CLI * to update it. Set $thisStep = false to erase the progress bar. * * @param bool|int $thisStep - * @param int $totalSteps */ public static function showProgress($thisStep = 1, int $totalSteps = 10) { @@ -716,10 +688,6 @@ class CLI * short descriptions that need to start on an existing line. * * @param string $string - * @param int $max - * @param int $padLeft - * - * @return string */ public static function wrap(?string $string = null, int $max = 0, int $padLeft = 0): string { @@ -804,8 +772,6 @@ class CLI * Returns the command line string portions of the arguments, minus * any options, as a string. This is used to pass along to the main * CodeIgniter application. - * - * @return string */ public static function getURI(): string { @@ -823,8 +789,6 @@ class CLI * * **IMPORTANT:** The index here is one-based instead of zero-based. * - * @param int $index - * * @return mixed|null */ public static function getSegment(int $index) @@ -834,8 +798,6 @@ class CLI /** * Returns the raw array of segments found. - * - * @return array */ public static function getSegments(): array { @@ -846,8 +808,6 @@ class CLI * Gets a single command-line option. Returns TRUE if the option * exists, but doesn't have a value, and is simply acting as a flag. * - * @param string $name - * * @return bool|mixed|null */ public static function getOption(string $name) @@ -865,8 +825,6 @@ class CLI /** * Returns the raw array of options found. - * - * @return array */ public static function getOptions(): array { @@ -879,8 +837,6 @@ class CLI * * @param bool $useLongOpts Use '--' for long options? * @param bool $trim Trim final string output? - * - * @return string */ public static function getOptionString(bool $useLongOpts = false, bool $trim = false): string { @@ -1013,7 +969,6 @@ class CLI * solution down the road. * * @param resource $handle - * @param string $string * * @return void */ diff --git a/system/CLI/CommandRunner.php b/system/CLI/CommandRunner.php index 79d21ff8ea..a6985d0db9 100644 --- a/system/CLI/CommandRunner.php +++ b/system/CLI/CommandRunner.php @@ -59,8 +59,6 @@ class CommandRunner extends Controller /** * Default command. * - * @param array $params - * * @throws ReflectionException * * @return mixed @@ -74,8 +72,6 @@ class CommandRunner extends Controller /** * Allows access to the current commands that have been found. - * - * @return array */ public function getCommands(): array { diff --git a/system/CLI/Commands.php b/system/CLI/Commands.php index 888d266e46..872b7b103b 100644 --- a/system/CLI/Commands.php +++ b/system/CLI/Commands.php @@ -48,9 +48,6 @@ class Commands /** * Runs a command given - * - * @param string $command - * @param array $params */ public function run(string $command, array $params) { @@ -138,11 +135,6 @@ class Commands /** * Verifies if the command being sought is found * in the commands list. - * - * @param string $command - * @param array $commands - * - * @return bool */ public function verifyCommand(string $command, array $commands): bool { @@ -171,11 +163,6 @@ class Commands /** * Finds alternative of `$name` among collection * of commands. - * - * @param string $name - * @param array $collection - * - * @return array */ protected function getCommandAlternatives(string $name, array $collection): array { diff --git a/system/CLI/Console.php b/system/CLI/Console.php index 20110d0fc2..dfbd5e2ad1 100644 --- a/system/CLI/Console.php +++ b/system/CLI/Console.php @@ -31,8 +31,6 @@ class Console /** * Console constructor. - * - * @param CodeIgniter $app */ public function __construct(CodeIgniter $app) { @@ -42,8 +40,6 @@ class Console /** * Runs the current command discovered on the CLI. * - * @param bool $useSafeOutput - * * @throws Exception * * @return mixed|RequestInterface|Response|ResponseInterface @@ -60,8 +56,6 @@ class Console /** * Displays basic information about the Console. - * - * @param bool $suppress */ public function showHeader(bool $suppress = false) { diff --git a/system/CLI/Exceptions/CLIException.php b/system/CLI/Exceptions/CLIException.php index 07c60a8af8..4e07cd64f9 100644 --- a/system/CLI/Exceptions/CLIException.php +++ b/system/CLI/Exceptions/CLIException.php @@ -25,9 +25,6 @@ class CLIException extends RuntimeException * Thrown when `$color` specified for `$type` is not within the * allowed list of colors. * - * @param string $type - * @param string $color - * * @return CLIException */ public static function forInvalidColor(string $type, string $color) diff --git a/system/CLI/GeneratorTrait.php b/system/CLI/GeneratorTrait.php index 13c36d674a..2e1e1ca04b 100644 --- a/system/CLI/GeneratorTrait.php +++ b/system/CLI/GeneratorTrait.php @@ -86,10 +86,6 @@ trait GeneratorTrait /** * Execute the command. - * - * @param array $params - * - * @return void */ protected function execute(array $params): void { @@ -167,10 +163,6 @@ trait GeneratorTrait /** * Prepare options and do the necessary replacements. - * - * @param string $class - * - * @return string */ protected function prepare(string $class): string { @@ -181,10 +173,6 @@ trait GeneratorTrait * Change file basename before saving. * * Useful for components where the file name has a date. - * - * @param string $filename - * - * @return string */ protected function basename(string $filename): string { @@ -193,8 +181,6 @@ trait GeneratorTrait /** * Parses the class name and checks if it is already qualified. - * - * @return string */ protected function qualifyClassName(): string { @@ -244,8 +230,6 @@ trait GeneratorTrait * with fallback to `$template` when the defined view does not exist. * * @param array $data Data to be passed to the view. - * - * @return string */ protected function renderTemplate(array $data = []): string { @@ -260,13 +244,6 @@ trait GeneratorTrait /** * Performs pseudo-variables contained within view file. - * - * @param string $class - * @param array $search - * @param array $replace - * @param array $data - * - * @return string */ protected function parseTemplate(string $class, array $search = [], array $replace = [], array $data = []): string { @@ -286,10 +263,6 @@ trait GeneratorTrait * Builds the contents for class being generated, doing all * the replacements necessary, and alphabetically sorts the * imports for a given template. - * - * @param string $class - * - * @return string */ protected function buildContent(string $class): string { @@ -307,10 +280,6 @@ trait GeneratorTrait /** * Builds the file path from the class name. - * - * @param string $class - * - * @return string */ protected function buildPath(string $class): string { @@ -335,8 +304,6 @@ trait GeneratorTrait /** * Allows child generators to modify the internal `$hasClassName` flag. * - * @param bool $hasClassName - * * @return $this */ protected function setHasClassName(bool $hasClassName) @@ -349,8 +316,6 @@ trait GeneratorTrait /** * Allows child generators to modify the internal `$sortImports` flag. * - * @param bool $sortImports - * * @return $this */ protected function setSortImports(bool $sortImports) @@ -363,8 +328,6 @@ trait GeneratorTrait /** * Allows child generators to modify the internal `$enabledSuffixing` flag. * - * @param bool $enabledSuffixing - * * @return $this */ protected function setEnabledSuffixing(bool $enabledSuffixing) @@ -378,8 +341,6 @@ trait GeneratorTrait * Gets a single command-line option. Returns TRUE if the option exists, * but doesn't have a value, and is simply acting as a flag. * - * @param string $name - * * @return mixed */ protected function getOption(string $name) diff --git a/system/Cache/CacheFactory.php b/system/Cache/CacheFactory.php index 691b350a99..3ca101ff9d 100644 --- a/system/Cache/CacheFactory.php +++ b/system/Cache/CacheFactory.php @@ -25,10 +25,6 @@ class CacheFactory /** * Attempts to create the desired cache handler, based upon the * - * @param Cache $config - * @param string|null $handler - * @param string|null $backup - * * @return CacheInterface */ public static function getHandler(Cache $config, ?string $handler = null, ?string $backup = null) diff --git a/system/Cache/CacheInterface.php b/system/Cache/CacheInterface.php index 52502f5e67..72b3626d94 100644 --- a/system/Cache/CacheInterface.php +++ b/system/Cache/CacheInterface.php @@ -101,8 +101,6 @@ interface CacheInterface /** * Determines if the driver is supported on this system. - * - * @return bool */ public function isSupported(): bool; } diff --git a/system/Cache/Exceptions/CacheException.php b/system/Cache/Exceptions/CacheException.php index a3269072ec..3445590cf9 100644 --- a/system/Cache/Exceptions/CacheException.php +++ b/system/Cache/Exceptions/CacheException.php @@ -25,8 +25,6 @@ class CacheException extends RuntimeException implements ExceptionInterface /** * Thrown when handler has no permission to write cache. * - * @param string $path - * * @return CacheException */ public static function forUnableToWrite(string $path) diff --git a/system/Cache/Handlers/DummyHandler.php b/system/Cache/Handlers/DummyHandler.php index 8d4a9a6e29..99158038eb 100644 --- a/system/Cache/Handlers/DummyHandler.php +++ b/system/Cache/Handlers/DummyHandler.php @@ -152,8 +152,6 @@ class DummyHandler extends BaseHandler /** * Determines if the driver is supported on this system. - * - * @return bool */ public function isSupported(): bool { diff --git a/system/Cache/Handlers/FileHandler.php b/system/Cache/Handlers/FileHandler.php index d169a9258a..8dec7c62fb 100644 --- a/system/Cache/Handlers/FileHandler.php +++ b/system/Cache/Handlers/FileHandler.php @@ -45,8 +45,6 @@ class FileHandler extends BaseHandler /** * Constructor. * - * @param Cache $config - * * @throws CacheException */ public function __construct(Cache $config) @@ -264,8 +262,6 @@ class FileHandler extends BaseHandler /** * Determines if the driver is supported on this system. - * - * @return bool */ public function isSupported(): bool { @@ -276,8 +272,6 @@ class FileHandler extends BaseHandler * Does the heavy lifting of actually retrieving the file and * verifying it's age. * - * @param string $filename - * * @return bool|mixed */ protected function getItem(string $filename) @@ -345,8 +339,6 @@ class FileHandler extends BaseHandler * @param bool $delDir Whether to delete any directories found in the path * @param bool $htdocs Whether to skip deleting .htaccess and index page files * @param int $_level Current directory depth level (default: 0; internal use only) - * - * @return bool */ protected function deleteFiles(string $path, bool $delDir = false, bool $htdocs = false, int $_level = 0): bool { diff --git a/system/Cache/Handlers/MemcachedHandler.php b/system/Cache/Handlers/MemcachedHandler.php index d1fbdf2b8c..56f6579ced 100644 --- a/system/Cache/Handlers/MemcachedHandler.php +++ b/system/Cache/Handlers/MemcachedHandler.php @@ -43,8 +43,6 @@ class MemcachedHandler extends BaseHandler /** * Constructor. - * - * @param Cache $config */ public function __construct(Cache $config) { @@ -316,8 +314,6 @@ class MemcachedHandler extends BaseHandler /** * Determines if the driver is supported on this system. - * - * @return bool */ public function isSupported(): bool { diff --git a/system/Cache/Handlers/PredisHandler.php b/system/Cache/Handlers/PredisHandler.php index 978e48dd8b..100c19f8f2 100644 --- a/system/Cache/Handlers/PredisHandler.php +++ b/system/Cache/Handlers/PredisHandler.php @@ -44,8 +44,6 @@ class PredisHandler extends BaseHandler /** * Constructor. - * - * @param Cache $config */ public function __construct(Cache $config) { @@ -269,8 +267,6 @@ class PredisHandler extends BaseHandler /** * Determines if the driver is supported on this system. - * - * @return bool */ public function isSupported(): bool { diff --git a/system/Cache/Handlers/RedisHandler.php b/system/Cache/Handlers/RedisHandler.php index 2320de73cf..bf39e1f7b7 100644 --- a/system/Cache/Handlers/RedisHandler.php +++ b/system/Cache/Handlers/RedisHandler.php @@ -43,8 +43,6 @@ class RedisHandler extends BaseHandler /** * Constructor. - * - * @param Cache $config */ public function __construct(Cache $config) { @@ -307,8 +305,6 @@ class RedisHandler extends BaseHandler /** * Determines if the driver is supported on this system. - * - * @return bool */ public function isSupported(): bool { diff --git a/system/Cache/Handlers/WincacheHandler.php b/system/Cache/Handlers/WincacheHandler.php index 04697a32a2..5806229294 100644 --- a/system/Cache/Handlers/WincacheHandler.php +++ b/system/Cache/Handlers/WincacheHandler.php @@ -23,8 +23,6 @@ class WincacheHandler extends BaseHandler { /** * Constructor. - * - * @param Cache $config */ public function __construct(Cache $config) { @@ -183,8 +181,6 @@ class WincacheHandler extends BaseHandler /** * Determines if the driver is supported on this system. - * - * @return bool */ public function isSupported(): bool { diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index a8d54bb0e0..ffb52e86a5 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -142,8 +142,6 @@ class CodeIgniter /** * Constructor. - * - * @param App $config */ public function __construct(App $config) { @@ -284,9 +282,6 @@ class CodeIgniter * tries to route the response, loads the controller and generally * makes all of the pieces work together. * - * @param RouteCollectionInterface|null $routes - * @param bool $returnResponse - * * @throws Exception * @throws RedirectException * @@ -344,8 +339,6 @@ class CodeIgniter * cookies and headers are not actually sent, allowing PHP 7.2+ to * not complain when ini_set() function is used. * - * @param bool $safe - * * @return $this */ public function useSafeOutput(bool $safe = true) @@ -358,10 +351,6 @@ class CodeIgniter /** * Handles the main request logic and fires the controller. * - * @param RouteCollectionInterface|null $routes - * @param Cache $cacheConfig - * @param bool $returnResponse - * * @throws RedirectException * * @return mixed|RequestInterface|ResponseInterface @@ -514,8 +503,6 @@ class CodeIgniter * Sets a Request object to be used for this request. * Used when running certain tests. * - * @param Request $request - * * @return $this */ public function setRequest(Request $request) @@ -586,8 +573,6 @@ class CodeIgniter /** * Determines if a response has been cached for the given URI. * - * @param Cache $config - * * @throws Exception * * @return bool|ResponseInterface @@ -625,8 +610,6 @@ class CodeIgniter /** * Tells the app that the final output should be cached. * - * @param int $time - * * @return void */ public static function cache(int $time) @@ -638,8 +621,6 @@ class CodeIgniter * Caches the full response from the current request. Used for * full-page caching for very high performance. * - * @param Cache $config - * * @return mixed */ public function cachePage(Cache $config) @@ -655,8 +636,6 @@ class CodeIgniter /** * Returns an array with our basic performance stats collected. - * - * @return array */ public function getPerformanceStats(): array { @@ -668,10 +647,6 @@ class CodeIgniter /** * Generates the cache name to use for our full-page caching. - * - * @param Cache $config - * - * @return string */ protected function generateCacheName(Cache $config): string { @@ -692,10 +667,6 @@ class CodeIgniter /** * Replaces the elapsed_time tag. - * - * @param string $output - * - * @return string */ public function displayPerformanceMetrics(string $output): string { @@ -765,8 +736,6 @@ class CodeIgniter * * This is primarily used by the Console. * - * @param string $path - * * @return $this */ public function setPath(string $path) @@ -845,8 +814,6 @@ class CodeIgniter /** * Displays a 404 Page Not Found error. If set, will try to * call the 404Override controller/method that was set in routing config. - * - * @param PageNotFoundException $e */ protected function display404errors(PageNotFoundException $e) { @@ -896,7 +863,6 @@ class CodeIgniter * Gathers the script output from the buffer, replaces some execution * time tag in the output and displays the debug toolbar, if required. * - * @param Cache|null $cacheConfig * @param mixed|null $returned */ protected function gatherOutput(?Cache $cacheConfig = null, $returned = null) diff --git a/system/Commands/Cache/ClearCache.php b/system/Commands/Cache/ClearCache.php index dd9850c381..bb98177a0c 100644 --- a/system/Commands/Cache/ClearCache.php +++ b/system/Commands/Cache/ClearCache.php @@ -59,8 +59,6 @@ class ClearCache extends BaseCommand /** * Clears the cache - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Cache/InfoCache.php b/system/Commands/Cache/InfoCache.php index 6d4a543c1f..db5a51d76f 100644 --- a/system/Commands/Cache/InfoCache.php +++ b/system/Commands/Cache/InfoCache.php @@ -51,8 +51,6 @@ class InfoCache extends BaseCommand /** * Clears the cache - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Database/CreateDatabase.php b/system/Commands/Database/CreateDatabase.php index 1040383a14..c442c5bea7 100644 --- a/system/Commands/Database/CreateDatabase.php +++ b/system/Commands/Database/CreateDatabase.php @@ -73,8 +73,6 @@ class CreateDatabase extends BaseCommand /** * Creates a new database. * - * @param array $params - * * @return void */ public function run(array $params) diff --git a/system/Commands/Database/Migrate.php b/system/Commands/Database/Migrate.php index 24c7ecbddf..095e992722 100644 --- a/system/Commands/Database/Migrate.php +++ b/system/Commands/Database/Migrate.php @@ -64,8 +64,6 @@ class Migrate extends BaseCommand /** * Ensures that all migrations have been run. * - * @param array $params - * * @return void */ public function run(array $params) diff --git a/system/Commands/Database/MigrateRefresh.php b/system/Commands/Database/MigrateRefresh.php index 733b0eed35..27c59f4998 100644 --- a/system/Commands/Database/MigrateRefresh.php +++ b/system/Commands/Database/MigrateRefresh.php @@ -65,8 +65,6 @@ class MigrateRefresh extends BaseCommand * Does a rollback followed by a latest to refresh the current state * of the database. * - * @param array $params - * * @return void */ public function run(array $params) diff --git a/system/Commands/Database/MigrateRollback.php b/system/Commands/Database/MigrateRollback.php index fe9c28df7f..9f67808d17 100644 --- a/system/Commands/Database/MigrateRollback.php +++ b/system/Commands/Database/MigrateRollback.php @@ -66,8 +66,6 @@ class MigrateRollback extends BaseCommand * Runs all of the migrations in reverse order, until they have * all been unapplied. * - * @param array $params - * * @return void */ public function run(array $params) diff --git a/system/Commands/Database/Seed.php b/system/Commands/Database/Seed.php index 5de640f3c1..b71b954e8c 100644 --- a/system/Commands/Database/Seed.php +++ b/system/Commands/Database/Seed.php @@ -64,8 +64,6 @@ class Seed extends BaseCommand /** * Passes to Seeder to populate the database. * - * @param array $params - * * @return void */ public function run(array $params) diff --git a/system/Commands/Encryption/GenerateKey.php b/system/Commands/Encryption/GenerateKey.php index 79cce1f20a..23555b4e6d 100644 --- a/system/Commands/Encryption/GenerateKey.php +++ b/system/Commands/Encryption/GenerateKey.php @@ -64,8 +64,6 @@ class GenerateKey extends BaseCommand /** * Actually execute the command. * - * @param array $params - * * @return void */ public function run(array $params) @@ -112,11 +110,6 @@ class GenerateKey extends BaseCommand /** * Generates a key and encodes it. - * - * @param string $prefix - * @param int $length - * - * @return string */ protected function generateRandomKey(string $prefix, int $length): string { @@ -131,11 +124,6 @@ class GenerateKey extends BaseCommand /** * Sets the new encryption key in your .env file. - * - * @param string $key - * @param array $params - * - * @return bool */ protected function setNewEncryptionKey(string $key, array $params): bool { @@ -153,10 +141,6 @@ class GenerateKey extends BaseCommand /** * Checks whether to overwrite existing encryption key. - * - * @param array $params - * - * @return bool */ protected function confirmOverwrite(array $params): bool { @@ -165,11 +149,6 @@ class GenerateKey extends BaseCommand /** * Writes the new encryption key to .env file. - * - * @param string $oldKey - * @param string $newKey - * - * @return bool */ protected function writeNewEncryptionKeyToFile(string $oldKey, string $newKey): bool { @@ -199,10 +178,6 @@ class GenerateKey extends BaseCommand /** * Get the regex of the current encryption key. - * - * @param string $oldKey - * - * @return string */ protected function keyPattern(string $oldKey): string { diff --git a/system/Commands/Generators/CommandGenerator.php b/system/Commands/Generators/CommandGenerator.php index be979ebf46..7ccae13f71 100644 --- a/system/Commands/Generators/CommandGenerator.php +++ b/system/Commands/Generators/CommandGenerator.php @@ -75,8 +75,6 @@ class CommandGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { @@ -90,10 +88,6 @@ class CommandGenerator extends BaseCommand /** * Prepare options and do the necessary replacements. - * - * @param string $class - * - * @return string */ protected function prepare(string $class): string { diff --git a/system/Commands/Generators/ConfigGenerator.php b/system/Commands/Generators/ConfigGenerator.php index 301091a001..606af47b33 100644 --- a/system/Commands/Generators/ConfigGenerator.php +++ b/system/Commands/Generators/ConfigGenerator.php @@ -71,8 +71,6 @@ class ConfigGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { @@ -86,10 +84,6 @@ class ConfigGenerator extends BaseCommand /** * Prepare options and do the necessary replacements. - * - * @param string $class - * - * @return string */ protected function prepare(string $class): string { diff --git a/system/Commands/Generators/ControllerGenerator.php b/system/Commands/Generators/ControllerGenerator.php index 05ffd58ef0..36a951cf0d 100644 --- a/system/Commands/Generators/ControllerGenerator.php +++ b/system/Commands/Generators/ControllerGenerator.php @@ -74,8 +74,6 @@ class ControllerGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { @@ -89,10 +87,6 @@ class ControllerGenerator extends BaseCommand /** * Prepare options and do the necessary replacements. - * - * @param string $class - * - * @return string */ protected function prepare(string $class): string { diff --git a/system/Commands/Generators/EntityGenerator.php b/system/Commands/Generators/EntityGenerator.php index 0b8baf4cb4..8cd84785c3 100644 --- a/system/Commands/Generators/EntityGenerator.php +++ b/system/Commands/Generators/EntityGenerator.php @@ -71,8 +71,6 @@ class EntityGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Generators/FilterGenerator.php b/system/Commands/Generators/FilterGenerator.php index 4bbc9102bd..02060b0202 100644 --- a/system/Commands/Generators/FilterGenerator.php +++ b/system/Commands/Generators/FilterGenerator.php @@ -71,8 +71,6 @@ class FilterGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Generators/MigrateCreate.php b/system/Commands/Generators/MigrateCreate.php index 6501ae0ee4..4803dc96db 100644 --- a/system/Commands/Generators/MigrateCreate.php +++ b/system/Commands/Generators/MigrateCreate.php @@ -73,8 +73,6 @@ class MigrateCreate extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Generators/MigrationGenerator.php b/system/Commands/Generators/MigrationGenerator.php index dded6a7f5f..1cd931e9e4 100644 --- a/system/Commands/Generators/MigrationGenerator.php +++ b/system/Commands/Generators/MigrationGenerator.php @@ -74,8 +74,6 @@ class MigrationGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { @@ -94,10 +92,6 @@ class MigrationGenerator extends BaseCommand /** * Prepare options and do the necessary replacements. - * - * @param string $class - * - * @return string */ protected function prepare(string $class): string { @@ -118,10 +112,6 @@ class MigrationGenerator extends BaseCommand /** * Change file basename before saving. - * - * @param string $filename - * - * @return string */ protected function basename(string $filename): string { diff --git a/system/Commands/Generators/ModelGenerator.php b/system/Commands/Generators/ModelGenerator.php index 808968b845..1ad8a75e1f 100644 --- a/system/Commands/Generators/ModelGenerator.php +++ b/system/Commands/Generators/ModelGenerator.php @@ -75,8 +75,6 @@ class ModelGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { @@ -90,10 +88,6 @@ class ModelGenerator extends BaseCommand /** * Prepare options and do the necessary replacements. - * - * @param string $class - * - * @return string */ protected function prepare(string $class): string { diff --git a/system/Commands/Generators/ScaffoldGenerator.php b/system/Commands/Generators/ScaffoldGenerator.php index db9eb14205..351ee00945 100644 --- a/system/Commands/Generators/ScaffoldGenerator.php +++ b/system/Commands/Generators/ScaffoldGenerator.php @@ -77,8 +77,6 @@ class ScaffoldGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Generators/SeederGenerator.php b/system/Commands/Generators/SeederGenerator.php index 2335954955..09a1037f0b 100644 --- a/system/Commands/Generators/SeederGenerator.php +++ b/system/Commands/Generators/SeederGenerator.php @@ -71,8 +71,6 @@ class SeederGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Generators/SessionMigrationGenerator.php b/system/Commands/Generators/SessionMigrationGenerator.php index 60258e6b15..a1e02a131b 100644 --- a/system/Commands/Generators/SessionMigrationGenerator.php +++ b/system/Commands/Generators/SessionMigrationGenerator.php @@ -66,8 +66,6 @@ class SessionMigrationGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { @@ -88,10 +86,6 @@ class SessionMigrationGenerator extends BaseCommand /** * Performs the necessary replacements. - * - * @param string $class - * - * @return string */ protected function prepare(string $class): string { @@ -108,10 +102,6 @@ class SessionMigrationGenerator extends BaseCommand /** * Change file basename before saving. - * - * @param string $filename - * - * @return string */ protected function basename(string $filename): string { diff --git a/system/Commands/Generators/ValidationGenerator.php b/system/Commands/Generators/ValidationGenerator.php index 322ecb190b..0c58ca5b08 100644 --- a/system/Commands/Generators/ValidationGenerator.php +++ b/system/Commands/Generators/ValidationGenerator.php @@ -71,8 +71,6 @@ class ValidationGenerator extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Help.php b/system/Commands/Help.php index 32df294e22..7562333a4f 100644 --- a/system/Commands/Help.php +++ b/system/Commands/Help.php @@ -68,8 +68,6 @@ class Help extends BaseCommand /** * Displays the help for spark commands. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Housekeeping/ClearDebugbar.php b/system/Commands/Housekeeping/ClearDebugbar.php index 5f81b2eeed..ee79864662 100644 --- a/system/Commands/Housekeeping/ClearDebugbar.php +++ b/system/Commands/Housekeeping/ClearDebugbar.php @@ -51,8 +51,6 @@ class ClearDebugbar extends BaseCommand /** * Actually runs the command. * - * @param array $params - * * @return void */ public function run(array $params) diff --git a/system/Commands/Housekeeping/ClearLogs.php b/system/Commands/Housekeeping/ClearLogs.php index 1c063d8092..eb2489c5ea 100644 --- a/system/Commands/Housekeeping/ClearLogs.php +++ b/system/Commands/Housekeeping/ClearLogs.php @@ -59,8 +59,6 @@ class ClearLogs extends BaseCommand /** * Actually execute a command. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/ListCommands.php b/system/Commands/ListCommands.php index f74736832a..0c808322af 100644 --- a/system/Commands/ListCommands.php +++ b/system/Commands/ListCommands.php @@ -69,8 +69,6 @@ class ListCommands extends BaseCommand /** * Displays the help for the spark cli script itself. - * - * @param array $params */ public function run(array $params) { @@ -85,8 +83,6 @@ class ListCommands extends BaseCommand /** * Lists the commands with accompanying info. - * - * @param array $commands */ protected function listFull(array $commands) { @@ -128,8 +124,6 @@ class ListCommands extends BaseCommand /** * Lists the commands only. - * - * @param array $commands */ protected function listSimple(array $commands) { diff --git a/system/Commands/Utilities/Environment.php b/system/Commands/Utilities/Environment.php index 2ad0dc394e..b9081742d4 100644 --- a/system/Commands/Utilities/Environment.php +++ b/system/Commands/Utilities/Environment.php @@ -130,10 +130,6 @@ final class Environment extends BaseCommand /** * @see https://regex101.com/r/4sSORp/1 for the regex in action - * - * @param string $newEnv - * - * @return bool */ private function writeNewEnvironmentToEnvFile(string $newEnv): bool { diff --git a/system/Commands/Utilities/Namespaces.php b/system/Commands/Utilities/Namespaces.php index 639a861e52..989f02036e 100644 --- a/system/Commands/Utilities/Namespaces.php +++ b/system/Commands/Utilities/Namespaces.php @@ -67,8 +67,6 @@ class Namespaces extends BaseCommand /** * Displays the help for the spark cli script itself. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Commands/Utilities/Routes.php b/system/Commands/Utilities/Routes.php index bdc5db9da1..210d1e11c5 100644 --- a/system/Commands/Utilities/Routes.php +++ b/system/Commands/Utilities/Routes.php @@ -67,8 +67,6 @@ class Routes extends BaseCommand /** * Displays the help for the spark cli script itself. - * - * @param array $params */ public function run(array $params) { diff --git a/system/Common.php b/system/Common.php index 97caeee4ef..4a3a6102e4 100644 --- a/system/Common.php +++ b/system/Common.php @@ -40,8 +40,6 @@ if (! function_exists('app_timezone')) { * dates in. This might be different than the timezone set * at the server level, as you often want to stores dates in UTC * and convert them on the fly for the user. - * - * @return string */ function app_timezone(): string { @@ -61,8 +59,6 @@ if (! function_exists('cache')) { * cache()->save('foo', 'bar'); * $foo = cache('bar'); * - * @param string|null $key - * * @return CacheInterface|mixed */ function cache(?string $key = null) @@ -84,10 +80,6 @@ if (! function_exists('clean_path')) { * A convenience method to clean paths for * a nicer looking output. Useful for exception * handling, error logging, etc. - * - * @param string $path - * - * @return string */ function clean_path(string $path): string { @@ -124,8 +116,6 @@ if (! function_exists('command')) { * * > command('migrate:create SomeMigration'); * - * @param string $command - * * @return false|string */ function command(string $command) @@ -200,9 +190,6 @@ if (! function_exists('config')) { /** * More simple way of getting config instances from Factories * - * @param string $name - * @param bool $getShared - * * @return mixed */ function config(string $name, bool $getShared = true) @@ -220,8 +207,6 @@ if (! function_exists('cookie')) { * @param array $options Array of options to be passed to the cookie * * @throws CookieException - * - * @return Cookie */ function cookie(string $name, string $value = '', array $options = []): Cookie { @@ -235,8 +220,6 @@ if (! function_exists('cookies')) { * * @param Cookie[] $cookies If `getGlobal` is false, this is passed to CookieStore's constructor * @param bool $getGlobal If false, creates a new instance of CookieStore - * - * @return CookieStore */ function cookies(array $cookies = [], bool $getGlobal = true): CookieStore { @@ -253,8 +236,6 @@ if (! function_exists('csrf_token')) { * Returns the CSRF token name. * Can be used in Views when building hidden inputs manually, * or used in javascript vars when using APIs. - * - * @return string */ function csrf_token(): string { @@ -267,8 +248,6 @@ if (! function_exists('csrf_header')) { * Returns the CSRF header name. * Can be used in Views by adding it to the meta tag * or used in javascript to define a header name when using APIs. - * - * @return string */ function csrf_header(): string { @@ -281,8 +260,6 @@ if (! function_exists('csrf_hash')) { * Returns the current hash value for the CSRF protection. * Can be used in Views when building hidden inputs manually, * or used in javascript vars for API usage. - * - * @return string */ function csrf_hash(): string { @@ -293,10 +270,6 @@ if (! function_exists('csrf_hash')) { if (! function_exists('csrf_field')) { /** * Generates a hidden input field for use within manually generated forms. - * - * @param string|null $id - * - * @return string */ function csrf_field(?string $id = null): string { @@ -307,10 +280,6 @@ if (! function_exists('csrf_field')) { if (! function_exists('csrf_meta')) { /** * Generates a meta tag for use within javascript calls. - * - * @param string|null $id - * - * @return string */ function csrf_meta(?string $id = null): string { @@ -334,7 +303,6 @@ if (! function_exists('db_connect')) { * otherwise it will all calls will return the same instance. * * @param array|ConnectionInterface|string|null $db - * @param bool $getShared * * @return BaseConnection */ @@ -370,7 +338,6 @@ if (! function_exists('env')) { * retrieving values set from the .env file for * use in config files. * - * @param string $key * @param string|null $default * * @return mixed @@ -415,7 +382,6 @@ if (! function_exists('esc')) { * Valid context values: html, js, css, url, attr, raw, null * * @param array|string $data - * @param string $context * @param string $encoding * * @throws InvalidArgumentException @@ -682,8 +648,6 @@ if (! function_exists('is_cli')) { /** * Check if PHP was invoked from the command line. * - * @return bool - * * @codeCoverageIgnore Cannot be tested fully as PHPUnit always run in CLI */ function is_cli(): bool @@ -719,12 +683,8 @@ if (! function_exists('is_really_writable')) { * * @see https://bugs.php.net/bug.php?id=54709 * - * @param string $file - * * @throws Exception * - * @return bool - * * @codeCoverageIgnore Not practical to test, as travis runs on linux */ function is_really_writable(string $file): bool @@ -765,10 +725,6 @@ if (! function_exists('lang')) { * A convenience method to translate a string or array of them and format * the result with the intl extension's MessageFormatter. * - * @param string $line - * @param array $args - * @param string|null $locale - * * @return string */ function lang(string $line, array $args = [], ?string $locale = null) @@ -793,10 +749,6 @@ if (! function_exists('log_message')) { * - info * - debug * - * @param string $level - * @param string $message - * @param array $context - * * @return mixed */ function log_message(string $level, string $message, array $context = []) @@ -821,10 +773,6 @@ if (! function_exists('model')) { /** * More simple way of getting model instances from Factories * - * @param string $name - * @param bool $getShared - * @param ConnectionInterface|null $conn - * * @return mixed */ function model(string $name, bool $getShared = true, ?ConnectionInterface &$conn = null) @@ -838,7 +786,6 @@ if (! function_exists('old')) { * Provides access to "old input" that was set in the session * during a redirect()->withInput(). * - * @param string $key * @param null $default * @param bool|string $escape * @@ -883,8 +830,6 @@ if (! function_exists('redirect')) { * If more control is needed, you must use $response->redirect explicitly. * * @param string $route - * - * @return RedirectResponse */ function redirect(?string $route = null): RedirectResponse { @@ -904,11 +849,6 @@ if (! function_exists('remove_invisible_characters')) { * * This prevents sandwiching null characters * between ascii characters, like Java\0script. - * - * @param string $str - * @param bool $urlEncoded - * - * @return string */ function remove_invisible_characters(string $str, bool $urlEncoded = true): string { @@ -940,8 +880,7 @@ if (! function_exists('route_to')) { * NOTE: This requires the controller/method to * have a route defined in the routes Config file. * - * @param string $method - * @param mixed ...$params + * @param mixed ...$params * * @return false|string */ @@ -988,8 +927,7 @@ if (! function_exists('service')) { * - $timer = service('timer') * - $timer = \CodeIgniter\Config\Services::timer(); * - * @param string $name - * @param mixed ...$params + * @param mixed ...$params * * @return mixed */ @@ -1003,8 +941,7 @@ if (! function_exists('single_service')) { /** * Always returns a new instance of the class. * - * @param string $name - * @param mixed ...$params + * @param mixed ...$params * * @return mixed */ @@ -1072,9 +1009,6 @@ if (! function_exists('stringify_attributes')) { * of attributes to a string. * * @param mixed $attributes string, array, object - * @param bool $js - * - * @return string */ function stringify_attributes($attributes, bool $js = false): string { @@ -1104,8 +1038,6 @@ if (! function_exists('timer')) { * If no parameter is passed, it will return the timer instance, * otherwise will start or stop the timer intelligently. * - * @param string|null $name - * * @return mixed|Timer */ function timer(?string $name = null) @@ -1145,11 +1077,7 @@ if (! function_exists('view')) { * NOTE: Does not provide any escaping of the data, so that must * all be handled manually by the developer. * - * @param string $name - * @param array $data - * @param array $options Unused - reserved for third-party extensions. - * - * @return string + * @param array $options Unused - reserved for third-party extensions. */ function view(string $name, array $data = [], array $options = []): string { @@ -1174,14 +1102,9 @@ if (! function_exists('view_cell')) { * View cells are used within views to insert HTML chunks that are managed * by other classes. * - * @param string $library - * @param null $params - * @param int $ttl - * @param string|null $cacheName + * @param null $params * * @throws ReflectionException - * - * @return string */ function view_cell(string $library, $params = null, int $ttl = 0, ?string $cacheName = null): string { diff --git a/system/ComposerScripts.php b/system/ComposerScripts.php index cf74406883..791b4506db 100644 --- a/system/ComposerScripts.php +++ b/system/ComposerScripts.php @@ -80,10 +80,6 @@ final class ComposerScripts /** * Recursively remove the contents of the previous `system/ThirdParty`. - * - * @param string $directory - * - * @return void */ private static function recursiveDelete(string $directory): void { @@ -109,11 +105,6 @@ final class ComposerScripts /** * Recursively copy the files and directories of the origin directory * into the target directory, i.e. "mirror" its contents. - * - * @param string $originDir - * @param string $targetDir - * - * @return void */ private static function recursiveMirror(string $originDir, string $targetDir): void { @@ -154,8 +145,6 @@ final class ComposerScripts /** * Copy Kint's init files into `system/ThirdParty/Kint/` - * - * @return void */ private static function copyKintInitFiles(): void { diff --git a/system/Config/BaseConfig.php b/system/Config/BaseConfig.php index 1468c84271..d06b930d65 100644 --- a/system/Config/BaseConfig.php +++ b/system/Config/BaseConfig.php @@ -86,10 +86,7 @@ class BaseConfig /** * Initialization an environment-specific configuration setting * - * @param mixed $property - * @param string $name - * @param string $prefix - * @param string $shortPrefix + * @param mixed $property * * @return mixed */ @@ -114,10 +111,6 @@ class BaseConfig /** * Retrieve an environment-specific configuration setting * - * @param string $property - * @param string $prefix - * @param string $shortPrefix - * * @return mixed */ protected function getEnvValue(string $property, string $prefix, string $shortPrefix) diff --git a/system/Config/BaseService.php b/system/Config/BaseService.php index 49d3688db1..d67af93041 100644 --- a/system/Config/BaseService.php +++ b/system/Config/BaseService.php @@ -169,8 +169,7 @@ class BaseService * * $key must be a name matching a service. * - * @param string $key - * @param mixed ...$params + * @param mixed ...$params * * @return mixed */ @@ -197,8 +196,6 @@ class BaseService * The Autoloader class is the central class that handles our * spl_autoload_register method, and helper methods. * - * @param bool $getShared - * * @return Autoloader */ public static function autoloader(bool $getShared = true) @@ -219,8 +216,6 @@ class BaseService * within namespaced folders, as well as convenience methods for * loading 'helpers', and 'libraries'. * - * @param bool $getShared - * * @return FileLocator */ public static function locator(bool $getShared = true) @@ -240,9 +235,6 @@ class BaseService * Provides the ability to perform case-insensitive calling of service * names. * - * @param string $name - * @param array $arguments - * * @return mixed */ public static function __callStatic(string $name, array $arguments) @@ -259,10 +251,6 @@ class BaseService /** * Check if the requested service is defined and return the declaring * class. Return null if not found. - * - * @param string $name - * - * @return string|null */ public static function serviceExists(string $name): ?string { @@ -296,8 +284,6 @@ class BaseService /** * Resets any mock and shared instances for a single service. - * - * @param string $name */ public static function resetSingle(string $name) { @@ -307,8 +293,7 @@ class BaseService /** * Inject mock object for testing. * - * @param string $name - * @param mixed $mock + * @param mixed $mock */ public static function injectMock(string $name, $mock) { @@ -321,9 +306,6 @@ class BaseService * looks for the service method in each, returning an instance of * the service, if available. * - * @param string $name - * @param array $arguments - * * @return mixed * * @deprecated diff --git a/system/Config/Config.php b/system/Config/Config.php index 229e1e35d2..6f52869b5a 100644 --- a/system/Config/Config.php +++ b/system/Config/Config.php @@ -35,7 +35,6 @@ class Config /** * Helper method for injecting mock instances while testing. * - * @param string $name * @param object $instance */ public static function injectMock(string $name, $instance) diff --git a/system/Config/DotEnv.php b/system/Config/DotEnv.php index e9761c63ed..ddc590cd59 100644 --- a/system/Config/DotEnv.php +++ b/system/Config/DotEnv.php @@ -27,9 +27,6 @@ class DotEnv /** * Builds the path to our file. - * - * @param string $path - * @param string $file */ public function __construct(string $path, string $file = '.env') { @@ -40,8 +37,6 @@ class DotEnv * The main entry point, will load the .env file and process it * so that we end up with all settings in the PHP environment vars * (i.e. getenv(), $_ENV, and $_SERVER) - * - * @return bool */ public function load(): bool { @@ -52,8 +47,6 @@ class DotEnv /** * Parse the .env file into an array of key => value - * - * @return array|null */ public function parse(): ?array { @@ -92,9 +85,6 @@ class DotEnv * Sets the variable into the environment. Will parse the string * first to look for {name}={value} pattern, ensure that nested * variables are handled, and strip it of single and double quotes. - * - * @param string $name - * @param string $value */ protected function setVariable(string $name, string $value = '') { @@ -114,11 +104,6 @@ class DotEnv /** * Parses for assignment, cleans the $name and $value, and ensures * that nested variables are handled. - * - * @param string $name - * @param string $value - * - * @return array */ public function normaliseVariable(string $name, string $value = ''): array { @@ -146,11 +131,7 @@ class DotEnv * This was borrowed from the excellent phpdotenv with very few changes. * https://github.com/vlucas/phpdotenv * - * @param string $value - * * @throws InvalidArgumentException - * - * @return string */ protected function sanitizeValue(string $value): string { @@ -203,10 +184,6 @@ class DotEnv * * This was borrowed from the excellent phpdotenv with very few changes. * https://github.com/vlucas/phpdotenv - * - * @param string $value - * - * @return string */ protected function resolveNestedVariables(string $value): string { @@ -235,8 +212,6 @@ class DotEnv * This was borrowed from the excellent phpdotenv with very few changes. * https://github.com/vlucas/phpdotenv * - * @param string $name - * * @return string|null */ protected function getVariable(string $name) diff --git a/system/Config/Factories.php b/system/Config/Factories.php index 9df4fec5a6..8aa779220a 100644 --- a/system/Config/Factories.php +++ b/system/Config/Factories.php @@ -71,9 +71,6 @@ class Factories * Loads instances based on the method component name. Either * creates a new instance or returns an existing shared instance. * - * @param string $component - * @param array $arguments - * * @return mixed */ public static function __callStatic(string $component, array $arguments) @@ -121,8 +118,6 @@ class Factories * * @param array $options The array of component-specific directives * @param string $name Class name, namespace optional - * - * @return string|null */ protected static function locateClass(array $options, string $name): ?string { @@ -180,8 +175,6 @@ class Factories * * @param array $options The array of component-specific directives * @param string $name Class name, namespace optional - * - * @return bool */ protected static function verifyPreferApp(array $options, string $name): bool { @@ -203,8 +196,6 @@ class Factories * * @param array $options The array of component-specific directives * @param string $name Class name, namespace optional - * - * @return bool */ protected static function verifyInstanceOf(array $options, string $name): bool { @@ -245,7 +236,6 @@ class Factories * Normalizes, stores, and returns the configuration for a specific component * * @param string $component Lowercase, plural component name - * @param array $values * * @return array The result after applying defaults and normalization */ @@ -297,7 +287,6 @@ class Factories * * @param string $component Lowercase, plural component name * @param string $name The name of the instance - * @param object $instance */ public static function injectMock(string $component, string $name, object $instance) { @@ -314,10 +303,6 @@ class Factories /** * Gets a basename from a class name, namespaced or not. - * - * @param string $name - * - * @return string */ public static function getBasename(string $name): string { diff --git a/system/Config/Services.php b/system/Config/Services.php index 8760b8bb9f..0b681f17ce 100644 --- a/system/Config/Services.php +++ b/system/Config/Services.php @@ -93,9 +93,6 @@ class Services extends BaseService * The cache class provides a simple way to store and retrieve * complex data for later. * - * @param Cache|null $config - * @param bool $getShared - * * @return CacheInterface */ public static function cache(?Cache $config = null, bool $getShared = true) @@ -113,9 +110,6 @@ class Services extends BaseService * The CLI Request class provides for ways to interact with * a command line request. * - * @param App|null $config - * @param bool $getShared - * * @return CLIRequest */ public static function clirequest(?App $config = null, bool $getShared = true) @@ -132,9 +126,6 @@ class Services extends BaseService /** * CodeIgniter, the core of the framework. * - * @param App|null $config - * @param bool $getShared - * * @return CodeIgniter */ public static function codeigniter(?App $config = null, bool $getShared = true) @@ -151,8 +142,6 @@ class Services extends BaseService /** * The commands utility for running and working with CLI commands. * - * @param bool $getShared - * * @return Commands */ public static function commands(bool $getShared = true) @@ -168,11 +157,6 @@ class Services extends BaseService * The CURL Request class acts as a simple HTTP client for interacting * with other servers, typically through APIs. * - * @param array $options - * @param ResponseInterface|null $response - * @param App|null $config - * @param bool $getShared - * * @return CURLRequest */ public static function curlrequest(array $options = [], ?ResponseInterface $response = null, ?App $config = null, bool $getShared = true) @@ -196,7 +180,6 @@ class Services extends BaseService * The Email class allows you to send email via mail, sendmail, SMTP. * * @param array|EmailConfig|null $config - * @param bool $getShared * * @return Email */ @@ -216,8 +199,7 @@ class Services extends BaseService /** * The Encryption class provides two-way encryption. * - * @param EncryptionConfig|null $config - * @param bool $getShared + * @param bool $getShared * * @return EncrypterInterface Encryption handler */ @@ -240,11 +222,6 @@ class Services extends BaseService * - set_error_handler * - register_shutdown_function * - * @param ExceptionsConfig|null $config - * @param IncomingRequest|null $request - * @param Response|null $response - * @param bool $getShared - * * @return Exceptions */ public static function exceptions( @@ -270,9 +247,6 @@ class Services extends BaseService * and actions taken based on the request, while after filters can * act on or modify the response itself before it is sent to the client. * - * @param FiltersConfig|null $config - * @param bool $getShared - * * @return Filters */ public static function filters(?FiltersConfig $config = null, bool $getShared = true) @@ -289,9 +263,6 @@ class Services extends BaseService /** * The Format class is a convenient place to create Formatters. * - * @param FormatConfig|null $config - * @param bool $getShared - * * @return Format */ public static function format(?FormatConfig $config = null, bool $getShared = true) @@ -309,9 +280,6 @@ class Services extends BaseService * The Honeypot provides a secret input on forms that bots should NOT * fill in, providing an additional safeguard when accepting user input. * - * @param HoneypotConfig|null $config - * @param bool $getShared - * * @return Honeypot */ public static function honeypot(?HoneypotConfig $config = null, bool $getShared = true) @@ -329,10 +297,6 @@ class Services extends BaseService * Acts as a factory for ImageHandler classes and returns an instance * of the handler. Used like Services::image()->withFile($path)->rotate(90)->save(); * - * @param string|null $handler - * @param Images|null $config - * @param bool $getShared - * * @return BaseHandler */ public static function image(?string $handler = null, ?Images $config = null, bool $getShared = true) @@ -353,8 +317,6 @@ class Services extends BaseService * and timing the results and memory usage. Used when debugging and * optimizing applications. * - * @param bool $getShared - * * @return Iterator */ public static function iterator(bool $getShared = true) @@ -369,9 +331,6 @@ class Services extends BaseService /** * Responsible for loading the language string translations. * - * @param string|null $locale - * @param bool $getShared - * * @return Language */ public static function language(?string $locale = null, bool $getShared = true) @@ -390,8 +349,6 @@ class Services extends BaseService * The Logger class is a PSR-3 compatible Logging class that supports * multiple handlers that process the actual logging. * - * @param bool $getShared - * * @return Logger */ public static function logger(bool $getShared = true) @@ -406,10 +363,6 @@ class Services extends BaseService /** * Return the appropriate Migration runner. * - * @param Migrations|null $config - * @param ConnectionInterface|null $db - * @param bool $getShared - * * @return MigrationRunner */ public static function migrations(?Migrations $config = null, ?ConnectionInterface $db = null, bool $getShared = true) @@ -428,9 +381,6 @@ class Services extends BaseService * working the request to determine correct language, encoding, charset, * and more. * - * @param RequestInterface|null $request - * @param bool $getShared - * * @return Negotiate */ public static function negotiator(?RequestInterface $request = null, bool $getShared = true) @@ -447,10 +397,6 @@ class Services extends BaseService /** * Return the appropriate pagination handler. * - * @param PagerConfig|null $config - * @param RendererInterface|null $view - * @param bool $getShared - * * @return Pager */ public static function pager(?PagerConfig $config = null, ?RendererInterface $view = null, bool $getShared = true) @@ -468,10 +414,6 @@ class Services extends BaseService /** * The Parser is a simple template parser. * - * @param string|null $viewPath - * @param ViewConfig|null $config - * @param bool $getShared - * * @return Parser */ public static function parser(?string $viewPath = null, ?ViewConfig $config = null, bool $getShared = true) @@ -491,10 +433,6 @@ class Services extends BaseService * The default View class within CodeIgniter is intentionally simple, but this * service could easily be replaced by a template engine if the user needed to. * - * @param string|null $viewPath - * @param ViewConfig|null $config - * @param bool $getShared - * * @return View */ public static function renderer(?string $viewPath = null, ?ViewConfig $config = null, bool $getShared = true) @@ -512,9 +450,6 @@ class Services extends BaseService /** * The Request class models an HTTP request. * - * @param App|null $config - * @param bool $getShared - * * @return IncomingRequest */ public static function request(?App $config = null, bool $getShared = true) @@ -536,9 +471,6 @@ class Services extends BaseService /** * The Response class models an HTTP response. * - * @param App|null $config - * @param bool $getShared - * * @return Response */ public static function response(?App $config = null, bool $getShared = true) @@ -555,9 +487,6 @@ class Services extends BaseService /** * The Redirect class provides nice way of working with redirects. * - * @param App|null $config - * @param bool $getShared - * * @return RedirectResponse */ public static function redirectresponse(?App $config = null, bool $getShared = true) @@ -577,8 +506,6 @@ class Services extends BaseService * The Routes service is a class that allows for easily building * a collection of routes. * - * @param bool $getShared - * * @return RouteCollection */ public static function routes(bool $getShared = true) @@ -594,10 +521,6 @@ class Services extends BaseService * The Router class uses a RouteCollection's array of routes, and determines * the correct Controller and Method to execute. * - * @param RouteCollectionInterface|null $routes - * @param Request|null $request - * @param bool $getShared - * * @return Router */ public static function router(?RouteCollectionInterface $routes = null, ?Request $request = null, bool $getShared = true) @@ -616,9 +539,6 @@ class Services extends BaseService * The Security class provides a few handy tools for keeping the site * secure, most notably the CSRF protection tools. * - * @param App|null $config - * @param bool $getShared - * * @return Security */ public static function security(?App $config = null, bool $getShared = true) @@ -635,9 +555,6 @@ class Services extends BaseService /** * Return the session manager. * - * @param App|null $config - * @param bool $getShared - * * @return Session */ public static function session(?App $config = null, bool $getShared = true) @@ -667,8 +584,6 @@ class Services extends BaseService * The Throttler class provides a simple method for implementing * rate limiting in your applications. * - * @param bool $getShared - * * @return Throttler */ public static function throttler(bool $getShared = true) @@ -684,8 +599,6 @@ class Services extends BaseService * The Timer class provides a simple way to Benchmark portions of your * application. * - * @param bool $getShared - * * @return Timer */ public static function timer(bool $getShared = true) @@ -700,9 +613,6 @@ class Services extends BaseService /** * Return the debug toolbar. * - * @param ToolbarConfig|null $config - * @param bool $getShared - * * @return Toolbar */ public static function toolbar(?ToolbarConfig $config = null, bool $getShared = true) @@ -720,7 +630,6 @@ class Services extends BaseService * The URI class provides a way to model and manipulate URIs. * * @param string $uri - * @param bool $getShared * * @return URI */ @@ -736,9 +645,6 @@ class Services extends BaseService /** * The Validation class provides tools for validating input data. * - * @param ValidationConfig|null $config - * @param bool $getShared - * * @return Validation */ public static function validation(?ValidationConfig $config = null, bool $getShared = true) @@ -756,8 +662,6 @@ class Services extends BaseService * View cells are intended to let you insert HTML into view * that has been generated by any callable in the system. * - * @param bool $getShared - * * @return Cell */ public static function viewcell(bool $getShared = true) @@ -772,8 +676,6 @@ class Services extends BaseService /** * The Typography class provides a way to format text in semantically relevant ways. * - * @param bool $getShared - * * @return Typography */ public static function typography(bool $getShared = true) diff --git a/system/Controller.php b/system/Controller.php index 9138d930ac..b50c8bcf34 100644 --- a/system/Controller.php +++ b/system/Controller.php @@ -69,10 +69,6 @@ class Controller /** * Constructor. * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param LoggerInterface $logger - * * @throws HTTPException */ public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) @@ -109,8 +105,6 @@ class Controller /** * Provides a simple way to tie into the main CodeIgniter class and * tell it how long to cache the current page for. - * - * @param int $time */ protected function cachePage(int $time) { @@ -139,8 +133,6 @@ class Controller * * @param array|string $rules * @param array $messages An array of custom error messages - * - * @return bool */ protected function validate($rules, array $messages = []): bool { diff --git a/system/Cookie/CloneableCookieInterface.php b/system/Cookie/CloneableCookieInterface.php index 8cbbeb9858..508c135997 100644 --- a/system/Cookie/CloneableCookieInterface.php +++ b/system/Cookie/CloneableCookieInterface.php @@ -22,8 +22,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with a new cookie prefix. * - * @param string $prefix - * * @return static */ public function withPrefix(string $prefix = ''); @@ -31,8 +29,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with a new name. * - * @param string $name - * * @return static */ public function withName(string $name); @@ -40,8 +36,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with new value. * - * @param string $value - * * @return static */ public function withValue(string $value); @@ -72,8 +66,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with a new path on the server the cookie is available. * - * @param string|null $path - * * @return static */ public function withPath(?string $path); @@ -81,8 +73,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with a new domain the cookie is available. * - * @param string|null $domain - * * @return static */ public function withDomain(?string $domain); @@ -90,8 +80,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with a new "Secure" attribute. * - * @param bool $secure - * * @return static */ public function withSecure(bool $secure = true); @@ -99,8 +87,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with a new "HttpOnly" attribute * - * @param bool $httponly - * * @return static */ public function withHTTPOnly(bool $httponly = true); @@ -108,8 +94,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with a new "SameSite" attribute. * - * @param string $samesite - * * @return static */ public function withSameSite(string $samesite); @@ -117,8 +101,6 @@ interface CloneableCookieInterface extends CookieInterface /** * Creates a new Cookie with URL encoding option updated. * - * @param bool $raw - * * @return static */ public function withRaw(bool $raw = true); diff --git a/system/Cookie/Cookie.php b/system/Cookie/Cookie.php index 84f0674421..3895e3ee26 100644 --- a/system/Cookie/Cookie.php +++ b/system/Cookie/Cookie.php @@ -158,9 +158,6 @@ class Cookie implements ArrayAccess, CloneableCookieInterface /** * Create a new Cookie instance from a `Set-Cookie` header. * - * @param string $cookie - * @param bool $raw - * * @throws CookieException * * @return static @@ -701,8 +698,6 @@ class Cookie implements ArrayAccess, CloneableCookieInterface * Converts expires time to Unix format. * * @param DateTimeInterface|int|string $expires - * - * @return int */ protected static function convertExpiresTimestamp($expires = 0): int { @@ -735,12 +730,7 @@ class Cookie implements ArrayAccess, CloneableCookieInterface * If `$raw` is true, names should not contain invalid characters * as `setrawcookie()` will reject this. * - * @param string $name - * @param bool $raw - * * @throws CookieException - * - * @return void */ protected function validateName(string $name, bool $raw): void { @@ -756,14 +746,7 @@ class Cookie implements ArrayAccess, CloneableCookieInterface /** * Validates the special prefixes if some attribute requirements are met. * - * @param string $prefix - * @param bool $secure - * @param string $path - * @param string $domain - * * @throws CookieException - * - * @return void */ protected function validatePrefix(string $prefix, bool $secure, string $path, string $domain): void { @@ -779,13 +762,8 @@ class Cookie implements ArrayAccess, CloneableCookieInterface /** * Validates the `SameSite` to be within the allowed types. * - * @param string $samesite - * @param bool $secure - * * @throws CookieException * - * @return void - * * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite */ protected function validateSameSite(string $samesite, bool $secure): void diff --git a/system/Cookie/CookieInterface.php b/system/Cookie/CookieInterface.php index 0576d7ee48..0b2b75783c 100644 --- a/system/Cookie/CookieInterface.php +++ b/system/Cookie/CookieInterface.php @@ -60,78 +60,56 @@ interface CookieInterface /** * Returns a unique identifier for the cookie consisting * of its prefixed name, path, and domain. - * - * @return string */ public function getId(): string; /** * Gets the cookie prefix. - * - * @return string */ public function getPrefix(): string; /** * Gets the cookie name. - * - * @return string */ public function getName(): string; /** * Gets the cookie name prepended with the prefix, if any. - * - * @return string */ public function getPrefixedName(): string; /** * Gets the cookie value. - * - * @return string */ public function getValue(): string; /** * Gets the time in Unix timestamp the cookie expires. - * - * @return int */ public function getExpiresTimestamp(): int; /** * Gets the formatted expires time. - * - * @return string */ public function getExpiresString(): string; /** * Checks if the cookie is expired. - * - * @return bool */ public function isExpired(): bool; /** * Gets the "Max-Age" cookie attribute. - * - * @return int */ public function getMaxAge(): int; /** * Gets the "Path" cookie attribute. - * - * @return string */ public function getPath(): string; /** * Gets the "Domain" cookie attribute. - * - * @return string */ public function getDomain(): string; @@ -141,8 +119,6 @@ interface CookieInterface * Checks if the cookie is only sent to the server when a request is made * with the `https:` scheme (except on `localhost`), and therefore is more * resistent to man-in-the-middle attacks. - * - * @return bool */ public function isSecure(): bool; @@ -150,22 +126,16 @@ interface CookieInterface * Gets the "HttpOnly" cookie attribute. * * Checks if JavaScript is forbidden from accessing the cookie. - * - * @return bool */ public function isHTTPOnly(): bool; /** * Gets the "SameSite" cookie attribute. - * - * @return string */ public function getSameSite(): string; /** * Checks if the cookie should be sent with no URL encoding. - * - * @return bool */ public function isRaw(): bool; @@ -179,8 +149,6 @@ interface CookieInterface /** * Returns the Cookie as a header value. - * - * @return string */ public function toHeaderString(): string; diff --git a/system/Cookie/CookieStore.php b/system/Cookie/CookieStore.php index a7c1e37bb2..8ef45c970f 100644 --- a/system/Cookie/CookieStore.php +++ b/system/Cookie/CookieStore.php @@ -35,7 +35,6 @@ class CookieStore implements Countable, IteratorAggregate * Creates a CookieStore from an array of `Set-Cookie` headers. * * @param string[] $headers - * @param bool $raw * * @throws CookieException * @@ -76,12 +75,6 @@ class CookieStore implements Countable, IteratorAggregate /** * Checks if a `Cookie` object identified by name and * prefix is present in the collection. - * - * @param string $name - * @param string $prefix - * @param string|null $value - * - * @return bool */ public function has(string $name, string $prefix = '', ?string $value = null): bool { @@ -106,12 +99,7 @@ class CookieStore implements Countable, IteratorAggregate * Retrieves an instance of `Cookie` identified by a name and prefix. * This throws an exception if not found. * - * @param string $name - * @param string $prefix - * * @throws CookieException - * - * @return Cookie */ public function get(string $name, string $prefix = ''): Cookie { @@ -130,8 +118,6 @@ class CookieStore implements Countable, IteratorAggregate * Store a new cookie and return a new collection. The original collection * is left unchanged. * - * @param Cookie $cookie - * * @return static */ public function put(Cookie $cookie) @@ -151,9 +137,6 @@ class CookieStore implements Countable, IteratorAggregate * If you intend to delete a cookie *from the browser*, you must put an empty * value cookie with the same name to the store. * - * @param string $name - * @param string $prefix - * * @return static */ public function remove(string $name, string $prefix = '') @@ -175,8 +158,6 @@ class CookieStore implements Countable, IteratorAggregate /** * Dispatches all cookies in store. - * - * @return void */ public function dispatch(): void { @@ -207,8 +188,6 @@ class CookieStore implements Countable, IteratorAggregate /** * Clears the cookie collection. - * - * @return void */ public function clear(): void { @@ -217,8 +196,6 @@ class CookieStore implements Countable, IteratorAggregate /** * Gets the Cookie count in this collection. - * - * @return int */ public function count(): int { @@ -238,11 +215,7 @@ class CookieStore implements Countable, IteratorAggregate /** * Validates all cookies passed to be instances of Cookie. * - * @param array $cookies - * * @throws CookieException - * - * @return void */ protected function validateCookies(array $cookies): void { @@ -259,12 +232,6 @@ class CookieStore implements Countable, IteratorAggregate * Extracted call to `setrawcookie()` in order to run unit tests on it. * * @codeCoverageIgnore - * - * @param string $name - * @param string $value - * @param array $options - * - * @return void */ protected function setRawCookie(string $name, string $value, array $options): void { @@ -275,12 +242,6 @@ class CookieStore implements Countable, IteratorAggregate * Extracted call to `setcookie()` in order to run unit tests on it. * * @codeCoverageIgnore - * - * @param string $name - * @param string $value - * @param array $options - * - * @return void */ protected function setCookie(string $name, string $value, array $options): void { diff --git a/system/Cookie/Exceptions/CookieException.php b/system/Cookie/Exceptions/CookieException.php index 89fd75e9ff..2e69a0e0f8 100644 --- a/system/Cookie/Exceptions/CookieException.php +++ b/system/Cookie/Exceptions/CookieException.php @@ -21,8 +21,6 @@ class CookieException extends FrameworkException /** * Thrown for invalid type given for the "Expires" attribute. * - * @param string $type - * * @return static */ public static function forInvalidExpiresTime(string $type) @@ -43,8 +41,6 @@ class CookieException extends FrameworkException /** * Thrown when the cookie name contains invalid characters per RFC 2616. * - * @param string $name - * * @return static */ public static function forInvalidCookieName(string $name) @@ -87,8 +83,6 @@ class CookieException extends FrameworkException /** * Thrown when the `SameSite` attribute given is not of the valid types. * - * @param string $sameSite - * * @return static */ public static function forInvalidSameSite(string $sameSite) diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index 2dd7933113..1dbd91312a 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -247,9 +247,7 @@ class BaseBuilder /** * Constructor * - * @param array|string $tableName - * @param ConnectionInterface $db - * @param array $options + * @param array|string $tableName * * @throws DatabaseException */ @@ -302,8 +300,6 @@ class BaseBuilder /** * Gets the name of the primary table. - * - * @return string */ public function getTable(): string { @@ -313,8 +309,6 @@ class BaseBuilder /** * Returns an array of bind values and their * named parameters for binding in the Query object later. - * - * @return array */ public function getBinds(): array { @@ -327,8 +321,6 @@ class BaseBuilder * Set ignore Flag for next insert, * update or delete query. * - * @param bool $ignore - * * @return $this */ public function ignore(bool $ignore = true) @@ -467,8 +459,6 @@ class BaseBuilder * @used-by selectSum() * * @param string $select Field name - * @param string $alias - * @param string $type * * @throws DatabaseException * @throws DataException @@ -505,10 +495,6 @@ class BaseBuilder /** * Determines the alias name based on the table - * - * @param string $item - * - * @return string */ protected function createAliasFromTable(string $item): string { @@ -526,8 +512,6 @@ class BaseBuilder * * Sets a flag which tells the query string compiler to add DISTINCT * - * @param bool $val - * * @return $this */ public function distinct(bool $val = true) @@ -581,7 +565,6 @@ class BaseBuilder * * Generates the JOIN portion of the query * - * @param string $table * @param string $cond The join condition * @param string $type The type of join * @param bool $escape Whether not to try to escape identifiers @@ -697,7 +680,6 @@ class BaseBuilder * @param string $qbKey 'QBWhere' or 'QBHaving' * @param mixed $key * @param mixed $value - * @param string $type * @param bool $escape * * @return $this @@ -908,7 +890,6 @@ class BaseBuilder * @param string $key The field to search * @param array|Closure|null $values The values searched on, or anonymous function with subquery * @param bool $not If the statement would be IN or NOT IN - * @param string $type * @param bool $escape * @param string $clause (Internal use only) * @@ -973,11 +954,9 @@ class BaseBuilder * Generates a %LIKE% portion of the query. * Separates multiple calls with 'AND'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @param bool $insensitiveSearch IF true, will force a case-insensitive search + * @param mixed $field + * @param bool $escape + * @param bool $insensitiveSearch IF true, will force a case-insensitive search * * @return $this */ @@ -992,11 +971,9 @@ class BaseBuilder * Generates a NOT LIKE portion of the query. * Separates multiple calls with 'AND'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @param bool $insensitiveSearch IF true, will force a case-insensitive search + * @param mixed $field + * @param bool $escape + * @param bool $insensitiveSearch IF true, will force a case-insensitive search * * @return $this */ @@ -1011,11 +988,9 @@ class BaseBuilder * Generates a %LIKE% portion of the query. * Separates multiple calls with 'OR'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @param bool $insensitiveSearch IF true, will force a case-insensitive search + * @param mixed $field + * @param bool $escape + * @param bool $insensitiveSearch IF true, will force a case-insensitive search * * @return $this */ @@ -1030,11 +1005,9 @@ class BaseBuilder * Generates a NOT LIKE portion of the query. * Separates multiple calls with 'OR'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape - * @param bool $insensitiveSearch IF true, will force a case-insensitive search + * @param mixed $field + * @param bool $escape + * @param bool $insensitiveSearch IF true, will force a case-insensitive search * * @return $this */ @@ -1049,10 +1022,8 @@ class BaseBuilder * Generates a %LIKE% portion of the query. * Separates multiple calls with 'AND'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape + * @param mixed $field + * @param bool $escape * * @return $this */ @@ -1067,10 +1038,8 @@ class BaseBuilder * Generates a NOT LIKE portion of the query. * Separates multiple calls with 'AND'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape + * @param mixed $field + * @param bool $escape * * @return $this */ @@ -1085,10 +1054,8 @@ class BaseBuilder * Generates a %LIKE% portion of the query. * Separates multiple calls with 'OR'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape + * @param mixed $field + * @param bool $escape * * @return $this */ @@ -1103,10 +1070,8 @@ class BaseBuilder * Generates a NOT LIKE portion of the query. * Separates multiple calls with 'OR'. * - * @param mixed $field - * @param string $match - * @param string $side - * @param bool $escape + * @param mixed $field + * @param bool $escape * * @return $this */ @@ -1128,10 +1093,6 @@ class BaseBuilder * @used-by orNotHavingLike() * * @param mixed $field - * @param string $match - * @param string $type - * @param string $side - * @param string $not * @param bool $escape * @param bool $insensitiveSearch IF true, will force a case-insensitive search * @param string $clause (Internal use only) @@ -1185,12 +1146,6 @@ class BaseBuilder /** * Platform independent LIKE statement builder. * - * @param string|null $prefix - * @param string $column - * @param string|null $not - * @param string $bind - * @param bool $insensitiveSearch - * * @return string $like_statement */ protected function _like_statement(?string $prefix, string $column, ?string $not, string $bind, bool $insensitiveSearch = false): string @@ -1305,10 +1260,6 @@ class BaseBuilder /** * Prepate a query group start. * - * @param string $not - * @param string $type - * @param string $clause - * * @return $this */ protected function groupStartPrepare(string $not = '', string $type = 'AND ', string $clause = 'QBWhere') @@ -1330,8 +1281,6 @@ class BaseBuilder /** * Prepate a query group end. * - * @param string $clause - * * @return $this */ protected function groupEndPrepare(string $clause = 'QBWhere') @@ -1355,10 +1304,6 @@ class BaseBuilder * @used-by whereHaving() * @used-by _whereIn() * @used-by havingGroupStart() - * - * @param string $type - * - * @return string */ protected function groupGetType(string $type): string { @@ -1439,7 +1384,6 @@ class BaseBuilder /** * ORDER BY * - * @param string $orderBy * @param string $direction ASC, DESC or RANDOM * @param bool $escape * @@ -1538,8 +1482,6 @@ class BaseBuilder * Generates a platform-specific LIMIT clause. * * @param string $sql SQL Query - * - * @return string */ protected function _limit(string $sql, bool $offsetIgnore = false): string { @@ -1582,10 +1524,6 @@ class BaseBuilder /** * Returns the previously set() data, alternatively resetting it * if needed. - * - * @param bool $clean - * - * @return array */ public function getSetData(bool $clean = false): array { @@ -1604,8 +1542,6 @@ class BaseBuilder * Compiles a SELECT query string and returns the sql. * * @param bool $reset TRUE: resets QB values; FALSE: leave QB values alone - * - * @return string */ public function getCompiledSelect(bool $reset = true): string { @@ -1621,10 +1557,6 @@ class BaseBuilder /** * Returns a finalized, compiled query string with the bindings * inserted and prefixes swapped out. - * - * @param string $sql - * - * @return string */ protected function compileFinalQuery(string $sql): string { @@ -1711,8 +1643,6 @@ class BaseBuilder * Generates a platform-specific query string that counts all records * returned by an Query Builder query. * - * @param bool $reset - * * @return int|string when $test = true */ public function countAllResults(bool $reset = true) @@ -1884,8 +1814,6 @@ class BaseBuilder * @param string $table Table name * @param array $keys INSERT keys * @param array $values INSERT values - * - * @return string */ protected function _insertBatch(string $table, array $keys, array $values): string { @@ -1895,9 +1823,8 @@ class BaseBuilder /** * The "setInsertBatch" function. Allows key/value pairs to be set for batch inserts * - * @param mixed $key - * @param string $value - * @param bool $escape + * @param mixed $key + * @param bool $escape * * @return $this|null */ @@ -2033,8 +1960,6 @@ class BaseBuilder * has been chosen to be inserted into. * * @throws DatabaseException - * - * @return bool */ protected function validateInsert(): bool { @@ -2058,8 +1983,6 @@ class BaseBuilder * @param string $table The table name * @param array $keys The insert keys * @param array $unescapedKeys The insert values - * - * @return string */ protected function _insert(string $table, array $keys, array $unescapedKeys): string { @@ -2109,8 +2032,6 @@ class BaseBuilder * @param string $table The table name * @param array $keys The insert keys * @param array $values The insert values - * - * @return string */ protected function _replace(string $table, array $keys, array $values): string { @@ -2124,8 +2045,6 @@ class BaseBuilder * about operator precedence. * * Note: This is only used (and overridden) by MySQL and SQLSRV. - * - * @return string */ protected function _fromTables(): string { @@ -2218,8 +2137,6 @@ class BaseBuilder * * @param string $table the Table name * @param array $values the Update data - * - * @return string */ protected function _update(string $table, array $values): string { @@ -2243,8 +2160,6 @@ class BaseBuilder * chosen to be update. * * @throws DatabaseException - * - * @return bool */ protected function validateUpdate(): bool { @@ -2343,8 +2258,6 @@ class BaseBuilder * @param string $table Table name * @param array $values Update data * @param string $index WHERE key - * - * @return string */ protected function _updateBatch(string $table, array $values, string $index): string { @@ -2378,7 +2291,6 @@ class BaseBuilder * The "setUpdateBatch" function. Allows key/value pairs to be set for batch updating * * @param array|object $key - * @param string $index * @param bool $escape * * @throws DatabaseException @@ -2476,8 +2388,6 @@ class BaseBuilder * then this method maps to 'DELETE FROM table' * * @param string $table The table name - * - * @return string */ protected function _truncate(string $table): string { @@ -2490,8 +2400,6 @@ class BaseBuilder * Compiles a delete query string and returns the sql * * @param bool $reset TRUE: reset QB values; FALSE: leave QB values alone - * - * @return string */ public function getCompiledDelete(bool $reset = true): string { @@ -2506,9 +2414,8 @@ class BaseBuilder * * Compiles a delete string and runs the query * - * @param mixed $where The where clause - * @param int $limit The limit clause - * @param bool $resetData + * @param mixed $where The where clause + * @param int $limit The limit clause * * @throws DatabaseException * @@ -2555,9 +2462,6 @@ class BaseBuilder /** * Increments a numeric column by the specified value. * - * @param string $column - * @param int $value - * * @return bool */ public function increment(string $column, int $value = 1) @@ -2572,9 +2476,6 @@ class BaseBuilder /** * Decrements a numeric column by the specified value. * - * @param string $column - * @param int $value - * * @return bool */ public function decrement(string $column, int $value = 1) @@ -2592,8 +2493,6 @@ class BaseBuilder * Generates a platform-specific delete string from the supplied data * * @param string $table The table name - * - * @return string */ protected function _delete(string $table): string { @@ -2645,8 +2544,6 @@ class BaseBuilder * Should not be called directly. * * @param mixed $selectOverride - * - * @return string */ protected function compileSelect($selectOverride = false): string { @@ -2699,8 +2596,6 @@ class BaseBuilder * Checks if the ignore option is supported by * the Database Driver for the specific statement. * - * @param string $statement - * * @return string */ protected function compileIgnore(string $statement) @@ -2919,10 +2814,6 @@ class BaseBuilder * Is literal * * Determines if a string represents a literal value or a field name - * - * @param string $str - * - * @return bool */ protected function isLiteral(string $str): bool { @@ -3022,10 +2913,6 @@ class BaseBuilder /** * Tests whether the string has an SQL operator - * - * @param string $str - * - * @return bool */ protected function hasOperator(string $str): bool { @@ -3035,9 +2922,6 @@ class BaseBuilder /** * Returns the SQL string operator * - * @param string $str - * @param bool $list - * * @return mixed */ protected function getOperator(string $str, bool $list = false) @@ -3071,11 +2955,7 @@ class BaseBuilder * with PHP 7+ we get a huge memory/performance gain with indexed * arrays instead, so lets take advantage of that here. * - * @param string $key - * @param mixed $value - * @param bool $escape - * - * @return string + * @param mixed $value */ protected function setBind(string $key, $value = null, bool $escape = true): string { diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index 675c9958d0..3663744167 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -297,8 +297,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Saves our connection settings. - * - * @param array $params */ public function __construct(array $params) { @@ -387,8 +385,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Connect to the database. * - * @param bool $persistent - * * @return mixed */ abstract public function connect(bool $persistent = false); @@ -437,8 +433,6 @@ abstract class BaseConnection implements ConnectionInterface * get that connection. If you pass either alias in and only a single * connection is present, it must return the sole connection. * - * @param string|null $alias - * * @return mixed */ public function getConnection(?string $alias = null) @@ -450,16 +444,12 @@ abstract class BaseConnection implements ConnectionInterface /** * Select a specific database table to use. * - * @param string $databaseName - * * @return mixed */ abstract public function setDatabase(string $databaseName); /** * Returns the name of the current database being used. - * - * @return string */ public function getDatabase(): string { @@ -472,8 +462,6 @@ abstract class BaseConnection implements ConnectionInterface * Set's the DB Prefix to something new without needing to reconnect * * @param string $prefix The prefix - * - * @return string */ public function setPrefix(string $prefix = ''): string { @@ -482,8 +470,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Returns the database prefix. - * - * @return string */ public function getPrefix(): string { @@ -492,8 +478,6 @@ abstract class BaseConnection implements ConnectionInterface /** * The name of the platform in use (MySQLi, mssql, etc) - * - * @return string */ public function getPlatform(): string { @@ -502,8 +486,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Returns a string containing the version of the database being used. - * - * @return string */ abstract public function getVersion(): string; @@ -512,8 +494,6 @@ abstract class BaseConnection implements ConnectionInterface * collected during use of the Builder, and set here * so queries are built correctly. * - * @param array $aliases - * * @return $this */ public function setAliasedTables(array $aliases) @@ -526,8 +506,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Add a table alias to our list. * - * @param string $table - * * @return $this */ public function addTableAlias(string $table) @@ -542,8 +520,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Executes the query against the database. * - * @param string $sql - * * @return mixed */ abstract protected function execute(string $sql); @@ -556,10 +532,7 @@ abstract class BaseConnection implements ConnectionInterface * Should automatically handle different connections for read/write * queries if needed. * - * @param string $sql - * @param mixed ...$binds - * @param bool $setEscapeFlags - * @param string $queryClass + * @param mixed ...$binds * * @return BaseResult|bool|Query * @@ -655,8 +628,6 @@ abstract class BaseConnection implements ConnectionInterface * is performed, nor are transactions handled. Simply takes a raw * query string and returns the database-specific result id. * - * @param string $sql - * * @return mixed */ public function simpleQuery(string $sql) @@ -703,10 +674,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Start Transaction - * - * @param bool $testMode - * - * @return bool */ public function transStart(bool $testMode = false): bool { @@ -719,8 +686,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Complete Transaction - * - * @return bool */ public function transComplete(): bool { @@ -748,8 +713,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Lets you retrieve the transaction flag to determine if it has failed - * - * @return bool */ public function transStatus(): bool { @@ -758,10 +721,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Begin Transaction - * - * @param bool $testMode - * - * @return bool */ public function transBegin(bool $testMode = false): bool { @@ -796,8 +755,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Commit Transaction - * - * @return bool */ public function transCommit(): bool { @@ -817,8 +774,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Rollback Transaction - * - * @return bool */ public function transRollback(): bool { @@ -838,22 +793,16 @@ abstract class BaseConnection implements ConnectionInterface /** * Begin Transaction - * - * @return bool */ abstract protected function _transBegin(): bool; /** * Commit Transaction - * - * @return bool */ abstract protected function _transCommit(): bool; /** * Rollback Transaction - * - * @return bool */ abstract protected function _transRollback(): bool; @@ -891,8 +840,7 @@ abstract class BaseConnection implements ConnectionInterface * ->get(); * }) * - * @param Closure $func - * @param array $options Passed to the prepare() method + * @param array $options Passed to the prepare() method * * @return BasePreparedQuery|null */ @@ -934,8 +882,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Returns a string representation of the last query's statement object. - * - * @return string */ public function showLastQuery(): string { @@ -947,8 +893,6 @@ abstract class BaseConnection implements ConnectionInterface * seconds with microseconds. * * Used by the Debug Toolbar's timeline. - * - * @return float|null */ public function getConnectStart(): ?float { @@ -960,10 +904,6 @@ abstract class BaseConnection implements ConnectionInterface * to connect to the database. * * Used by the Debug Toolbar's timeline. - * - * @param int $decimals - * - * @return string */ public function getConnectDuration(int $decimals = 6): string { @@ -991,9 +931,7 @@ abstract class BaseConnection implements ConnectionInterface * the correct identifiers. * * @param array|string $item - * @param bool $prefixSingle * @param bool $protectIdentifiers - * @param bool $fieldExists * * @return array|string */ @@ -1196,8 +1134,6 @@ abstract class BaseConnection implements ConnectionInterface * @param string $table the table * * @throws DatabaseException - * - * @return string */ public function prefixTable(string $table = ''): string { @@ -1210,8 +1146,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Returns the total number of rows affected by this query. - * - * @return int */ abstract public function affectedRows(): int; @@ -1305,10 +1239,6 @@ abstract class BaseConnection implements ConnectionInterface * Platform independent string escape. * * Will likely be overridden in child classes. - * - * @param string $str - * - * @return string */ protected function _escapeString(string $str): string { @@ -1319,12 +1249,9 @@ abstract class BaseConnection implements ConnectionInterface * This function enables you to call PHP database functions that are not natively included * in CodeIgniter, in a platform independent manner. * - * @param string $functionName - * @param array ...$params + * @param array ...$params * * @throws DatabaseException - * - * @return bool */ public function callFunction(string $functionName, ...$params): bool { @@ -1405,10 +1332,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Determine if a particular table exists - * - * @param string $tableName - * - * @return bool */ public function tableExists(string $tableName): bool { @@ -1467,11 +1390,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Determine if a particular field exists - * - * @param string $fieldName - * @param string $tableName - * - * @return bool */ public function fieldExists(string $fieldName, string $tableName): bool { @@ -1540,8 +1458,6 @@ abstract class BaseConnection implements ConnectionInterface * * This is primarily used by the prepared query functionality. * - * @param bool $pretend - * * @return $this */ public function pretend(bool $pretend = true) @@ -1567,8 +1483,6 @@ abstract class BaseConnection implements ConnectionInterface * Determines if the statement is a write-type query or not. * * @param string $sql - * - * @return bool */ public function isWriteType($sql): bool { @@ -1581,8 +1495,6 @@ abstract class BaseConnection implements ConnectionInterface * Must return an array with keys 'code' and 'message': * * return ['code' => null, 'message' => null); - * - * @return array */ abstract public function error(): array; @@ -1596,8 +1508,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Generates the SQL for listing tables in a platform-dependent manner. * - * @param bool $constrainByPrefix - * * @return false|string */ abstract protected function _listTables(bool $constrainByPrefix = false); @@ -1605,8 +1515,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Generates a platform-specific query string so that the column names can be fetched. * - * @param string $table - * * @return false|string */ abstract protected function _listColumns(string $table = ''); @@ -1614,41 +1522,27 @@ abstract class BaseConnection implements ConnectionInterface /** * Platform-specific field data information. * - * @param string $table - * * @see getFieldData() - * - * @return array */ abstract protected function _fieldData(string $table): array; /** * Platform-specific index data. * - * @param string $table - * * @see getIndexData() - * - * @return array */ abstract protected function _indexData(string $table): array; /** * Platform-specific foreign keys data. * - * @param string $table - * * @see getForeignKeyData() - * - * @return array */ abstract protected function _foreignKeyData(string $table): array; /** * Accessor for properties if they exist. * - * @param string $key - * * @return mixed */ public function __get(string $key) @@ -1662,10 +1556,6 @@ abstract class BaseConnection implements ConnectionInterface /** * Checker for properties existence. - * - * @param string $key - * - * @return bool */ public function __isset(string $key): bool { diff --git a/system/Database/BasePreparedQuery.php b/system/Database/BasePreparedQuery.php index db2b02e054..8cc5049126 100644 --- a/system/Database/BasePreparedQuery.php +++ b/system/Database/BasePreparedQuery.php @@ -57,8 +57,6 @@ abstract class BasePreparedQuery implements PreparedQueryInterface /** * Constructor. - * - * @param BaseConnection $db */ public function __construct(BaseConnection $db) { @@ -72,9 +70,7 @@ abstract class BasePreparedQuery implements PreparedQueryInterface * NOTE: This version is based on SQL code. Child classes should * override this method. * - * @param string $sql - * @param array $options Passed to the connection's prepare statement. - * @param string $queryClass + * @param array $options Passed to the connection's prepare statement. * * @return mixed */ @@ -104,8 +100,7 @@ abstract class BasePreparedQuery implements PreparedQueryInterface /** * The database-dependent portion of the prepare statement. * - * @param string $sql - * @param array $options Passed to the connection's prepare statement. + * @param array $options Passed to the connection's prepare statement. * * @return mixed */ @@ -145,10 +140,6 @@ abstract class BasePreparedQuery implements PreparedQueryInterface /** * The database dependant version of the execute method. - * - * @param array $data - * - * @return bool */ abstract public function _execute(array $data): bool; @@ -175,8 +166,6 @@ abstract class BasePreparedQuery implements PreparedQueryInterface /** * Returns the SQL that has been prepared. - * - * @return string */ public function getQueryString(): string { @@ -189,8 +178,6 @@ abstract class BasePreparedQuery implements PreparedQueryInterface /** * A helper to determine if any error exists. - * - * @return bool */ public function hasError(): bool { @@ -199,8 +186,6 @@ abstract class BasePreparedQuery implements PreparedQueryInterface /** * Returns the error code created while executing this statement. - * - * @return int */ public function getErrorCode(): int { @@ -209,8 +194,6 @@ abstract class BasePreparedQuery implements PreparedQueryInterface /** * Returns the error message created while executing this statement. - * - * @return string */ public function getErrorMessage(): string { diff --git a/system/Database/BaseResult.php b/system/Database/BaseResult.php index e44de7b47b..46e66f2434 100644 --- a/system/Database/BaseResult.php +++ b/system/Database/BaseResult.php @@ -92,8 +92,6 @@ abstract class BaseResult implements ResultInterface * 'object', or a custom class name. * * @param string $type The row type. Either 'array', 'object', or a class name to use - * - * @return array */ public function getResult(string $type = 'object'): array { @@ -166,8 +164,6 @@ abstract class BaseResult implements ResultInterface * Returns the results as an array of arrays. * * If no results, an empty array is returned. - * - * @return array */ public function getResultArray(): array { @@ -205,8 +201,6 @@ abstract class BaseResult implements ResultInterface * Returns the results as an array of objects. * * If no results, an empty array is returned. - * - * @return array */ public function getResultObject(): array { @@ -288,9 +282,6 @@ abstract class BaseResult implements ResultInterface * * If row doesn't exists, returns null. * - * @param int $n - * @param string $className - * * @return mixed */ public function getCustomRowObject(int $n, string $className) @@ -315,8 +306,6 @@ abstract class BaseResult implements ResultInterface * * If row doesn't exist, returns null. * - * @param int $n - * * @return mixed */ public function getRowArray(int $n = 0) @@ -338,8 +327,6 @@ abstract class BaseResult implements ResultInterface * * If row doesn't exist, returns null. * - * @param int $n - * * @return mixed */ public function getRowObject(int $n = 0) @@ -387,8 +374,6 @@ abstract class BaseResult implements ResultInterface /** * Returns the "first" row of the current results. * - * @param string $type - * * @return mixed */ public function getFirstRow(string $type = 'object') @@ -401,8 +386,6 @@ abstract class BaseResult implements ResultInterface /** * Returns the "last" row of the current results. * - * @param string $type - * * @return mixed */ public function getLastRow(string $type = 'object') @@ -415,8 +398,6 @@ abstract class BaseResult implements ResultInterface /** * Returns the "next" row of the current results. * - * @param string $type - * * @return mixed */ public function getNextRow(string $type = 'object') @@ -432,8 +413,6 @@ abstract class BaseResult implements ResultInterface /** * Returns the "previous" row of the current results. * - * @param string $type - * * @return mixed */ public function getPreviousRow(string $type = 'object') @@ -453,8 +432,6 @@ abstract class BaseResult implements ResultInterface /** * Returns an unbuffered row and move the pointer to the next row. * - * @param string $type - * * @return mixed */ public function getUnbufferedRow(string $type = 'object') @@ -474,8 +451,6 @@ abstract class BaseResult implements ResultInterface * Number of rows in the result set; checks for previous count, falls * back on counting resultArray or resultObject, finally fetching resultArray * if nothing was previously fetched - * - * @return int */ public function getNumRows(): int { @@ -494,22 +469,16 @@ abstract class BaseResult implements ResultInterface /** * Gets the number of fields in the result set. - * - * @return int */ abstract public function getFieldCount(): int; /** * Generates an array of column names in the result set. - * - * @return array */ abstract public function getFieldNames(): array; /** * Generates an array of objects representing field meta-data. - * - * @return array */ abstract public function getFieldData(): array; @@ -525,8 +494,6 @@ abstract class BaseResult implements ResultInterface * internally before fetching results to make sure the result set * starts at zero. * - * @param int $n - * * @return mixed */ abstract public function dataSeek(int $n = 0); @@ -545,8 +512,6 @@ abstract class BaseResult implements ResultInterface * * Overridden by child classes. * - * @param string $className - * * @return object */ abstract protected function fetchObject(string $className = 'stdClass'); diff --git a/system/Database/BaseUtils.php b/system/Database/BaseUtils.php index 4f6c571236..24753ff176 100644 --- a/system/Database/BaseUtils.php +++ b/system/Database/BaseUtils.php @@ -48,8 +48,6 @@ abstract class BaseUtils /** * Class constructor - * - * @param ConnectionInterface $db */ public function __construct(ConnectionInterface &$db) { @@ -94,10 +92,6 @@ abstract class BaseUtils /** * Determine if a particular database exists - * - * @param string $databaseName - * - * @return bool */ public function databaseExists(string $databaseName): bool { @@ -107,8 +101,6 @@ abstract class BaseUtils /** * Optimize Table * - * @param string $tableName - * * @throws DatabaseException * * @return bool @@ -176,8 +168,6 @@ abstract class BaseUtils /** * Repair Table * - * @param string $tableName - * * @throws DatabaseException * * @return mixed @@ -241,8 +231,6 @@ abstract class BaseUtils * * @param ResultInterface $query Query result object * @param array $params Any preferences - * - * @return string */ public function getXMLFromResult(ResultInterface $query, array $params = []): string { @@ -349,8 +337,6 @@ abstract class BaseUtils /** * Platform dependent version of the backup function. * - * @param array|null $prefs - * * @return mixed */ abstract public function _backup(?array $prefs = null); diff --git a/system/Database/Config.php b/system/Database/Config.php index 681662a436..4e7deec45c 100644 --- a/system/Database/Config.php +++ b/system/Database/Config.php @@ -85,8 +85,6 @@ class Config extends BaseConfig /** * Returns an array of all db connections currently made. - * - * @return array */ public static function getConnections(): array { @@ -125,8 +123,6 @@ class Config extends BaseConfig /** * Returns a new instance of the Database Seeder. * - * @param string|null $group - * * @return Seeder */ public static function seeder(?string $group = null) diff --git a/system/Database/ConnectionInterface.php b/system/Database/ConnectionInterface.php index 4ebd0fb0a3..a937800b3a 100644 --- a/system/Database/ConnectionInterface.php +++ b/system/Database/ConnectionInterface.php @@ -26,8 +26,6 @@ interface ConnectionInterface /** * Connect to the database. * - * @param bool $persistent - * * @return mixed */ public function connect(bool $persistent = false); @@ -53,8 +51,6 @@ interface ConnectionInterface * get that connection. If you pass either alias in and only a single * connection is present, it must return the sole connection. * - * @param string|null $alias - * * @return mixed */ public function getConnection(?string $alias = null); @@ -62,16 +58,12 @@ interface ConnectionInterface /** * Select a specific database table to use. * - * @param string $databaseName - * * @return mixed */ public function setDatabase(string $databaseName); /** * Returns the name of the current database being used. - * - * @return string */ public function getDatabase(): string; @@ -80,21 +72,17 @@ interface ConnectionInterface * Must return this format: ['code' => string|int, 'message' => string] * intval(code) === 0 means "no error". * - * @return array + * @return array */ public function error(): array; /** * The name of the platform in use (MySQLi, mssql, etc) - * - * @return string */ public function getPlatform(): string; /** * Returns a string containing the version of the database being used. - * - * @return string */ public function getVersion(): string; @@ -106,8 +94,7 @@ interface ConnectionInterface * Should automatically handle different connections for read/write * queries if needed. * - * @param string $sql - * @param mixed ...$binds + * @param mixed ...$binds * * @return BaseResult|bool|Query */ @@ -118,8 +105,6 @@ interface ConnectionInterface * is performed, nor are transactions handled. Simply takes a raw * query string and returns the database-specific result id. * - * @param string $sql - * * @return mixed */ public function simpleQuery(string $sql); @@ -156,8 +141,7 @@ interface ConnectionInterface * Allows for custom calls to the database engine that are not * supported through our database layer. * - * @param string $functionName - * @param array ...$params + * @param array ...$params * * @return mixed */ @@ -167,8 +151,6 @@ interface ConnectionInterface * Determines if the statement is a write-type query or not. * * @param string $sql - * - * @return bool */ public function isWriteType($sql): bool; } diff --git a/system/Database/Database.php b/system/Database/Database.php index a0797190d8..3d3774925a 100644 --- a/system/Database/Database.php +++ b/system/Database/Database.php @@ -35,9 +35,6 @@ class Database * Parses the connection binds and returns an instance of the driver * ready to go. * - * @param array $params - * @param string $alias - * * @throws InvalidArgumentException * * @return mixed @@ -68,10 +65,6 @@ class Database /** * Creates a Forge instance for the current database type. - * - * @param ConnectionInterface $db - * - * @return object */ public function loadForge(ConnectionInterface $db): object { @@ -85,10 +78,6 @@ class Database /** * Creates a Utils instance for the current database type. - * - * @param ConnectionInterface $db - * - * @return object */ public function loadUtils(ConnectionInterface $db): object { @@ -103,11 +92,7 @@ class Database /** * Parse universal DSN string * - * @param array $params - * * @throws InvalidArgumentException - * - * @return array */ protected function parseDSN(array $params): array { @@ -149,8 +134,6 @@ class Database * @param string $driver Database driver name (e.g. 'MySQLi') * @param string $class Database class name (e.g. 'Forge') * @param array|object $argument - * - * @return object */ protected function initDriver(string $driver, string $class, $argument): object { diff --git a/system/Database/Exceptions/DataException.php b/system/Database/Exceptions/DataException.php index fb713038df..09b9ff3297 100644 --- a/system/Database/Exceptions/DataException.php +++ b/system/Database/Exceptions/DataException.php @@ -21,8 +21,6 @@ class DataException extends RuntimeException implements ExceptionInterface /** * Used by the Model's trigger() method when the callback cannot be found. * - * @param string $method - * * @return DataException */ public static function forInvalidMethodTriggered(string $method) @@ -34,8 +32,6 @@ class DataException extends RuntimeException implements ExceptionInterface * Used by Model's insert/update methods when there isn't * any data to actually work with. * - * @param string $mode - * * @return DataException */ public static function forEmptyDataset(string $mode) @@ -48,8 +44,6 @@ class DataException extends RuntimeException implements ExceptionInterface * primary key defined and Model has option `useAutoIncrement` * set to false. * - * @param string $mode - * * @return DataException */ public static function forEmptyPrimaryKey(string $mode) @@ -62,8 +56,6 @@ class DataException extends RuntimeException implements ExceptionInterface * were empty or otherwise invalid, and they could not be * to work correctly for that method. * - * @param string $argument - * * @return DataException */ public static function forInvalidArgument(string $argument) diff --git a/system/Database/Forge.php b/system/Database/Forge.php index 0f9f6bf577..8f6b7b820a 100644 --- a/system/Database/Forge.php +++ b/system/Database/Forge.php @@ -162,8 +162,6 @@ class Forge /** * Constructor. - * - * @param BaseConnection $db */ public function __construct(BaseConnection $db) { @@ -183,12 +181,9 @@ class Forge /** * Create database * - * @param string $dbName - * @param bool $ifNotExists Whether to add IF NOT EXISTS condition + * @param bool $ifNotExists Whether to add IF NOT EXISTS condition * * @throws DatabaseException - * - * @return bool */ public function createDatabase(string $dbName, bool $ifNotExists = false): bool { @@ -237,11 +232,7 @@ class Forge /** * Determine if a database exists * - * @param string $dbName - * * @throws DatabaseException - * - * @return bool */ private function databaseExists(string $dbName): bool { @@ -259,11 +250,7 @@ class Forge /** * Drop database * - * @param string $dbName - * * @throws DatabaseException - * - * @return bool */ public function dropDatabase(string $dbName): bool { @@ -297,8 +284,6 @@ class Forge * Add Key * * @param array|string $key - * @param bool $primary - * @param bool $unique * * @return Forge */ @@ -381,12 +366,6 @@ class Forge /** * Add Foreign Key * - * @param string $fieldName - * @param string $tableName - * @param string $tableField - * @param string $onUpdate - * @param string $onDelete - * * @throws DatabaseException * * @return Forge @@ -547,8 +526,6 @@ class Forge * CREATE TABLE attributes * * @param array $attributes Associative array of table attributes - * - * @return string */ protected function _createTableAttributes(array $attributes): string { @@ -695,8 +672,6 @@ class Forge * @param array|string $field Column definition * * @throws DatabaseException - * - * @return bool */ public function addColumn(string $table, $field): bool { @@ -759,8 +734,6 @@ class Forge * @param array|string $field Column definition * * @throws DatabaseException - * - * @return bool */ public function modifyColumn(string $table, $field): bool { @@ -839,10 +812,6 @@ class Forge /** * Process fields - * - * @param bool $createTable - * - * @return array */ protected function _processFields(bool $createTable = false): array { @@ -926,10 +895,6 @@ class Forge /** * Process column - * - * @param array $field - * - * @return string */ protected function _processColumn(array $field): string { @@ -947,8 +912,6 @@ class Forge * * Performs a data type mapping between different databases. * - * @param array $attributes - * * @return void */ protected function _attributeType(array &$attributes) @@ -968,9 +931,6 @@ class Forge * - array(TYPE => UTYPE) will change $field['type'], * from TYPE to UTYPE in case of a match * - * @param array $attributes - * @param array $field - * * @return void|null */ protected function _attributeUnsigned(array &$attributes, array &$field) @@ -1006,9 +966,6 @@ class Forge /** * Field attribute DEFAULT * - * @param array $attributes - * @param array $field - * * @return void|null */ protected function _attributeDefault(array &$attributes, array &$field) @@ -1033,9 +990,6 @@ class Forge /** * Field attribute UNIQUE * - * @param array $attributes - * @param array $field - * * @return void */ protected function _attributeUnique(array &$attributes, array &$field) @@ -1048,9 +1002,6 @@ class Forge /** * Field attribute AUTO_INCREMENT * - * @param array $attributes - * @param array $field - * * @return void */ protected function _attributeAutoIncrement(array &$attributes, array &$field) @@ -1066,8 +1017,6 @@ class Forge * Process primary keys * * @param string $table Table name - * - * @return string */ protected function _processPrimaryKeys(string $table): string { @@ -1090,8 +1039,6 @@ class Forge /** * Process indexes * - * @param string $table - * * @return array|string */ protected function _processIndexes(string $table) @@ -1130,8 +1077,6 @@ class Forge * Process foreign keys * * @param string $table Table name - * - * @return string */ protected function _processForeignKeys(string $table): string { diff --git a/system/Database/MigrationRunner.php b/system/Database/MigrationRunner.php index 0896379635..5669c2a6d9 100644 --- a/system/Database/MigrationRunner.php +++ b/system/Database/MigrationRunner.php @@ -127,7 +127,6 @@ class MigrationRunner * - existing connection instance * - array of database configuration values * - * @param MigrationsConfig $config * @param array|ConnectionInterface|string|null $db * * @throws ConfigException @@ -153,8 +152,6 @@ class MigrationRunner /** * Locate and run all new migrations * - * @param string|null $group - * * @throws ConfigException * @throws RuntimeException * @@ -229,8 +226,7 @@ class MigrationRunner * * Calls each migration step required to get to the provided batch * - * @param int $targetBatch Target batch number, or negative for a relative batch, 0 for all - * @param string|null $group + * @param int $targetBatch Target batch number, or negative for a relative batch, 0 for all * * @throws ConfigException * @throws RuntimeException @@ -351,9 +347,8 @@ class MigrationRunner * Method "up" or "down" determined by presence in history. * NOTE: This is not recommended and provided mostly for testing. * - * @param string $path Full path to a valid migration file - * @param string $path Namespace of the target migration - * @param string|null $group + * @param string $path Full path to a valid migration file + * @param string $path Namespace of the target migration */ public function force(string $path, string $namespace, ?string $group = null) { @@ -548,8 +543,6 @@ class MigrationRunner * Set database Group. * Allows other scripts to modify on the fly as needed. * - * @param string $group - * * @return MigrationRunner */ public function setGroup(string $group) @@ -562,8 +555,6 @@ class MigrationRunner /** * Set migration Name. * - * @param string $name - * * @return MigrationRunner */ public function setName(string $name) @@ -577,8 +568,6 @@ class MigrationRunner * If $silent == true, then will not throw exceptions and will * attempt to continue gracefully. * - * @param bool $silent - * * @return MigrationRunner */ public function setSilent(bool $silent) @@ -591,8 +580,6 @@ class MigrationRunner /** * Extracts the migration number from a filename * - * @param string $migration - * * @return string Numeric portion of a migration filename */ protected function getMigrationNumber(string $migration): string @@ -605,8 +592,6 @@ class MigrationRunner /** * Extracts the migration class name from a filename * - * @param string $migration - * * @return string text portion of a migration filename */ protected function getMigrationName(string $migration): string @@ -622,8 +607,6 @@ class MigrationRunner * to create a sortable unique key * * @param object $object migration or $history - * - * @return string */ public function getObjectUid($object): string { @@ -668,7 +651,6 @@ class MigrationRunner * Add a history to the table. * * @param object $migration - * @param int $batch * * @return void */ @@ -718,10 +700,6 @@ class MigrationRunner /** * Grabs the full migration history from the database for a group - * - * @param string $group - * - * @return array */ public function getHistory(string $group = 'default'): array { @@ -747,9 +725,7 @@ class MigrationRunner /** * Returns the migration history for a single batch. * - * @param int $batch - * - * @return array + * @param mixed $order */ public function getBatchHistory(int $batch, $order = 'asc'): array { @@ -765,8 +741,6 @@ class MigrationRunner /** * Returns all the batches from the database history in order - * - * @return array */ public function getBatches(): array { @@ -784,8 +758,6 @@ class MigrationRunner /** * Returns the value of the last batch in the database. - * - * @return int */ public function getLastBatch(): int { @@ -806,10 +778,6 @@ class MigrationRunner /** * Returns the version number of the first migration for a batch. * Mostly just for tests. - * - * @param int $batch - * - * @return string */ public function getBatchStart(int $batch): string { @@ -832,10 +800,6 @@ class MigrationRunner /** * Returns the version number of the last migration for a batch. * Mostly just for tests. - * - * @param int $batch - * - * @return string */ public function getBatchEnd(int $batch): string { @@ -918,8 +882,6 @@ class MigrationRunner * * @param string $direction "up" or "down" * @param object $migration The migration to run - * - * @return bool */ protected function migrate($direction, $migration): bool { diff --git a/system/Database/ModelFactory.php b/system/Database/ModelFactory.php index 7db233e8b2..cd1b4e9ea5 100644 --- a/system/Database/ModelFactory.php +++ b/system/Database/ModelFactory.php @@ -39,7 +39,6 @@ class ModelFactory /** * Helper method for injecting mock instances while testing. * - * @param string $name * @param object $instance */ public static function injectMock(string $name, $instance) diff --git a/system/Database/MySQLi/Builder.php b/system/Database/MySQLi/Builder.php index 55b7cd58f6..abeb83f8e4 100644 --- a/system/Database/MySQLi/Builder.php +++ b/system/Database/MySQLi/Builder.php @@ -44,8 +44,6 @@ class Builder extends BaseBuilder * about operator precedence. * * Note: This is only used (and overridden) by MySQL. - * - * @return string */ protected function _fromTables(): string { diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index e56d0d19c3..03a18178d3 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -61,8 +61,6 @@ class Connection extends BaseConnection /** * Connect to the database. * - * @param bool $persistent - * * @throws DatabaseException * * @return mixed @@ -232,10 +230,6 @@ class Connection extends BaseConnection /** * Select a specific database table to use. - * - * @param string $databaseName - * - * @return bool */ public function setDatabase(string $databaseName): bool { @@ -258,8 +252,6 @@ class Connection extends BaseConnection /** * Returns a string containing the version of the database being used. - * - * @return string */ public function getVersion(): string { @@ -277,8 +269,6 @@ class Connection extends BaseConnection /** * Executes the query against the database. * - * @param string $sql - * * @return mixed */ public function execute(string $sql) @@ -309,8 +299,6 @@ class Connection extends BaseConnection * If needed, each database adapter can prep the query string * * @param string $sql an SQL query - * - * @return string */ protected function prepQuery(string $sql): string { @@ -325,8 +313,6 @@ class Connection extends BaseConnection /** * Returns the total number of rows affected by this query. - * - * @return int */ public function affectedRows(): int { @@ -335,10 +321,6 @@ class Connection extends BaseConnection /** * Platform-dependant string escape - * - * @param string $str - * - * @return string */ protected function _escapeString(string $str): string { @@ -382,10 +364,6 @@ class Connection extends BaseConnection /** * Generates the SQL for listing tables in a platform-dependent manner. * Uses escapeLikeStringDirect(). - * - * @param bool $prefixLimit - * - * @return string */ protected function _listTables(bool $prefixLimit = false): string { @@ -400,10 +378,6 @@ class Connection extends BaseConnection /** * Generates a platform-specific query string so that the column names can be fetched. - * - * @param string $table - * - * @return string */ protected function _listColumns(string $table = ''): string { @@ -413,8 +387,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with field data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -447,8 +419,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with index data * - * @param string $table - * * @throws DatabaseException * @throws LogicException * @@ -495,8 +465,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with Foreign key data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -585,8 +553,6 @@ class Connection extends BaseConnection /** * Insert ID - * - * @return int */ public function insertID(): int { @@ -595,8 +561,6 @@ class Connection extends BaseConnection /** * Begin Transaction - * - * @return bool */ protected function _transBegin(): bool { @@ -607,8 +571,6 @@ class Connection extends BaseConnection /** * Commit Transaction - * - * @return bool */ protected function _transCommit(): bool { @@ -623,8 +585,6 @@ class Connection extends BaseConnection /** * Rollback Transaction - * - * @return bool */ protected function _transRollback(): bool { diff --git a/system/Database/MySQLi/Forge.php b/system/Database/MySQLi/Forge.php index fd9f705162..094ae54264 100644 --- a/system/Database/MySQLi/Forge.php +++ b/system/Database/MySQLi/Forge.php @@ -97,8 +97,6 @@ class Forge extends BaseForge * CREATE TABLE attributes * * @param array $attributes Associative array of table attributes - * - * @return string */ protected function _createTableAttributes(array $attributes): string { @@ -163,10 +161,6 @@ class Forge extends BaseForge /** * Process column - * - * @param array $field - * - * @return string */ protected function _processColumn(array $field): string { @@ -192,8 +186,6 @@ class Forge extends BaseForge * Process indexes * * @param string $table (ignored) - * - * @return string */ protected function _processIndexes(string $table): string { diff --git a/system/Database/MySQLi/PreparedQuery.php b/system/Database/MySQLi/PreparedQuery.php index 8f5dcf6655..cd351f2c51 100644 --- a/system/Database/MySQLi/PreparedQuery.php +++ b/system/Database/MySQLi/PreparedQuery.php @@ -26,9 +26,8 @@ class PreparedQuery extends BasePreparedQuery * NOTE: This version is based on SQL code. Child classes should * override this method. * - * @param string $sql - * @param array $options Passed to the connection's prepare statement. - * Unused in the MySQLi driver. + * @param array $options Passed to the connection's prepare statement. + * Unused in the MySQLi driver. * * @return mixed */ @@ -49,10 +48,6 @@ class PreparedQuery extends BasePreparedQuery /** * Takes a new set of data and runs it against the currently * prepared query. Upon success, will return a Results object. - * - * @param array $data - * - * @return bool */ public function _execute(array $data): bool { diff --git a/system/Database/MySQLi/Result.php b/system/Database/MySQLi/Result.php index 04e91c8eee..ab83b8545d 100644 --- a/system/Database/MySQLi/Result.php +++ b/system/Database/MySQLi/Result.php @@ -22,8 +22,6 @@ class Result extends BaseResult { /** * Gets the number of fields in the result set. - * - * @return int */ public function getFieldCount(): int { @@ -32,8 +30,6 @@ class Result extends BaseResult /** * Generates an array of column names in the result set. - * - * @return array */ public function getFieldNames(): array { @@ -49,8 +45,6 @@ class Result extends BaseResult /** * Generates an array of objects representing field meta-data. - * - * @return array */ public function getFieldData(): array { @@ -121,8 +115,6 @@ class Result extends BaseResult * internally before fetching results to make sure the result set * starts at zero. * - * @param int $n - * * @return mixed */ public function dataSeek(int $n = 0) @@ -147,8 +139,6 @@ class Result extends BaseResult * * Overridden by child classes. * - * @param string $className - * * @return bool|Entity|object */ protected function fetchObject(string $className = 'stdClass') diff --git a/system/Database/MySQLi/Utils.php b/system/Database/MySQLi/Utils.php index 39f27e24b0..3fea64a0eb 100644 --- a/system/Database/MySQLi/Utils.php +++ b/system/Database/MySQLi/Utils.php @@ -36,8 +36,6 @@ class Utils extends BaseUtils /** * Platform dependent version of the backup function. * - * @param array|null $prefs - * * @return mixed */ public function _backup(?array $prefs = null) diff --git a/system/Database/Postgre/Builder.php b/system/Database/Postgre/Builder.php index 465b4ff3f7..f35ecf2cf8 100644 --- a/system/Database/Postgre/Builder.php +++ b/system/Database/Postgre/Builder.php @@ -44,8 +44,6 @@ class Builder extends BaseBuilder * Checks if the ignore option is supported by * the Database Driver for the specific statement. * - * @param string $statement - * * @return string */ protected function compileIgnore(string $statement) @@ -62,7 +60,6 @@ class Builder extends BaseBuilder /** * ORDER BY * - * @param string $orderBy * @param string $direction ASC, DESC or RANDOM * @param bool $escape * @@ -91,9 +88,6 @@ class Builder extends BaseBuilder /** * Increments a numeric column by the specified value. * - * @param string $column - * @param int $value - * * @throws DatabaseException * * @return mixed @@ -110,9 +104,6 @@ class Builder extends BaseBuilder /** * Decrements a numeric column by the specified value. * - * @param string $column - * @param int $value - * * @throws DatabaseException * * @return mixed @@ -186,8 +177,6 @@ class Builder extends BaseBuilder * @param string $table The table name * @param array $keys The insert keys * @param array $unescapedKeys The insert values - * - * @return string */ protected function _insert(string $table, array $keys, array $unescapedKeys): string { @@ -202,8 +191,6 @@ class Builder extends BaseBuilder * @param string $table Table name * @param array $keys INSERT keys * @param array $values INSERT values - * - * @return string */ protected function _insertBatch(string $table, array $keys, array $values): string { @@ -217,7 +204,6 @@ class Builder extends BaseBuilder * * @param mixed $where * @param int $limit - * @param bool $resetData * * @throws DatabaseException * @@ -242,8 +228,6 @@ class Builder extends BaseBuilder * Generates a platform-specific LIMIT clause. * * @param string $sql SQL Query - * - * @return string */ protected function _limit(string $sql, bool $offsetIgnore = false): string { @@ -255,13 +239,8 @@ class Builder extends BaseBuilder * * Generates a platform-specific update string from the supplied data * - * @param string $table - * @param array $values - * * @throws DatabaseException * - * @return string - * * @internal param the $array update data * @internal param the $string table name */ @@ -284,8 +263,6 @@ class Builder extends BaseBuilder * @param string $table Table name * @param array $values Update data * @param string $index WHERE key - * - * @return string */ protected function _updateBatch(string $table, array $values, string $index): string { @@ -323,8 +300,6 @@ class Builder extends BaseBuilder * Generates a platform-specific delete string from the supplied data * * @param string $table The table name - * - * @return string */ protected function _delete(string $table): string { @@ -342,8 +317,6 @@ class Builder extends BaseBuilder * then this method maps to 'DELETE FROM table' * * @param string $table The table name - * - * @return string */ protected function _truncate(string $table): string { @@ -358,12 +331,6 @@ class Builder extends BaseBuilder * * @see https://www.postgresql.org/docs/9.2/static/functions-matching.html * - * @param string|null $prefix - * @param string $column - * @param string|null $not - * @param string $bind - * @param bool $insensitiveSearch - * * @return string $like_statement */ public function _like_statement(?string $prefix, string $column, ?string $not, string $bind, bool $insensitiveSearch = false): string @@ -378,7 +345,6 @@ class Builder extends BaseBuilder * * Generates the JOIN portion of the query * - * @param string $table * @param string $cond The join condition * @param string $type The type of join * @param bool $escape Whether not to try to escape identifiers diff --git a/system/Database/Postgre/Connection.php b/system/Database/Postgre/Connection.php index 74ad88664a..b332128c5b 100644 --- a/system/Database/Postgre/Connection.php +++ b/system/Database/Postgre/Connection.php @@ -45,8 +45,6 @@ class Connection extends BaseConnection /** * Connect to the database. * - * @param bool $persistent - * * @return mixed */ public function connect(bool $persistent = false) @@ -108,10 +106,6 @@ class Connection extends BaseConnection /** * Select a specific database table to use. - * - * @param string $databaseName - * - * @return bool */ public function setDatabase(string $databaseName): bool { @@ -120,8 +114,6 @@ class Connection extends BaseConnection /** * Returns a string containing the version of the database being used. - * - * @return string */ public function getVersion(): string { @@ -140,8 +132,6 @@ class Connection extends BaseConnection /** * Executes the query against the database. * - * @param string $sql - * * @return mixed */ public function execute(string $sql) @@ -160,8 +150,6 @@ class Connection extends BaseConnection /** * Returns the total number of rows affected by this query. - * - * @return int */ public function affectedRows(): int { @@ -196,10 +184,6 @@ class Connection extends BaseConnection /** * Platform-dependant string escape - * - * @param string $str - * - * @return string */ protected function _escapeString(string $str): string { @@ -212,10 +196,6 @@ class Connection extends BaseConnection /** * Generates the SQL for listing tables in a platform-dependent manner. - * - * @param bool $prefixLimit - * - * @return string */ protected function _listTables(bool $prefixLimit = false): string { @@ -232,10 +212,6 @@ class Connection extends BaseConnection /** * Generates a platform-specific query string so that the column names can be fetched. - * - * @param string $table - * - * @return string */ protected function _listColumns(string $table = ''): string { @@ -249,8 +225,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with field data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -285,8 +259,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with index data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -328,8 +300,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with Foreign key data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -499,8 +469,6 @@ class Connection extends BaseConnection * Set client encoding * * @param string $charset The client encoding to which the data will be converted. - * - * @return bool */ protected function setClientEncoding(string $charset): bool { @@ -509,8 +477,6 @@ class Connection extends BaseConnection /** * Begin Transaction - * - * @return bool */ protected function _transBegin(): bool { @@ -519,8 +485,6 @@ class Connection extends BaseConnection /** * Commit Transaction - * - * @return bool */ protected function _transCommit(): bool { @@ -529,8 +493,6 @@ class Connection extends BaseConnection /** * Rollback Transaction - * - * @return bool */ protected function _transRollback(): bool { @@ -543,8 +505,6 @@ class Connection extends BaseConnection * Overrides BaseConnection::isWriteType, adding additional read query types. * * @param string $sql An SQL query string - * - * @return bool */ public function isWriteType($sql): bool { diff --git a/system/Database/Postgre/Forge.php b/system/Database/Postgre/Forge.php index 426e5a3606..17d2c29376 100644 --- a/system/Database/Postgre/Forge.php +++ b/system/Database/Postgre/Forge.php @@ -62,8 +62,6 @@ class Forge extends BaseForge * CREATE TABLE attributes * * @param array $attributes Associative array of table attributes - * - * @return string */ protected function _createTableAttributes(array $attributes): string { @@ -125,10 +123,6 @@ class Forge extends BaseForge /** * Process column - * - * @param array $field - * - * @return string */ protected function _processColumn(array $field): string { @@ -145,8 +139,6 @@ class Forge extends BaseForge * * Performs a data type mapping between different databases. * - * @param array $attributes - * * @return void */ protected function _attributeType(array &$attributes) @@ -179,9 +171,6 @@ class Forge extends BaseForge /** * Field attribute AUTO_INCREMENT * - * @param array $attributes - * @param array $field - * * @return void */ protected function _attributeAutoIncrement(array &$attributes, array &$field) @@ -198,9 +187,6 @@ class Forge extends BaseForge * * @param string $table Table name * @param bool $ifExists Whether to add an IF EXISTS condition - * @param bool $cascade - * - * @return string */ protected function _dropTable(string $table, bool $ifExists, bool $cascade): string { diff --git a/system/Database/Postgre/PreparedQuery.php b/system/Database/Postgre/PreparedQuery.php index 52256530e3..53e42b867f 100644 --- a/system/Database/Postgre/PreparedQuery.php +++ b/system/Database/Postgre/PreparedQuery.php @@ -43,9 +43,8 @@ class PreparedQuery extends BasePreparedQuery * NOTE: This version is based on SQL code. Child classes should * override this method. * - * @param string $sql - * @param array $options Passed to the connection's prepare statement. - * Unused in the MySQLi driver. + * @param array $options Passed to the connection's prepare statement. + * Unused in the MySQLi driver. * * @throws Exception * @@ -72,10 +71,6 @@ class PreparedQuery extends BasePreparedQuery /** * Takes a new set of data and runs it against the currently * prepared query. Upon success, will return a Results object. - * - * @param array $data - * - * @return bool */ public function _execute(array $data): bool { @@ -101,10 +96,6 @@ class PreparedQuery extends BasePreparedQuery /** * Replaces the ? placeholders with $1, $2, etc parameters for use * within the prepared query. - * - * @param string $sql - * - * @return string */ public function parameterize(string $sql): string { diff --git a/system/Database/Postgre/Result.php b/system/Database/Postgre/Result.php index feb5c1ca05..fb4226d2e0 100644 --- a/system/Database/Postgre/Result.php +++ b/system/Database/Postgre/Result.php @@ -22,8 +22,6 @@ class Result extends BaseResult { /** * Gets the number of fields in the result set. - * - * @return int */ public function getFieldCount(): int { @@ -32,8 +30,6 @@ class Result extends BaseResult /** * Generates an array of column names in the result set. - * - * @return array */ public function getFieldNames(): array { @@ -48,8 +44,6 @@ class Result extends BaseResult /** * Generates an array of objects representing field meta-data. - * - * @return array */ public function getFieldData(): array { @@ -87,8 +81,6 @@ class Result extends BaseResult * internally before fetching results to make sure the result set * starts at zero. * - * @param int $n - * * @return mixed */ public function dataSeek(int $n = 0) @@ -113,8 +105,6 @@ class Result extends BaseResult * * Overridden by child classes. * - * @param string $className - * * @return bool|Entity|object */ protected function fetchObject(string $className = 'stdClass') diff --git a/system/Database/Postgre/Utils.php b/system/Database/Postgre/Utils.php index 8c4d6d6967..ba1df5d3b5 100644 --- a/system/Database/Postgre/Utils.php +++ b/system/Database/Postgre/Utils.php @@ -36,8 +36,6 @@ class Utils extends BaseUtils /** * Platform dependent version of the backup function. * - * @param array|null $prefs - * * @return mixed */ public function _backup(?array $prefs = null) diff --git a/system/Database/PreparedQueryInterface.php b/system/Database/PreparedQueryInterface.php index c40ef2f4d4..8e19bb053a 100644 --- a/system/Database/PreparedQueryInterface.php +++ b/system/Database/PreparedQueryInterface.php @@ -30,8 +30,7 @@ interface PreparedQueryInterface * Prepares the query against the database, and saves the connection * info necessary to execute the query later. * - * @param string $sql - * @param array $options Passed to the connection's prepare statement. + * @param array $options Passed to the connection's prepare statement. * * @return mixed */ @@ -44,22 +43,16 @@ interface PreparedQueryInterface /** * Returns the SQL that has been prepared. - * - * @return string */ public function getQueryString(): string; /** * Returns the error code created while executing this statement. - * - * @return int */ public function getErrorCode(): int; /** * Returns the error message created while executing this statement. - * - * @return string */ public function getErrorMessage(): string; } diff --git a/system/Database/Query.php b/system/Database/Query.php index 688ffb1323..8b9f82b282 100644 --- a/system/Database/Query.php +++ b/system/Database/Query.php @@ -86,8 +86,6 @@ class Query implements QueryInterface /** * BaseQuery constructor. - * - * @param ConnectionInterface $db */ public function __construct(ConnectionInterface &$db) { @@ -97,9 +95,7 @@ class Query implements QueryInterface /** * Sets the raw query string to use for this statement. * - * @param string $sql - * @param mixed $binds - * @param bool $setEscape + * @param mixed $binds * * @return $this */ @@ -129,9 +125,6 @@ class Query implements QueryInterface /** * Will store the variables to bind into the query later. * - * @param array $binds - * @param bool $setEscape - * * @return $this */ public function setBinds(array $binds, bool $setEscape = true) @@ -153,8 +146,6 @@ class Query implements QueryInterface /** * Returns the final, processed query string after binding, etal * has been performed. - * - * @return string */ public function getQuery(): string { @@ -172,7 +163,6 @@ class Query implements QueryInterface * for it's start and end values. If no end value is present, will * use the current time to determine total duration. * - * @param float $start * @param float $end * * @return $this @@ -193,9 +183,6 @@ class Query implements QueryInterface /** * Returns the start time in seconds with microseconds. * - * @param bool $returnRaw - * @param int $decimals - * * @return float|string */ public function getStartTime(bool $returnRaw = false, int $decimals = 6) @@ -212,8 +199,6 @@ class Query implements QueryInterface * the query has not been executed yet. * * @param int $decimals The accuracy of the returned time. - * - * @return string */ public function getDuration(int $decimals = 6): string { @@ -223,9 +208,6 @@ class Query implements QueryInterface /** * Stores the error description that happened for this query. * - * @param int $code - * @param string $error - * * @return $this */ public function setError(int $code, string $error) @@ -238,8 +220,6 @@ class Query implements QueryInterface /** * Reports whether this statement created an error not. - * - * @return bool */ public function hasError(): bool { @@ -248,8 +228,6 @@ class Query implements QueryInterface /** * Returns the error code created while executing this statement. - * - * @return int */ public function getErrorCode(): int { @@ -258,8 +236,6 @@ class Query implements QueryInterface /** * Returns the error message created while executing this statement. - * - * @return string */ public function getErrorMessage(): string { @@ -268,8 +244,6 @@ class Query implements QueryInterface /** * Determines if the statement is a write-type query or not. - * - * @return bool */ public function isWriteType(): bool { @@ -279,9 +253,6 @@ class Query implements QueryInterface /** * Swaps out one table prefix for a new one. * - * @param string $orig - * @param string $swap - * * @return $this */ public function swapPrefix(string $orig, string $swap) @@ -295,8 +266,6 @@ class Query implements QueryInterface /** * Returns the original SQL that was passed into the system. - * - * @return string */ public function getOriginalQuery(): string { @@ -347,11 +316,6 @@ class Query implements QueryInterface /** * Match bindings - * - * @param string $sql - * @param array $binds - * - * @return string */ protected function matchNamedBinds(string $sql, array $binds): string { @@ -376,13 +340,6 @@ class Query implements QueryInterface /** * Match bindings - * - * @param string $sql - * @param array $binds - * @param int $bindCount - * @param int $ml - * - * @return string */ protected function matchSimpleBinds(string $sql, array $binds, int $bindCount, int $ml): string { @@ -414,8 +371,6 @@ class Query implements QueryInterface /** * Returns string to display in debug toolbar - * - * @return string */ public function debugToolbarDisplay(): string { @@ -469,8 +424,6 @@ class Query implements QueryInterface /** * Return text representation of the query - * - * @return string */ public function __toString(): string { diff --git a/system/Database/QueryInterface.php b/system/Database/QueryInterface.php index fd81ab7c4b..8e965fabf0 100644 --- a/system/Database/QueryInterface.php +++ b/system/Database/QueryInterface.php @@ -22,9 +22,7 @@ interface QueryInterface /** * Sets the raw query string to use for this statement. * - * @param string $sql - * @param mixed $binds - * @param bool $setEscape + * @param mixed $binds * * @return mixed */ @@ -43,7 +41,6 @@ interface QueryInterface * for it's start and end values. If no end value is present, will * use the current time to determine total duration. * - * @param float $start * @param float $end * * @return mixed @@ -55,53 +52,37 @@ interface QueryInterface * the query has not been executed yet. * * @param int $decimals The accuracy of the returned time. - * - * @return string */ public function getDuration(int $decimals = 6): string; /** * Stores the error description that happened for this query. - * - * @param int $code - * @param string $error */ public function setError(int $code, string $error); /** * Reports whether this statement created an error not. - * - * @return bool */ public function hasError(): bool; /** * Returns the error code created while executing this statement. - * - * @return int */ public function getErrorCode(): int; /** * Returns the error message created while executing this statement. - * - * @return string */ public function getErrorMessage(): string; /** * Determines if the statement is a write-type query or not. - * - * @return bool */ public function isWriteType(): bool; /** * Swaps out one table prefix for a new one. * - * @param string $orig - * @param string $swap - * * @return mixed */ public function swapPrefix(string $orig, string $swap); diff --git a/system/Database/ResultInterface.php b/system/Database/ResultInterface.php index 9a0d796986..b630ed678a 100644 --- a/system/Database/ResultInterface.php +++ b/system/Database/ResultInterface.php @@ -22,8 +22,6 @@ interface ResultInterface * 'object', or a custom class name. * * @param string $type The row type. Either 'array', 'object', or a class name to use - * - * @return array */ public function getResult(string $type = 'object'): array; @@ -40,8 +38,6 @@ interface ResultInterface * Returns the results as an array of arrays. * * If no results, an empty array is returned. - * - * @return array */ public function getResultArray(): array; @@ -49,8 +45,6 @@ interface ResultInterface * Returns the results as an array of objects. * * If no results, an empty array is returned. - * - * @return array */ public function getResultObject(): array; @@ -72,9 +66,6 @@ interface ResultInterface * * If row doesn't exists, returns null. * - * @param int $n - * @param string $className - * * @return mixed */ public function getCustomRowObject(int $n, string $className); @@ -84,8 +75,6 @@ interface ResultInterface * * If row doesn't exist, returns null. * - * @param int $n - * * @return mixed */ public function getRowArray(int $n = 0); @@ -95,8 +84,6 @@ interface ResultInterface * * If row doesn't exist, returns null. * - * @param int $n - * * @return mixed */ public function getRowObject(int $n = 0); @@ -114,8 +101,6 @@ interface ResultInterface /** * Returns the "first" row of the current results. * - * @param string $type - * * @return mixed */ public function getFirstRow(string $type = 'object'); @@ -123,8 +108,6 @@ interface ResultInterface /** * Returns the "last" row of the current results. * - * @param string $type - * * @return mixed */ public function getLastRow(string $type = 'object'); @@ -132,8 +115,6 @@ interface ResultInterface /** * Returns the "next" row of the current results. * - * @param string $type - * * @return mixed */ public function getNextRow(string $type = 'object'); @@ -141,8 +122,6 @@ interface ResultInterface /** * Returns the "previous" row of the current results. * - * @param string $type - * * @return mixed */ public function getPreviousRow(string $type = 'object'); @@ -150,30 +129,22 @@ interface ResultInterface /** * Returns an unbuffered row and move the pointer to the next row. * - * @param string $type - * * @return mixed */ public function getUnbufferedRow(string $type = 'object'); /** * Gets the number of fields in the result set. - * - * @return int */ public function getFieldCount(): int; /** * Generates an array of column names in the result set. - * - * @return array */ public function getFieldNames(): array; /** * Generates an array of objects representing field meta-data. - * - * @return array */ public function getFieldData(): array; @@ -189,8 +160,6 @@ interface ResultInterface * internally before fetching results to make sure the result set * starts at zero. * - * @param int $n - * * @return mixed */ public function dataSeek(int $n = 0); diff --git a/system/Database/SQLSRV/Builder.php b/system/Database/SQLSRV/Builder.php index 8478293343..b2b4a877ef 100755 --- a/system/Database/SQLSRV/Builder.php +++ b/system/Database/SQLSRV/Builder.php @@ -65,8 +65,6 @@ class Builder extends BaseBuilder * * Groups tables in FROM clauses if needed, so there is no confusion * about operator precedence. - * - * @return string */ protected function _fromTables(): string { @@ -88,8 +86,6 @@ class Builder extends BaseBuilder * then this method maps to 'DELETE FROM table' * * @param string $table The table name - * - * @return string */ protected function _truncate(string $table): string { @@ -101,7 +97,6 @@ class Builder extends BaseBuilder * * Generates the JOIN portion of the query * - * @param string $table * @param string $cond The join condition * @param string $type The type of join * @param bool $escape Whether not to try to escape identifiers @@ -184,8 +179,6 @@ class Builder extends BaseBuilder * @param string $table The table name * @param array $keys The insert keys * @param array $unescapedKeys The insert values - * - * @return string */ protected function _insert(string $table, array $keys, array $unescapedKeys): string { @@ -204,8 +197,6 @@ class Builder extends BaseBuilder * * @param string $table the Table name * @param array $values the Update data - * - * @return string */ protected function _update(string $table, array $values): string { @@ -226,9 +217,6 @@ class Builder extends BaseBuilder /** * Increments a numeric column by the specified value. * - * @param string $column - * @param int $value - * * @return bool */ public function increment(string $column, int $value = 1) @@ -248,9 +236,6 @@ class Builder extends BaseBuilder /** * Decrements a numeric column by the specified value. * - * @param string $column - * @param int $value - * * @return bool */ public function decrement(string $column, int $value = 1) @@ -269,10 +254,6 @@ class Builder extends BaseBuilder /** * Get full name of the table - * - * @param string $table - * - * @return string */ private function getFullName(string $table): string { @@ -296,8 +277,6 @@ class Builder extends BaseBuilder * * @param string $fullTable full table name * @param string $insert statement - * - * @return string */ private function addIdentity(string $fullTable, string $insert): string { @@ -306,11 +285,6 @@ class Builder extends BaseBuilder /** * Local implementation of limit - * - * @param string $sql - * @param bool $offsetIgnore - * - * @return string */ protected function _limit(string $sql, bool $offsetIgnore = false): string { @@ -379,8 +353,6 @@ class Builder extends BaseBuilder * @param string $table The table name * @param array $keys The insert keys * @param array $values The insert values - * - * @return string */ protected function _replace(string $table, array $keys, array $values): string { @@ -449,8 +421,6 @@ class Builder extends BaseBuilder * Handle float return value * * @param string $select Field name - * @param string $alias - * @param string $type * * @return BaseBuilder */ @@ -485,8 +455,6 @@ class Builder extends BaseBuilder * Delete statement * * @param string $table The table name - * - * @return string */ protected function _delete(string $table): string { @@ -498,9 +466,8 @@ class Builder extends BaseBuilder * * Compiles a delete string and runs the query * - * @param mixed $where The where clause - * @param int $limit The limit clause - * @param bool $resetData + * @param mixed $where The where clause + * @param int $limit The limit clause * * @throws DatabaseException * @@ -541,8 +508,6 @@ class Builder extends BaseBuilder * Generates a query string based on which functions were used. * * @param mixed $selectOverride - * - * @return string */ protected function compileSelect($selectOverride = false): string { @@ -602,7 +567,6 @@ class Builder extends BaseBuilder * @param string $qbKey 'QBWhere' or 'QBHaving' * @param mixed $key * @param mixed $value - * @param string $type * @param bool $escape * * @return $this diff --git a/system/Database/SQLSRV/Connection.php b/system/Database/SQLSRV/Connection.php index a37c6119ae..28d18af8d7 100755 --- a/system/Database/SQLSRV/Connection.php +++ b/system/Database/SQLSRV/Connection.php @@ -100,8 +100,6 @@ class Connection extends BaseConnection /** * Connect to the database. * - * @param bool $persistent - * * @throws DatabaseException * * @return mixed @@ -173,10 +171,6 @@ class Connection extends BaseConnection /** * Platform-dependant string escape - * - * @param string $str - * - * @return string */ protected function _escapeString(string $str): string { @@ -185,8 +179,6 @@ class Connection extends BaseConnection /** * Insert ID - * - * @return int */ public function insertID(): int { @@ -195,10 +187,6 @@ class Connection extends BaseConnection /** * Generates the SQL for listing tables in a platform-dependent manner. - * - * @param bool $prefixLimit - * - * @return string */ protected function _listTables(bool $prefixLimit = false): string { @@ -217,10 +205,6 @@ class Connection extends BaseConnection /** * Generates a platform-specific query string so that the column names can be fetched. - * - * @param string $table - * - * @return string */ protected function _listColumns(string $table = ''): string { @@ -233,8 +217,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with index data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -275,8 +257,6 @@ class Connection extends BaseConnection * Returns an array of objects with Foreign key data * referenced_object_id parent_object_id * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -345,8 +325,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with field data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -381,8 +359,6 @@ class Connection extends BaseConnection /** * Begin Transaction - * - * @return bool */ protected function _transBegin(): bool { @@ -391,8 +367,6 @@ class Connection extends BaseConnection /** * Commit Transaction - * - * @return bool */ protected function _transCommit(): bool { @@ -401,8 +375,6 @@ class Connection extends BaseConnection /** * Rollback Transaction - * - * @return bool */ protected function _transRollback(): bool { @@ -445,8 +417,6 @@ class Connection extends BaseConnection /** * Returns the total number of rows affected by this query. - * - * @return int */ public function affectedRows(): int { @@ -456,8 +426,6 @@ class Connection extends BaseConnection /** * Select a specific database table to use. * - * @param string|null $databaseName - * * @return mixed */ public function setDatabase(?string $databaseName = null) @@ -483,8 +451,6 @@ class Connection extends BaseConnection /** * Executes the query against the database. * - * @param string $sql - * * @return mixed */ public function execute(string $sql) @@ -539,8 +505,6 @@ class Connection extends BaseConnection /** * The name of the platform in use (MySQLi, mssql, etc) - * - * @return string */ public function getPlatform(): string { @@ -549,8 +513,6 @@ class Connection extends BaseConnection /** * Returns a string containing the version of the database being used. - * - * @return string */ public function getVersion(): string { @@ -571,8 +533,6 @@ class Connection extends BaseConnection * Overrides BaseConnection::isWriteType, adding additional read query types. * * @param string $sql An SQL query string - * - * @return bool */ public function isWriteType($sql): bool { diff --git a/system/Database/SQLSRV/Forge.php b/system/Database/SQLSRV/Forge.php index 4a52695a65..f1716cf6da 100755 --- a/system/Database/SQLSRV/Forge.php +++ b/system/Database/SQLSRV/Forge.php @@ -100,8 +100,6 @@ class Forge extends BaseForge * CREATE TABLE attributes * * @param array $attributes Associative array of table attributes - * - * @return string */ protected function _createTableAttributes(array $attributes): string { @@ -194,9 +192,6 @@ class Forge extends BaseForge /** * Drop index for table * - * @param string $table - * @param object $indexData - * * @return mixed */ protected function _dropIndex(string $table, object $indexData) @@ -212,10 +207,6 @@ class Forge extends BaseForge /** * Process column - * - * @param array $field - * - * @return string */ protected function _processColumn(array $field): string { @@ -233,8 +224,6 @@ class Forge extends BaseForge * Process foreign keys * * @param string $table Table name - * - * @return string */ protected function _processForeignKeys(string $table): string { @@ -273,8 +262,6 @@ class Forge extends BaseForge * Process primary keys * * @param string $table Table name - * - * @return string */ protected function _processPrimaryKeys(string $table): string { @@ -297,8 +284,6 @@ class Forge extends BaseForge * * Performs a data type mapping between different databases. * - * @param array $attributes - * * @return void */ protected function _attributeType(array &$attributes) @@ -339,9 +324,6 @@ class Forge extends BaseForge /** * Field attribute AUTO_INCREMENT * - * @param array $attributes - * @param array $field - * * @return void */ protected function _attributeAutoIncrement(array &$attributes, array &$field) @@ -360,9 +342,6 @@ class Forge extends BaseForge * * @param string $table Table name * @param bool $ifExists Whether to add an IF EXISTS condition - * @param bool $cascade - * - * @return string */ protected function _dropTable(string $table, bool $ifExists, bool $cascade): string { diff --git a/system/Database/SQLSRV/PreparedQuery.php b/system/Database/SQLSRV/PreparedQuery.php index 7972ba7252..e91fa78ea3 100755 --- a/system/Database/SQLSRV/PreparedQuery.php +++ b/system/Database/SQLSRV/PreparedQuery.php @@ -41,8 +41,7 @@ class PreparedQuery extends BasePreparedQuery * NOTE: This version is based on SQL code. Child classes should * override this method. * - * @param string $sql - * @param array $options Options takes an associative array; + * @param array $options Options takes an associative array; * * @throws Exception * @@ -70,10 +69,6 @@ class PreparedQuery extends BasePreparedQuery /** * Takes a new set of data and runs it against the currently * prepared query. Upon success, will return a Results object. - * - * @param array $data - * - * @return bool */ public function _execute(array $data): bool { @@ -102,10 +97,6 @@ class PreparedQuery extends BasePreparedQuery /** * Handle parameters - * - * @param string $queryString - * - * @return array */ protected function parameterize(string $queryString): array { diff --git a/system/Database/SQLSRV/Result.php b/system/Database/SQLSRV/Result.php index 6330b58ba2..90db8ac0d4 100755 --- a/system/Database/SQLSRV/Result.php +++ b/system/Database/SQLSRV/Result.php @@ -22,8 +22,6 @@ class Result extends BaseResult { /** * Gets the number of fields in the result set. - * - * @return int */ public function getFieldCount(): int { @@ -32,8 +30,6 @@ class Result extends BaseResult /** * Generates an array of column names in the result set. - * - * @return array */ public function getFieldNames(): array { @@ -48,8 +44,6 @@ class Result extends BaseResult /** * Generates an array of objects representing field meta-data. - * - * @return array */ public function getFieldData(): array { @@ -123,8 +117,6 @@ class Result extends BaseResult * internally before fetching results to make sure the result set * starts at zero. * - * @param int $n - * * @return mixed */ public function dataSeek(int $n = 0) @@ -157,8 +149,6 @@ class Result extends BaseResult * * Overridden by child classes. * - * @param string $className - * * @return bool|Entity|object */ protected function fetchObject(string $className = 'stdClass') diff --git a/system/Database/SQLSRV/Utils.php b/system/Database/SQLSRV/Utils.php index 0776f3a68c..da4ac8679b 100755 --- a/system/Database/SQLSRV/Utils.php +++ b/system/Database/SQLSRV/Utils.php @@ -36,8 +36,6 @@ class Utils extends BaseUtils /** * Platform dependent version of the backup function. * - * @param array|null $prefs - * * @return mixed */ public function _backup(?array $prefs = null) diff --git a/system/Database/SQLite3/Builder.php b/system/Database/SQLite3/Builder.php index fd071957d0..7ada68321a 100644 --- a/system/Database/SQLite3/Builder.php +++ b/system/Database/SQLite3/Builder.php @@ -58,8 +58,6 @@ class Builder extends BaseBuilder * @param string $table the table name * @param array $keys the insert keys * @param array $values the insert values - * - * @return string */ protected function _replace(string $table, array $keys, array $values): string { @@ -73,10 +71,6 @@ class Builder extends BaseBuilder * * If the database does not support the TRUNCATE statement, * then this method maps to 'DELETE FROM table' - * - * @param string $table - * - * @return string */ protected function _truncate(string $table): string { diff --git a/system/Database/SQLite3/Connection.php b/system/Database/SQLite3/Connection.php index b4252e1a19..174f6df437 100644 --- a/system/Database/SQLite3/Connection.php +++ b/system/Database/SQLite3/Connection.php @@ -40,8 +40,6 @@ class Connection extends BaseConnection /** * Connect to the database. * - * @param bool $persistent - * * @throws DatabaseException * * @return mixed @@ -89,10 +87,6 @@ class Connection extends BaseConnection /** * Select a specific database table to use. - * - * @param string $databaseName - * - * @return bool */ public function setDatabase(string $databaseName): bool { @@ -101,8 +95,6 @@ class Connection extends BaseConnection /** * Returns a string containing the version of the database being used. - * - * @return string */ public function getVersion(): string { @@ -118,8 +110,6 @@ class Connection extends BaseConnection /** * Execute the query * - * @param string $sql - * * @return mixed \SQLite3Result object or bool */ public function execute(string $sql) @@ -140,8 +130,6 @@ class Connection extends BaseConnection /** * Returns the total number of rows affected by this query. - * - * @return int */ public function affectedRows(): int { @@ -150,10 +138,6 @@ class Connection extends BaseConnection /** * Platform-dependant string escape - * - * @param string $str - * - * @return string */ protected function _escapeString(string $str): string { @@ -162,10 +146,6 @@ class Connection extends BaseConnection /** * Generates the SQL for listing tables in a platform-dependent manner. - * - * @param bool $prefixLimit - * - * @return string */ protected function _listTables(bool $prefixLimit = false): string { @@ -178,10 +158,6 @@ class Connection extends BaseConnection /** * Generates a platform-specific query string so that the column names can be fetched. - * - * @param string $table - * - * @return string */ protected function _listColumns(string $table = ''): string { @@ -237,8 +213,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with field data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -274,8 +248,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with index data * - * @param string $table - * * @throws DatabaseException * * @return stdClass[] @@ -319,8 +291,6 @@ class Connection extends BaseConnection /** * Returns an array of objects with Foreign key data * - * @param string $table - * * @return stdClass[] */ public function _foreignKeyData(string $table): array @@ -391,8 +361,6 @@ class Connection extends BaseConnection /** * Insert ID - * - * @return int */ public function insertID(): int { @@ -401,8 +369,6 @@ class Connection extends BaseConnection /** * Begin Transaction - * - * @return bool */ protected function _transBegin(): bool { @@ -411,8 +377,6 @@ class Connection extends BaseConnection /** * Commit Transaction - * - * @return bool */ protected function _transCommit(): bool { @@ -421,8 +385,6 @@ class Connection extends BaseConnection /** * Rollback Transaction - * - * @return bool */ protected function _transRollback(): bool { @@ -432,8 +394,6 @@ class Connection extends BaseConnection /** * Checks to see if the current install supports Foreign Keys * and has them enabled. - * - * @return bool */ public function supportsForeignKeys(): bool { diff --git a/system/Database/SQLite3/Forge.php b/system/Database/SQLite3/Forge.php index 373c0bce0b..76cbf3a1e7 100644 --- a/system/Database/SQLite3/Forge.php +++ b/system/Database/SQLite3/Forge.php @@ -38,8 +38,6 @@ class Forge extends BaseForge /** * Constructor. - * - * @param BaseConnection $db */ public function __construct(BaseConnection $db) { @@ -54,10 +52,7 @@ class Forge extends BaseForge /** * Create database * - * @param string $dbName - * @param bool $ifNotExists Whether to add IF NOT EXISTS condition - * - * @return bool + * @param bool $ifNotExists Whether to add IF NOT EXISTS condition */ public function createDatabase(string $dbName, bool $ifNotExists = false): bool { @@ -69,11 +64,7 @@ class Forge extends BaseForge /** * Drop database * - * @param string $dbName - * * @throws DatabaseException - * - * @return bool */ public function dropDatabase(string $dbName): bool { @@ -142,10 +133,6 @@ class Forge extends BaseForge /** * Process column - * - * @param array $field - * - * @return string */ protected function _processColumn(array $field): string { @@ -164,10 +151,6 @@ class Forge extends BaseForge /** * Process indexes - * - * @param string $table - * - * @return array */ protected function _processIndexes(string $table): array { @@ -206,8 +189,6 @@ class Forge extends BaseForge * * Performs a data type mapping between different databases. * - * @param array $attributes - * * @return void */ protected function _attributeType(array &$attributes) @@ -226,9 +207,6 @@ class Forge extends BaseForge /** * Field attribute AUTO_INCREMENT * - * @param array $attributes - * @param array $field - * * @return void */ protected function _attributeAutoIncrement(array &$attributes, array &$field) @@ -252,8 +230,6 @@ class Forge extends BaseForge * @param string $foreignName Foreign name * * @throws DatabaseException - * - * @return bool */ public function dropForeignKey(string $table, string $foreignName): bool { diff --git a/system/Database/SQLite3/PreparedQuery.php b/system/Database/SQLite3/PreparedQuery.php index 8c00c2b3d1..c5ee89ec3e 100644 --- a/system/Database/SQLite3/PreparedQuery.php +++ b/system/Database/SQLite3/PreparedQuery.php @@ -33,9 +33,8 @@ class PreparedQuery extends BasePreparedQuery * NOTE: This version is based on SQL code. Child classes should * override this method. * - * @param string $sql - * @param array $options Passed to the connection's prepare statement. - * Unused in the MySQLi driver. + * @param array $options Passed to the connection's prepare statement. + * Unused in the MySQLi driver. * * @return mixed */ @@ -54,10 +53,6 @@ class PreparedQuery extends BasePreparedQuery * prepared query. Upon success, will return a Results object. * * @todo finalize() - * - * @param array $data - * - * @return bool */ public function _execute(array $data): bool { diff --git a/system/Database/SQLite3/Result.php b/system/Database/SQLite3/Result.php index 7485d36dca..b031645b09 100644 --- a/system/Database/SQLite3/Result.php +++ b/system/Database/SQLite3/Result.php @@ -24,8 +24,6 @@ class Result extends BaseResult { /** * Gets the number of fields in the result set. - * - * @return int */ public function getFieldCount(): int { @@ -34,8 +32,6 @@ class Result extends BaseResult /** * Generates an array of column names in the result set. - * - * @return array */ public function getFieldNames(): array { @@ -50,8 +46,6 @@ class Result extends BaseResult /** * Generates an array of objects representing field meta-data. - * - * @return array */ public function getFieldData(): array { @@ -98,8 +92,6 @@ class Result extends BaseResult * internally before fetching results to make sure the result set * starts at zero. * - * @param int $n - * * @throws DatabaseException * * @return mixed @@ -130,8 +122,6 @@ class Result extends BaseResult * * Overridden by child classes. * - * @param string $className - * * @return bool|object */ protected function fetchObject(string $className = 'stdClass') diff --git a/system/Database/SQLite3/Table.php b/system/Database/SQLite3/Table.php index c4f6b77bf6..01e0fd729f 100644 --- a/system/Database/SQLite3/Table.php +++ b/system/Database/SQLite3/Table.php @@ -75,9 +75,6 @@ class Table /** * Table constructor. - * - * @param Connection $db - * @param Forge $forge */ public function __construct(Connection $db, Forge $forge) { @@ -90,8 +87,6 @@ class Table * collects all of the information needed to * recreate this table. * - * @param string $table - * * @return Table */ public function fromTable(string $table) @@ -125,8 +120,6 @@ class Table * to finalize the action. It creates a temp table, creates the new * table with modifications, and copies the data over to the new table. * Resets the connection dataCache to be sure changes are collected. - * - * @return bool */ public function run(): bool { @@ -182,8 +175,6 @@ class Table * Modifies a field, including changing data type, * renaming, etc. * - * @param array $field - * * @return Table */ public function modifyColumn(array $field) @@ -202,8 +193,6 @@ class Table * Drops a foreign key from this table so that * it won't be recreated in the future. * - * @param string $column - * * @return Table */ public function dropForeignKey(string $column) diff --git a/system/Database/SQLite3/Utils.php b/system/Database/SQLite3/Utils.php index 192b81846c..f0cc5dfcf2 100644 --- a/system/Database/SQLite3/Utils.php +++ b/system/Database/SQLite3/Utils.php @@ -29,8 +29,6 @@ class Utils extends BaseUtils /** * Platform dependent version of the backup function. * - * @param array|null $prefs - * * @return mixed */ public function _backup(?array $prefs = null) diff --git a/system/Database/Seeder.php b/system/Database/Seeder.php index c809fbcd1a..5e76f23a1a 100644 --- a/system/Database/Seeder.php +++ b/system/Database/Seeder.php @@ -73,9 +73,6 @@ class Seeder /** * Seeder constructor. - * - * @param Database $config - * @param BaseConnection|null $db */ public function __construct(Database $config, ?BaseConnection $db = null) { @@ -101,8 +98,6 @@ class Seeder /** * Gets the Faker Generator instance. - * - * @return Generator|null */ public static function faker(): ?Generator { @@ -116,8 +111,6 @@ class Seeder /** * Loads the specified seeder and runs it. * - * @param string $class - * * @throws InvalidArgumentException * * @return void @@ -163,8 +156,6 @@ class Seeder /** * Sets the location of the directory that seed files can be located in. * - * @param string $path - * * @return $this */ public function setPath(string $path) @@ -177,8 +168,6 @@ class Seeder /** * Sets the silent treatment. * - * @param bool $silent - * * @return $this */ public function setSilent(bool $silent) diff --git a/system/Debug/Exceptions.php b/system/Debug/Exceptions.php index c1b262060d..07218ed47b 100644 --- a/system/Debug/Exceptions.php +++ b/system/Debug/Exceptions.php @@ -66,10 +66,6 @@ class Exceptions /** * Constructor. - * - * @param ExceptionsConfig $config - * @param IncomingRequest $request - * @param Response $response */ public function __construct(ExceptionsConfig $config, IncomingRequest $request, Response $response) { @@ -105,8 +101,6 @@ class Exceptions * (Yay PHP7!). Will log the error, display it if display_errors is on, * and fire an event that allows custom actions to be taken at this point. * - * @param Throwable $exception - * * @codeCoverageIgnore */ public function exceptionHandler(Throwable $exception) @@ -147,11 +141,6 @@ class Exceptions * * This seems to be primarily when a user triggers it with trigger_error(). * - * @param int $severity - * @param string $message - * @param string|null $file - * @param int|null $line - * * @throws ErrorException */ public function errorHandler(int $severity, string $message, ?string $file = null, ?int $line = null) @@ -185,9 +174,6 @@ class Exceptions * Determines the view to display based on the exception thrown, * whether an HTTP or CLI request, etc. * - * @param Throwable $exception - * @param string $templatePath - * * @return string The path and filename of the view file to use */ protected function determineView(Throwable $exception, string $templatePath): string @@ -215,9 +201,6 @@ class Exceptions /** * Given an exception and status code will display the error to the client. - * - * @param Throwable $exception - * @param int $statusCode */ protected function render(Throwable $exception, int $statusCode) { @@ -257,11 +240,6 @@ class Exceptions /** * Gathers the variables that will be made available to the view. - * - * @param Throwable $exception - * @param int $statusCode - * - * @return array */ protected function collectVars(Throwable $exception, int $statusCode): array { @@ -285,8 +263,6 @@ class Exceptions * Mask sensitive data in the trace. * * @param array|object $trace - * @param array $keysToMask - * @param string $path */ protected function maskSensitiveData(&$trace, array $keysToMask, string $path = '') { @@ -316,10 +292,6 @@ class Exceptions /** * Determines the HTTP status code and the exit status code for this request. - * - * @param Throwable $exception - * - * @return array */ protected function determineCodes(Throwable $exception): array { @@ -349,10 +321,6 @@ class Exceptions * Clean Path * * This makes nicer looking paths for the error output. - * - * @param string $file - * - * @return string */ public static function cleanPath(string $file): string { @@ -380,10 +348,6 @@ class Exceptions /** * Describes memory usage in real-world units. Intended for use * with memory_get_usage, etc. - * - * @param int $bytes - * - * @return string */ public static function describeMemory(int $bytes): string { @@ -400,10 +364,6 @@ class Exceptions /** * Creates a syntax-highlighted version of a PHP file. * - * @param string $file - * @param int $lineNumber - * @param int $lines - * * @return bool|string */ public static function highlightFile(string $file, int $lineNumber, int $lines = 15) diff --git a/system/Debug/Iterator.php b/system/Debug/Iterator.php index 01a9d58a01..62343745b1 100644 --- a/system/Debug/Iterator.php +++ b/system/Debug/Iterator.php @@ -38,9 +38,6 @@ class Iterator * Tests are simply closures that the user can define any sequence of * things to happen during the test. * - * @param string $name - * @param Closure $closure - * * @return $this */ public function add(string $name, Closure $closure) @@ -57,9 +54,6 @@ class Iterator * time to execute the desired number of iterations, and the approximate * memory usage used during those iterations. * - * @param int $iterations - * @param bool $output - * * @return string|null */ public function run(int $iterations = 1000, bool $output = true) @@ -94,8 +88,6 @@ class Iterator /** * Get results. - * - * @return string */ public function getReport(): string { diff --git a/system/Debug/Timer.php b/system/Debug/Timer.php index fc26abae1a..5783c77aae 100644 --- a/system/Debug/Timer.php +++ b/system/Debug/Timer.php @@ -103,8 +103,6 @@ class Timer * Returns the array of timers, with the duration pre-calculated for you. * * @param int $decimals Number of decimal places - * - * @return array */ public function getTimers(int $decimals = 4): array { @@ -123,10 +121,6 @@ class Timer /** * Checks whether or not a timer with the specified name exists. - * - * @param string $name - * - * @return bool */ public function has(string $name): bool { diff --git a/system/Debug/Toolbar.php b/system/Debug/Toolbar.php index df266710d1..3cf1196891 100644 --- a/system/Debug/Toolbar.php +++ b/system/Debug/Toolbar.php @@ -51,8 +51,6 @@ class Toolbar /** * Constructor - * - * @param ToolbarConfig $config */ public function __construct(ToolbarConfig $config) { @@ -73,10 +71,7 @@ class Toolbar /** * Returns all the data required by Debug Bar * - * @param float $startTime App start time - * @param float $totalTime - * @param RequestInterface $request - * @param ResponseInterface $response + * @param float $startTime App start time * * @return string JSON encoded data */ @@ -177,14 +172,6 @@ class Toolbar /** * Called within the view to display the timeline itself. - * - * @param array $collectors - * @param float $startTime - * @param int $segmentCount - * @param int $segmentDuration - * @param array $styles - * - * @return string */ protected function renderTimeline(array $collectors, float $startTime, int $segmentCount, int $segmentDuration, array &$styles): string { @@ -219,8 +206,6 @@ class Toolbar * Returns a sorted array of timeline data arrays from the collectors. * * @param array $collectors - * - * @return array */ protected function collectTimelineData($collectors): array { @@ -243,8 +228,6 @@ class Toolbar /** * Returns an array of data from all of the modules * that should be displayed in the 'Vars' tab. - * - * @return array */ protected function collectVarData(): array { @@ -263,11 +246,6 @@ class Toolbar /** * Rounds a number to the nearest incremental value. - * - * @param float $number - * @param int $increments - * - * @return float */ protected function roundTo(float $number, int $increments = 5): float { @@ -422,8 +400,6 @@ class Toolbar * * @param string $data JSON encoded Toolbar data * @param string $format html, json, xml - * - * @return string */ protected function format(string $data, string $format = 'html'): string { diff --git a/system/Debug/Toolbar/Collectors/BaseCollector.php b/system/Debug/Toolbar/Collectors/BaseCollector.php index 7a77e79aa6..5d8d39ff16 100644 --- a/system/Debug/Toolbar/Collectors/BaseCollector.php +++ b/system/Debug/Toolbar/Collectors/BaseCollector.php @@ -60,10 +60,6 @@ class BaseCollector /** * Gets the Collector's title. - * - * @param bool $safe - * - * @return string */ public function getTitle(bool $safe = false): string { @@ -76,8 +72,6 @@ class BaseCollector /** * Returns any information that should be shown next to the title. - * - * @return string */ public function getTitleDetails(): string { @@ -86,8 +80,6 @@ class BaseCollector /** * Does this collector need it's own tab? - * - * @return bool */ public function hasTabContent(): bool { @@ -96,8 +88,6 @@ class BaseCollector /** * Does this collector have a label? - * - * @return bool */ public function hasLabel(): bool { @@ -106,8 +96,6 @@ class BaseCollector /** * Does this collector have information for the timeline? - * - * @return bool */ public function hasTimelineData(): bool { @@ -117,8 +105,6 @@ class BaseCollector /** * Grabs the data for the timeline, properly formatted, * or returns an empty array. - * - * @return array */ public function timelineData(): array { @@ -132,8 +118,6 @@ class BaseCollector /** * Does this Collector have data that should be shown in the * 'Vars' tab? - * - * @return bool */ public function hasVarData(): bool { @@ -173,8 +157,6 @@ class BaseCollector * 'start' => 10 // milliseconds * 'duration' => 15 // milliseconds * ] - * - * @return array */ protected function formatTimelineData(): array { @@ -195,10 +177,6 @@ class BaseCollector * Clean Path * * This makes nicer looking paths for the error output. - * - * @param string $file - * - * @return string */ public function cleanPath(string $file): string { @@ -217,8 +195,6 @@ class BaseCollector * Does this collector have any data collected? * * If not, then the toolbar button won't get shown. - * - * @return bool */ public function isEmpty(): bool { @@ -230,8 +206,6 @@ class BaseCollector * be SVG, or a base-64 encoded. * * Recommended dimensions are 24px x 24px - * - * @return string */ public function icon(): string { @@ -240,8 +214,6 @@ class BaseCollector /** * Return settings as an array. - * - * @return array */ public function getAsArray(): array { diff --git a/system/Debug/Toolbar/Collectors/Config.php b/system/Debug/Toolbar/Collectors/Config.php index 1233d76260..faf7a19b73 100644 --- a/system/Debug/Toolbar/Collectors/Config.php +++ b/system/Debug/Toolbar/Collectors/Config.php @@ -22,8 +22,6 @@ class Config { /** * Return toolbar config values as an array. - * - * @return array */ public static function display(): array { diff --git a/system/Debug/Toolbar/Collectors/Database.php b/system/Debug/Toolbar/Collectors/Database.php index 1f9fa37d72..6fd5b263f4 100644 --- a/system/Debug/Toolbar/Collectors/Database.php +++ b/system/Debug/Toolbar/Collectors/Database.php @@ -73,8 +73,6 @@ class Database extends BaseCollector * The static method used during Events to collect * data. * - * @param Query $query - * * @internal param $ array \CodeIgniter\Database\Query */ public static function collect(Query $query) @@ -122,8 +120,6 @@ class Database extends BaseCollector /** * Returns the data of this collector to be formatted in the toolbar - * - * @return array */ public function display(): array { @@ -139,8 +135,6 @@ class Database extends BaseCollector /** * Gets the "badge" value for the button. - * - * @return int */ public function getBadgeValue(): int { @@ -160,8 +154,6 @@ class Database extends BaseCollector /** * Does this collector have any data collected? - * - * @return bool */ public function isEmpty(): bool { @@ -172,8 +164,6 @@ class Database extends BaseCollector * Display the icon. * * Icon from https://icons8.com - 1em package - * - * @return string */ public function icon(): string { diff --git a/system/Debug/Toolbar/Collectors/Events.php b/system/Debug/Toolbar/Collectors/Events.php index 741cb5a927..b8c59f4566 100644 --- a/system/Debug/Toolbar/Collectors/Events.php +++ b/system/Debug/Toolbar/Collectors/Events.php @@ -69,8 +69,6 @@ class Events extends BaseCollector /** * Child classes should implement this to return the timeline data * formatted for correct usage. - * - * @return array */ protected function formatTimelineData(): array { @@ -92,8 +90,6 @@ class Events extends BaseCollector /** * Returns the data of this collector to be formatted in the toolbar - * - * @return array */ public function display(): array { @@ -127,8 +123,6 @@ class Events extends BaseCollector /** * Gets the "badge" value for the button. - * - * @return int */ public function getBadgeValue(): int { @@ -139,8 +133,6 @@ class Events extends BaseCollector * Display the icon. * * Icon from https://icons8.com - 1em package - * - * @return string */ public function icon(): string { diff --git a/system/Debug/Toolbar/Collectors/Files.php b/system/Debug/Toolbar/Collectors/Files.php index 16be0e90a1..d476154db1 100644 --- a/system/Debug/Toolbar/Collectors/Files.php +++ b/system/Debug/Toolbar/Collectors/Files.php @@ -42,8 +42,6 @@ class Files extends BaseCollector /** * Returns any information that should be shown next to the title. - * - * @return string */ public function getTitleDetails(): string { @@ -52,8 +50,6 @@ class Files extends BaseCollector /** * Returns the data of this collector to be formatted in the toolbar - * - * @return array */ public function display(): array { @@ -88,8 +84,6 @@ class Files extends BaseCollector /** * Displays the number of included files as a badge in the tab button. - * - * @return int */ public function getBadgeValue(): int { @@ -100,8 +94,6 @@ class Files extends BaseCollector * Display the icon. * * Icon from https://icons8.com - 1em package - * - * @return string */ public function icon(): string { diff --git a/system/Debug/Toolbar/Collectors/History.php b/system/Debug/Toolbar/Collectors/History.php index 5a8053ca46..3c0f4268f6 100644 --- a/system/Debug/Toolbar/Collectors/History.php +++ b/system/Debug/Toolbar/Collectors/History.php @@ -103,8 +103,6 @@ class History extends BaseCollector /** * Returns the data of this collector to be formatted in the toolbar - * - * @return array */ public function display(): array { @@ -113,8 +111,6 @@ class History extends BaseCollector /** * Displays the number of included files as a badge in the tab button. - * - * @return int */ public function getBadgeValue(): int { @@ -123,8 +119,6 @@ class History extends BaseCollector /** * Return true if there are no history files. - * - * @return bool */ public function isEmpty(): bool { @@ -135,8 +129,6 @@ class History extends BaseCollector * Display the icon. * * Icon from https://icons8.com - 1em package - * - * @return string */ public function icon(): string { diff --git a/system/Debug/Toolbar/Collectors/Logs.php b/system/Debug/Toolbar/Collectors/Logs.php index dfa91da685..42d7307ab9 100644 --- a/system/Debug/Toolbar/Collectors/Logs.php +++ b/system/Debug/Toolbar/Collectors/Logs.php @@ -51,8 +51,6 @@ class Logs extends BaseCollector /** * Returns the data of this collector to be formatted in the toolbar - * - * @return array */ public function display(): array { @@ -63,8 +61,6 @@ class Logs extends BaseCollector /** * Does this collector actually have any data to display? - * - * @return bool */ public function isEmpty(): bool { @@ -77,8 +73,6 @@ class Logs extends BaseCollector * Display the icon. * * Icon from https://icons8.com - 1em package - * - * @return string */ public function icon(): string { diff --git a/system/Debug/Toolbar/Collectors/Routes.php b/system/Debug/Toolbar/Collectors/Routes.php index 945c80cb61..060d8b9958 100644 --- a/system/Debug/Toolbar/Collectors/Routes.php +++ b/system/Debug/Toolbar/Collectors/Routes.php @@ -49,8 +49,6 @@ class Routes extends BaseCollector * Returns the data of this collector to be formatted in the toolbar * * @throws ReflectionException - * - * @return array */ public function display(): array { @@ -135,8 +133,6 @@ class Routes extends BaseCollector /** * Returns a count of all the routes in the system. - * - * @return int */ public function getBadgeValue(): int { @@ -149,8 +145,6 @@ class Routes extends BaseCollector * Display the icon. * * Icon from https://icons8.com - 1em package - * - * @return string */ public function icon(): string { diff --git a/system/Debug/Toolbar/Collectors/Timers.php b/system/Debug/Toolbar/Collectors/Timers.php index ec09a0fe3e..cfce9e6175 100644 --- a/system/Debug/Toolbar/Collectors/Timers.php +++ b/system/Debug/Toolbar/Collectors/Timers.php @@ -45,8 +45,6 @@ class Timers extends BaseCollector /** * Child classes should implement this to return the timeline data * formatted for correct usage. - * - * @return array */ protected function formatTimelineData(): array { diff --git a/system/Debug/Toolbar/Collectors/Views.php b/system/Debug/Toolbar/Collectors/Views.php index b716ffa3b1..75fea1d6cc 100644 --- a/system/Debug/Toolbar/Collectors/Views.php +++ b/system/Debug/Toolbar/Collectors/Views.php @@ -84,8 +84,6 @@ class Views extends BaseCollector /** * Child classes should implement this to return the timeline data * formatted for correct usage. - * - * @return array */ protected function formatTimelineData(): array { @@ -120,8 +118,6 @@ class Views extends BaseCollector * 'bar' => 'baz' * ], * ]; - * - * @return array */ public function getVarData(): array { @@ -133,8 +129,6 @@ class Views extends BaseCollector /** * Returns a count of all views. - * - * @return int */ public function getBadgeValue(): int { @@ -145,8 +139,6 @@ class Views extends BaseCollector * Display the icon. * * Icon from https://icons8.com - 1em package - * - * @return string */ public function icon(): string { diff --git a/system/Email/Email.php b/system/Email/Email.php index 569bdb2b82..3ce0798792 100644 --- a/system/Email/Email.php +++ b/system/Email/Email.php @@ -1317,6 +1317,8 @@ class Email } /** + * @param mixed $type + * * @return bool */ protected function attachmentsHaveMultipart($type) diff --git a/system/Encryption/Encryption.php b/system/Encryption/Encryption.php index 1663abe93e..0b5925902f 100644 --- a/system/Encryption/Encryption.php +++ b/system/Encryption/Encryption.php @@ -179,8 +179,6 @@ class Encryption * __isset() magic, providing checking for some of our protected properties * * @param string $key Property name - * - * @return bool */ public function __isset($key): bool { diff --git a/system/Encryption/Exceptions/EncryptionException.php b/system/Encryption/Exceptions/EncryptionException.php index 808e7c472a..d226fd5dd0 100644 --- a/system/Encryption/Exceptions/EncryptionException.php +++ b/system/Encryption/Exceptions/EncryptionException.php @@ -35,8 +35,6 @@ class EncryptionException extends RuntimeException implements ExceptionInterface /** * Thrown when the handler requested is not available. * - * @param string $handler - * * @return static */ public static function forNoHandlerAvailable(string $handler) diff --git a/system/Encryption/Handlers/BaseHandler.php b/system/Encryption/Handlers/BaseHandler.php index 7c332b8f72..9fb28dff1c 100644 --- a/system/Encryption/Handlers/BaseHandler.php +++ b/system/Encryption/Handlers/BaseHandler.php @@ -29,8 +29,6 @@ abstract class BaseHandler implements EncrypterInterface /** * Constructor - * - * @param Encryption|null $config */ public function __construct(?Encryption $config = null) { @@ -78,8 +76,6 @@ abstract class BaseHandler implements EncrypterInterface * __isset() magic, providing checking for some of our properties * * @param string $key Property name - * - * @return bool */ public function __isset($key): bool { diff --git a/system/Entity/Entity.php b/system/Entity/Entity.php index 4d6c31f41f..74339dd6ee 100644 --- a/system/Entity/Entity.php +++ b/system/Entity/Entity.php @@ -111,8 +111,6 @@ class Entity implements JsonSerializable /** * Allows filling in Entity parameters during construction. - * - * @param array|null $data */ public function __construct(?array $data = null) { @@ -151,8 +149,6 @@ class Entity implements JsonSerializable * @param bool $onlyChanged If true, only return values that have changed since object creation * @param bool $cast If true, properties will be casted. * @param bool $recursive If true, inner entities will be casted as array as well. - * - * @return array */ public function toArray(bool $onlyChanged = false, bool $cast = true, bool $recursive = false): array { @@ -197,8 +193,6 @@ class Entity implements JsonSerializable * * @param bool $onlyChanged If true, only return values that have changed since object creation * @param bool $recursive If true, inner entities will be casted as array as well. - * - * @return array */ public function toRawArray(bool $onlyChanged = false, bool $recursive = false): array { @@ -257,8 +251,6 @@ class Entity implements JsonSerializable * properties have changed. * * @param string $key - * - * @return bool */ public function hasChanged(?string $key = null): bool { @@ -283,8 +275,6 @@ class Entity implements JsonSerializable /** * Set raw data array without any mutations * - * @param array $data - * * @return $this */ public function setAttributes(array $data) @@ -300,8 +290,6 @@ class Entity implements JsonSerializable * Checks the datamap to see if this column name is being mapped, * and returns the mapped name, if any, or the original name. * - * @param string $key - * * @return mixed|string */ protected function mapProperty(string $key) @@ -405,7 +393,6 @@ class Entity implements JsonSerializable * Cast as JSON * * @param mixed $value - * @param bool $asArray * * @throws CastException * @@ -429,8 +416,6 @@ class Entity implements JsonSerializable /** * Change the value of the private $_cast property * - * @param bool|null $cast - * * @return bool|Entity */ public function cast(?bool $cast = null) @@ -453,7 +438,6 @@ class Entity implements JsonSerializable * $this->my_property = $p; * $this->setMyProperty() = $p; * - * @param string $key * @param mixed|null $value * * @throws Exception @@ -499,8 +483,6 @@ class Entity implements JsonSerializable * $p = $this->my_property * $p = $this->getMyProperty() * - * @param string $key - * * @throws Exception * * @return mixed @@ -541,10 +523,6 @@ class Entity implements JsonSerializable /** * Returns true if a property exists names $key, or a getter method * exists named like for __get(). - * - * @param string $key - * - * @return bool */ public function __isset(string $key): bool { @@ -561,10 +539,6 @@ class Entity implements JsonSerializable /** * Unsets an attribute property. - * - * @param string $key - * - * @return void */ public function __unset(string $key): void { diff --git a/system/Entity/Exceptions/CastException.php b/system/Entity/Exceptions/CastException.php index 296a8a833c..2cda4d7223 100644 --- a/system/Entity/Exceptions/CastException.php +++ b/system/Entity/Exceptions/CastException.php @@ -21,8 +21,6 @@ class CastException extends FrameworkException /** * Thrown when the cast class does not extends BaseCast. * - * @param string $class - * * @return static */ public static function forInvalidInterface(string $class) @@ -33,8 +31,6 @@ class CastException extends FrameworkException /** * Thrown when the Json format is invalid. * - * @param int $error - * * @return static */ public static function forInvalidJsonFormat(int $error) @@ -63,8 +59,6 @@ class CastException extends FrameworkException /** * Thrown when the cast method is not `get` or `set`. * - * @param string $method - * * @return static */ public static function forInvalidMethod(string $method) diff --git a/system/Events/Events.php b/system/Events/Events.php index 0b25f22c7d..d32ff33912 100644 --- a/system/Events/Events.php +++ b/system/Events/Events.php @@ -139,8 +139,6 @@ class Events * * @param string $eventName * @param mixed $arguments - * - * @return bool */ public static function trigger($eventName, ...$arguments): bool { @@ -177,8 +175,6 @@ class Events * sorted by priority. * * @param string $eventName - * - * @return array */ public static function listeners($eventName): array { @@ -204,10 +200,7 @@ class Events * If the listener couldn't be found, returns FALSE, else TRUE if * it was removed. * - * @param string $eventName - * @param callable $listener - * - * @return bool + * @param string $eventName */ public static function removeListener($eventName, callable $listener): bool { @@ -251,8 +244,6 @@ class Events /** * Sets the path to the file that routes are read from. * - * @param array $files - * * @return void */ public static function setFiles(array $files) @@ -275,8 +266,6 @@ class Events * simply logged. Useful during testing when you don't actually want * the tests to run. * - * @param bool $choice - * * @return void */ public static function simulate(bool $choice = true) diff --git a/system/Exceptions/DebugTraceableTrait.php b/system/Exceptions/DebugTraceableTrait.php index 5c83d93d42..b5fb691d78 100644 --- a/system/Exceptions/DebugTraceableTrait.php +++ b/system/Exceptions/DebugTraceableTrait.php @@ -24,10 +24,6 @@ trait DebugTraceableTrait /** * Tweaks the exception's constructor to assign the file/line to where * it is actually raised rather than were it is instantiated. - * - * @param string $message - * @param int $code - * @param Throwable|null $previous */ final public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null) { diff --git a/system/Files/File.php b/system/Files/File.php index 579e412075..d116aa9279 100644 --- a/system/Files/File.php +++ b/system/Files/File.php @@ -38,9 +38,6 @@ class File extends SplFileInfo /** * Run our SplFileInfo constructor with an optional verification * that the path is really a file. - * - * @param string $path - * @param bool $checkFile */ public function __construct(string $path, bool $checkFile = false) { @@ -68,8 +65,6 @@ class File extends SplFileInfo /** * Retrieve the file size by unit. * - * @param string $unit - * * @return int|string */ public function getSizeByUnit(string $unit = 'b') @@ -89,8 +84,6 @@ class File extends SplFileInfo /** * Attempts to determine the file extension based on the trusted * getType() method. If the mime type is unknown, will return null. - * - * @return string|null */ public function guessExtension(): ?string { @@ -122,8 +115,6 @@ class File extends SplFileInfo /** * Generates a random names based on a simple hash and the time, with * the correct file extension attached. - * - * @return string */ public function getRandomName(): string { @@ -136,10 +127,6 @@ class File extends SplFileInfo /** * Moves a file to a new location. * - * @param string $targetPath - * @param string|null $name - * @param bool $overwrite - * * @return File */ public function move(string $targetPath, ?string $name = null, bool $overwrite = false) @@ -167,12 +154,6 @@ class File extends SplFileInfo * First, it checks whether the delimiter is present in the filename, if it is, then it checks whether the * last element is an integer as there may be cases that the delimiter may be present in the filename. * For the all other cases, it appends an integer starting from zero before the file's extension. - * - * @param string $destination - * @param string $delimiter - * @param int $i - * - * @return string */ public function getDestination(string $destination, string $delimiter = '_', int $i = 0): string { diff --git a/system/Filters/Exceptions/FilterException.php b/system/Filters/Exceptions/FilterException.php index 6bdef40555..04bb36bdc2 100644 --- a/system/Filters/Exceptions/FilterException.php +++ b/system/Filters/Exceptions/FilterException.php @@ -23,8 +23,6 @@ class FilterException extends ConfigException implements ExceptionInterface * Thrown when the provided alias is not within * the list of configured filter aliases. * - * @param string $alias - * * @return static */ public static function forNoAlias(string $alias) @@ -35,8 +33,6 @@ class FilterException extends ConfigException implements ExceptionInterface /** * Thrown when the filter class does not implement FilterInterface. * - * @param string $class - * * @return static */ public static function forIncorrectInterface(string $class) diff --git a/system/Filters/FilterInterface.php b/system/Filters/FilterInterface.php index ffadc19e70..32a18de746 100644 --- a/system/Filters/FilterInterface.php +++ b/system/Filters/FilterInterface.php @@ -29,8 +29,7 @@ interface FilterInterface * sent back to the client, allowing for error pages, * redirects, etc. * - * @param RequestInterface $request - * @param null $arguments + * @param null $arguments * * @return mixed */ @@ -42,9 +41,7 @@ interface FilterInterface * to stop execution of other after filters, short of * throwing an Exception or Error. * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param null $arguments + * @param null $arguments * * @return mixed */ diff --git a/system/Filters/Filters.php b/system/Filters/Filters.php index b6cc9bb98c..42ba656179 100644 --- a/system/Filters/Filters.php +++ b/system/Filters/Filters.php @@ -98,10 +98,7 @@ class Filters /** * Constructor. * - * @param FiltersConfig $config - * @param RequestInterface $request - * @param ResponseInterface $response - * @param Modules|null $modules + * @param FiltersConfig $config */ public function __construct($config, RequestInterface $request, ResponseInterface $response, ?Modules $modules = null) { @@ -143,8 +140,6 @@ class Filters /** * Set the response explicity. - * - * @param ResponseInterface $response */ public function setResponse(ResponseInterface $response) { @@ -155,9 +150,6 @@ class Filters * Runs through all of the filters for the specified * uri and position. * - * @param string $uri - * @param string $position - * * @throws FilterException * * @return mixed|RequestInterface|ResponseInterface @@ -281,8 +273,6 @@ class Filters /** * Returns the processed filters array. - * - * @return array */ public function getFilters(): array { @@ -291,8 +281,6 @@ class Filters /** * Returns the filtersClass array. - * - * @return array */ public function getFiltersClass(): array { @@ -304,11 +292,6 @@ class Filters * MUST be called prior to initialize(); * Intended for use within routes files. * - * @param string $class - * @param string|null $alias - * @param string $when - * @param string $section - * * @return $this */ public function addFilter(string $class, ?string $alias = null, string $when = 'before', string $section = 'globals') @@ -337,9 +320,6 @@ class Filters * after the filter name, followed by a comma-separated list of arguments that * are passed to the filter when executed. * - * @param string $name - * @param string $when - * * @return Filters */ public function enableFilter(string $name, string $when = 'before') @@ -377,8 +357,6 @@ class Filters /** * Returns the arguments for a specified key, or all. * - * @param string|null $key - * * @return mixed */ public function getArguments(?string $key = null) @@ -495,8 +473,6 @@ class Filters /** * Maps filter aliases to the equivalent filter classes * - * @param string $position - * * @throws FilterException * * @return void diff --git a/system/Filters/Honeypot.php b/system/Filters/Honeypot.php index f4046d1cd8..1b16e982a6 100644 --- a/system/Filters/Honeypot.php +++ b/system/Filters/Honeypot.php @@ -25,8 +25,7 @@ class Honeypot implements FilterInterface * Checks if Honeypot field is empty; if not * then the requester is a bot * - * @param RequestInterface $request - * @param array|null $arguments + * @param array|null $arguments * * @return void */ @@ -41,9 +40,7 @@ class Honeypot implements FilterInterface /** * Attach a honeypot to the current response. * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param array|null $arguments + * @param array|null $arguments * * @return void */ diff --git a/system/Format/Exceptions/FormatException.php b/system/Format/Exceptions/FormatException.php index c22626f4ad..5fef64eae2 100644 --- a/system/Format/Exceptions/FormatException.php +++ b/system/Format/Exceptions/FormatException.php @@ -25,8 +25,6 @@ class FormatException extends RuntimeException implements ExceptionInterface /** * Thrown when the instantiated class does not exist. * - * @param string $class - * * @return FormatException */ public static function forInvalidFormatter(string $class) @@ -51,8 +49,6 @@ class FormatException extends RuntimeException implements ExceptionInterface * Thrown when the supplied MIME type has no * defined Formatter class. * - * @param string $mime - * * @return FormatException */ public static function forInvalidMime(string $mime) diff --git a/system/Format/Format.php b/system/Format/Format.php index c95ae291cf..db05aca146 100644 --- a/system/Format/Format.php +++ b/system/Format/Format.php @@ -28,8 +28,6 @@ class Format /** * Constructor. - * - * @param FormatConfig $config */ public function __construct(FormatConfig $config) { @@ -49,11 +47,7 @@ class Format /** * A Factory method to return the appropriate formatter for the given mime type. * - * @param string $mime - * * @throws FormatException - * - * @return FormatterInterface */ public function getFormatter(string $mime): FormatterInterface { diff --git a/system/Format/XMLFormatter.php b/system/Format/XMLFormatter.php index 0fad104e89..b32e148a7d 100644 --- a/system/Format/XMLFormatter.php +++ b/system/Format/XMLFormatter.php @@ -55,7 +55,6 @@ class XMLFormatter implements FormatterInterface * * @see http://www.codexworld.com/convert-array-to-xml-in-php/ * - * @param array $data * @param SimpleXMLElement $output */ protected function arrayToXML(array $data, &$output) diff --git a/system/HTTP/CLIRequest.php b/system/HTTP/CLIRequest.php index c8b59256df..b8db857fce 100644 --- a/system/HTTP/CLIRequest.php +++ b/system/HTTP/CLIRequest.php @@ -52,8 +52,6 @@ class CLIRequest extends Request /** * Constructor - * - * @param App $config */ public function __construct(App $config) { @@ -81,8 +79,6 @@ class CLIRequest extends Request * * // Routes to /users/21/profile (index is removed for routing sake) * // with the option foo = bar. - * - * @return string */ public function getPath(): string { @@ -94,8 +90,6 @@ class CLIRequest extends Request /** * Returns an associative array of all CLI options found, with * their values. - * - * @return array */ public function getOptions(): array { @@ -104,8 +98,6 @@ class CLIRequest extends Request /** * Returns the path segments. - * - * @return array */ public function getSegments(): array { @@ -115,8 +107,6 @@ class CLIRequest extends Request /** * Returns the value for a single CLI option that was passed in. * - * @param string $key - * * @return string|null */ public function getOption(string $key) @@ -135,10 +125,6 @@ class CLIRequest extends Request * ]; * * getOptionString() = '-foo bar -baz "queue some stuff"' - * - * @param bool $useLongOpts - * - * @return string */ public function getOptionString(bool $useLongOpts = false): string { @@ -206,8 +192,6 @@ class CLIRequest extends Request /** * Determines if this request was made from the command line (CLI). - * - * @return bool */ public function isCLI(): bool { diff --git a/system/HTTP/CURLRequest.php b/system/HTTP/CURLRequest.php index c6df75354b..3be8214d42 100644 --- a/system/HTTP/CURLRequest.php +++ b/system/HTTP/CURLRequest.php @@ -79,10 +79,7 @@ class CURLRequest extends Request * - timeout * - any other request options to use as defaults. * - * @param App $config - * @param URI $uri * @param ResponseInterface $response - * @param array $options */ public function __construct(App $config, URI $uri, ?ResponseInterface $response = null, array $options = []) { @@ -106,10 +103,6 @@ class CURLRequest extends Request * URL, it will be merged with $this->baseURI to form a complete URL. * * @param string $method - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function request($method, string $url, array $options = []): ResponseInterface { @@ -126,11 +119,6 @@ class CURLRequest extends Request /** * Convenience method for sending a GET request. - * - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function get(string $url, array $options = []): ResponseInterface { @@ -139,11 +127,6 @@ class CURLRequest extends Request /** * Convenience method for sending a DELETE request. - * - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function delete(string $url, array $options = []): ResponseInterface { @@ -152,11 +135,6 @@ class CURLRequest extends Request /** * Convenience method for sending a HEAD request. - * - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function head(string $url, array $options = []): ResponseInterface { @@ -165,11 +143,6 @@ class CURLRequest extends Request /** * Convenience method for sending an OPTIONS request. - * - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function options(string $url, array $options = []): ResponseInterface { @@ -178,11 +151,6 @@ class CURLRequest extends Request /** * Convenience method for sending a PATCH request. - * - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function patch(string $url, array $options = []): ResponseInterface { @@ -191,11 +159,6 @@ class CURLRequest extends Request /** * Convenience method for sending a POST request. - * - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function post(string $url, array $options = []): ResponseInterface { @@ -204,11 +167,6 @@ class CURLRequest extends Request /** * Convenience method for sending a PUT request. - * - * @param string $url - * @param array $options - * - * @return ResponseInterface */ public function put(string $url, array $options = []): ResponseInterface { @@ -218,9 +176,7 @@ class CURLRequest extends Request /** * Set the HTTP Authentication. * - * @param string $username - * @param string $password - * @param string $type basic or digest + * @param string $type basic or digest * * @return $this */ @@ -238,8 +194,7 @@ class CURLRequest extends Request /** * Set form data to be sent. * - * @param array $params - * @param bool $multipart Set TRUE if you are sending CURLFiles + * @param bool $multipart Set TRUE if you are sending CURLFiles * * @return $this */ @@ -271,8 +226,6 @@ class CURLRequest extends Request /** * Sets the correct settings based on the options array * passed in. - * - * @param array $options */ protected function parseOptions(array $options) { @@ -304,10 +257,6 @@ class CURLRequest extends Request /** * If the $url is a relative URL, will attempt to create * a full URL by prepending $this->baseURI to it. - * - * @param string $url - * - * @return string */ protected function prepareURL(string $url): string { @@ -327,8 +276,6 @@ class CURLRequest extends Request * since users expect a different answer here. * * @param bool|false $upper Whether to return in upper or lower case. - * - * @return string */ public function getMethod(bool $upper = false): string { @@ -338,9 +285,6 @@ class CURLRequest extends Request /** * Fires the actual cURL request. * - * @param string $method - * @param string $url - * * @return ResponseInterface */ public function send(string $method, string $url) @@ -408,10 +352,6 @@ class CURLRequest extends Request /** * Takes all headers current part of this request and adds them * to the cURL request. - * - * @param array $curlOptions - * - * @return array */ protected function applyRequestHeaders(array $curlOptions = []): array { @@ -441,11 +381,6 @@ class CURLRequest extends Request /** * Apply method - * - * @param string $method - * @param array $curlOptions - * - * @return array */ protected function applyMethod(string $method, array $curlOptions): array { @@ -475,10 +410,6 @@ class CURLRequest extends Request /** * Apply body - * - * @param array $curlOptions - * - * @return array */ protected function applyBody(array $curlOptions = []): array { @@ -492,8 +423,6 @@ class CURLRequest extends Request /** * Parses the header retrieved from the cURL response into * our Response object. - * - * @param array $headers */ protected function setResponseHeaders(array $headers = []) { @@ -520,9 +449,6 @@ class CURLRequest extends Request /** * Set CURL options * - * @param array $curlOptions - * @param array $config - * * @throws InvalidArgumentException * * @return array @@ -681,10 +607,6 @@ class CURLRequest extends Request * and grabbing the output. * * @codeCoverageIgnore - * - * @param array $curlOptions - * - * @return string */ protected function sendRequest(array $curlOptions = []): string { diff --git a/system/HTTP/ContentSecurityPolicy.php b/system/HTTP/ContentSecurityPolicy.php index 19b194842a..ed19d2d9b0 100644 --- a/system/HTTP/ContentSecurityPolicy.php +++ b/system/HTTP/ContentSecurityPolicy.php @@ -196,8 +196,6 @@ class ContentSecurityPolicy * Constructor. * * Stores our default values from the Config file. - * - * @param ContentSecurityPolicyConfig $config */ public function __construct(ContentSecurityPolicyConfig $config) { @@ -213,8 +211,6 @@ class ContentSecurityPolicy * * Should be called just prior to sending the response to the user agent. * - * @param ResponseInterface $response - * * @return void */ public function finalize(ResponseInterface &$response) @@ -230,8 +226,6 @@ class ContentSecurityPolicy * determine what errors need to be addressed before you turn on * all filtering. * - * @param bool $value - * * @return $this */ public function reportOnly(bool $value = true) @@ -249,7 +243,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-base-uri * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -271,7 +264,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-child-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -292,7 +284,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-connect-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -313,7 +304,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-default-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -333,7 +323,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-font-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -351,7 +340,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-form-action * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -369,7 +357,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-frame-ancestors * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -387,7 +374,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-frame-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -405,7 +391,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-img-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -423,7 +408,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-media-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -441,7 +425,6 @@ class ContentSecurityPolicy * @see https://www.w3.org/TR/CSP/#directive-manifest-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -459,7 +442,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-object-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -476,8 +458,7 @@ class ContentSecurityPolicy * * @see http://www.w3.org/TR/CSP/#directive-plugin-types * - * @param array|string $mime One or more plugin mime types, separate by spaces - * @param bool|null $explicitReporting + * @param array|string $mime One or more plugin mime types, separate by spaces * * @return $this */ @@ -494,8 +475,6 @@ class ContentSecurityPolicy * * @see http://www.w3.org/TR/CSP/#directive-report-uri * - * @param string $uri - * * @return $this */ public function setReportURI(string $uri) @@ -511,8 +490,7 @@ class ContentSecurityPolicy * * @see http://www.w3.org/TR/CSP/#directive-sandbox * - * @param array|string $flags An array of sandbox flags that can be added to the directive. - * @param bool|null $explicitReporting + * @param array|string $flags An array of sandbox flags that can be added to the directive. * * @return $this */ @@ -530,7 +508,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-connect-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -548,7 +525,6 @@ class ContentSecurityPolicy * @see http://www.w3.org/TR/CSP/#directive-connect-src * * @param array|string $uri - * @param bool|null $explicitReporting * * @return $this */ @@ -563,8 +539,6 @@ class ContentSecurityPolicy * Sets whether the user agents should rewrite URL schemes, changing * HTTP to HTTPS. * - * @param bool $value - * * @return $this */ public function upgradeInsecureRequests(bool $value = true) @@ -578,8 +552,6 @@ class ContentSecurityPolicy * DRY method to add an string or array to a class property. * * @param array|string $options - * @param string $target - * @param bool|null $explicitReporting * * @return void */ @@ -604,8 +576,6 @@ class ContentSecurityPolicy * placeholders with actual nonces, that we'll then add to our * headers. * - * @param ResponseInterface $response - * * @return void */ protected function generateNonces(ResponseInterface &$response) @@ -650,8 +620,6 @@ class ContentSecurityPolicy * Content-Security-Policy and Content-Security-Policy-Report-Only headers * with their values to the response object. * - * @param ResponseInterface $response - * * @return void */ protected function buildHeaders(ResponseInterface &$response) @@ -736,7 +704,6 @@ class ContentSecurityPolicy * array might have options that are geared toward either the regular or the * reportOnly header, since it's viable to have both simultaneously. * - * @param string $name * @param array|string|null $values * * @return void diff --git a/system/HTTP/DownloadResponse.php b/system/HTTP/DownloadResponse.php index bc18254427..ed343dbe4b 100644 --- a/system/HTTP/DownloadResponse.php +++ b/system/HTTP/DownloadResponse.php @@ -71,9 +71,6 @@ class DownloadResponse extends Response /** * Constructor. - * - * @param string $filename - * @param bool $setMime */ public function __construct(string $filename, bool $setMime) { @@ -88,8 +85,6 @@ class DownloadResponse extends Response /** * set download for binary string. - * - * @param string $binary */ public function setBinary(string $binary) { @@ -102,8 +97,6 @@ class DownloadResponse extends Response /** * set download for file. - * - * @param string $filepath */ public function setFilePath(string $filepath) { @@ -117,8 +110,6 @@ class DownloadResponse extends Response /** * set name for the download. * - * @param string $filename - * * @return $this */ public function setFileName(string $filename) @@ -130,8 +121,6 @@ class DownloadResponse extends Response /** * get content length. - * - * @return int */ public function getContentLength(): int { @@ -170,8 +159,6 @@ class DownloadResponse extends Response /** * get download filename. - * - * @return string */ private function getDownloadFileName(): string { @@ -197,8 +184,6 @@ class DownloadResponse extends Response /** * get Content-Disposition Header string. - * - * @return string */ private function getContentDisposition(): string { @@ -222,9 +207,6 @@ class DownloadResponse extends Response /** * Disallows status changing. * - * @param int $code - * @param string $reason - * * @throws DownloadException */ public function setStatusCode(int $code, string $reason = '') @@ -236,9 +218,6 @@ class DownloadResponse extends Response * Sets the Content Type header for this response with the mime type * and, optionally, the charset. * - * @param string $mime - * @param string $charset - * * @return ResponseInterface */ public function setContentType(string $mime, string $charset = 'UTF-8') @@ -268,8 +247,6 @@ class DownloadResponse extends Response /** * Disables cache configuration. * - * @param array $options - * * @throws DownloadException */ public function setCache(array $options = []) diff --git a/system/HTTP/Exceptions/HTTPException.php b/system/HTTP/Exceptions/HTTPException.php index cfed948a11..966c3c7fd7 100644 --- a/system/HTTP/Exceptions/HTTPException.php +++ b/system/HTTP/Exceptions/HTTPException.php @@ -33,8 +33,6 @@ class HTTPException extends FrameworkException /** * For CurlRequest * - * @param string $cert - * * @return HTTPException */ public static function forSSLCertNotFound(string $cert) @@ -45,8 +43,6 @@ class HTTPException extends FrameworkException /** * For CurlRequest * - * @param string $key - * * @return HTTPException */ public static function forInvalidSSLKey(string $key) @@ -57,9 +53,6 @@ class HTTPException extends FrameworkException /** * For CurlRequest * - * @param string $errorNum - * @param string $error - * * @return HTTPException * * @codeCoverageIgnore @@ -72,8 +65,6 @@ class HTTPException extends FrameworkException /** * For IncomingRequest * - * @param string $type - * * @return HTTPException */ public static function forInvalidNegotiationType(string $type) @@ -84,8 +75,6 @@ class HTTPException extends FrameworkException /** * For Message * - * @param string $protocols - * * @return HTTPException */ public static function forInvalidHTTPProtocol(string $protocols) @@ -106,8 +95,6 @@ class HTTPException extends FrameworkException /** * For RedirectResponse * - * @param string $route - * * @return HTTPException */ public static function forInvalidRedirectRoute(string $route) @@ -128,8 +115,6 @@ class HTTPException extends FrameworkException /** * For Response * - * @param int $code - * * @return HTTPException */ public static function forInvalidStatusCode(int $code) @@ -140,8 +125,6 @@ class HTTPException extends FrameworkException /** * For Response * - * @param int $code - * * @return HTTPException */ public static function forUnkownStatusCode(int $code) @@ -152,8 +135,6 @@ class HTTPException extends FrameworkException /** * For URI * - * @param string $uri - * * @return HTTPException */ public static function forUnableToParseURI(string $uri) @@ -164,8 +145,6 @@ class HTTPException extends FrameworkException /** * For URI * - * @param int $segment - * * @return HTTPException */ public static function forURISegmentOutOfRange(int $segment) @@ -176,8 +155,6 @@ class HTTPException extends FrameworkException /** * For URI * - * @param int $port - * * @return HTTPException */ public static function forInvalidPort(int $port) @@ -208,8 +185,6 @@ class HTTPException extends FrameworkException /** * For Uploaded file move * - * @param string|null $path - * * @return HTTPException */ public static function forInvalidFile(?string $path = null) @@ -220,10 +195,6 @@ class HTTPException extends FrameworkException /** * For Uploaded file move * - * @param string $source - * @param string $target - * @param string $error - * * @return HTTPException */ public static function forMoveFailed(string $source, string $target, string $error) @@ -234,8 +205,6 @@ class HTTPException extends FrameworkException /** * For Invalid SameSite attribute setting * - * @param string $samesite - * * @return HTTPException * * @deprecated Use `CookieException::forInvalidSameSite()` instead. diff --git a/system/HTTP/Files/FileCollection.php b/system/HTTP/Files/FileCollection.php index 208717c828..10e58c2eb8 100644 --- a/system/HTTP/Files/FileCollection.php +++ b/system/HTTP/Files/FileCollection.php @@ -48,8 +48,6 @@ class FileCollection /** * Attempts to get a single file from the collection of uploaded files. * - * @param string $name - * * @return UploadedFile|null */ public function getFile(string $name) @@ -77,8 +75,6 @@ class FileCollection /** * Verify if a file exist in the collection of uploaded files and is have been uploaded with multiple option. * - * @param string $name - * * @return array|null */ public function getFileMultiple(string $name) @@ -110,8 +106,6 @@ class FileCollection * this request. * * @param string $fileID The name of the uploaded file (from the input) - * - * @return bool */ public function hasFile(string $fileID): bool { @@ -165,8 +159,6 @@ class FileCollection * Given a file array, will create UploadedFile instances. Will * loop over an array and create objects for each. * - * @param array $array - * * @return array|UploadedFile */ protected function createFileObject(array $array) @@ -202,10 +194,6 @@ class FileCollection * of this method. * * @see http://php.net/manual/en/reserved.variables.files.php#118294 - * - * @param array $data - * - * @return array */ protected function fixFilesArray(array $data): array { diff --git a/system/HTTP/Files/UploadedFile.php b/system/HTTP/Files/UploadedFile.php index 0fbdea83dc..17e9130694 100644 --- a/system/HTTP/Files/UploadedFile.php +++ b/system/HTTP/Files/UploadedFile.php @@ -163,8 +163,6 @@ class UploadedFile extends File implements UploadedFileInterface * create file target path if * the set path does not exist * - * @param string $path - * * @return string The path set or created. */ protected function setPath(string $path): string @@ -185,8 +183,6 @@ class UploadedFile extends File implements UploadedFileInterface * Returns whether the file has been moved or not. If it has, * the move() method will not work and certain properties, like * the tempName, will no longer be available. - * - * @return bool */ public function hasMoved(): bool { @@ -215,8 +211,6 @@ class UploadedFile extends File implements UploadedFileInterface /** * Get error string - * - * @return string */ public function getErrorString(): string { @@ -262,8 +256,6 @@ class UploadedFile extends File implements UploadedFileInterface /** * Returns the name of the file as provided by the client during upload. - * - * @return string */ public function getClientName(): string { @@ -272,8 +264,6 @@ class UploadedFile extends File implements UploadedFileInterface /** * Gets the temporary filename where the file was uploaded to. - * - * @return string */ public function getTempName(): string { @@ -301,8 +291,6 @@ class UploadedFile extends File implements UploadedFileInterface * mime type. In contrast to getExtension, this method will return * an empty string if it fails to determine an extension instead of * falling back to the unsecure clientExtension. - * - * @return string */ public function guessExtension(): string { @@ -313,8 +301,6 @@ class UploadedFile extends File implements UploadedFileInterface * Returns the original file extension, based on the file name that * was uploaded. This is NOT a trusted source. * For a trusted version, use guessExtension() instead. - * - * @return string */ public function getClientExtension(): string { @@ -324,8 +310,6 @@ class UploadedFile extends File implements UploadedFileInterface /** * Returns whether the file was uploaded successfully, based on whether * it was uploaded via HTTP and has no errors. - * - * @return bool */ public function isValid(): bool { diff --git a/system/HTTP/Files/UploadedFileInterface.php b/system/HTTP/Files/UploadedFileInterface.php index c6a06e4e45..37c18554a1 100644 --- a/system/HTTP/Files/UploadedFileInterface.php +++ b/system/HTTP/Files/UploadedFileInterface.php @@ -69,8 +69,6 @@ interface UploadedFileInterface * Returns whether the file has been moved or not. If it has, * the move() method will not work and certain properties, like * the tempName, will no longer be available. - * - * @return bool */ public function hasMoved(): bool; @@ -108,8 +106,6 @@ interface UploadedFileInterface /** * Gets the temporary filename where the file was uploaded to. - * - * @return string */ public function getTempName(): string; @@ -117,8 +113,6 @@ interface UploadedFileInterface * Returns the original file extension, based on the file name that * was uploaded. This is NOT a trusted source. * For a trusted version, use guessExtension() instead. - * - * @return string */ public function getClientExtension(): string; @@ -126,16 +120,12 @@ interface UploadedFileInterface * Returns the mime type as provided by the client. * This is NOT a trusted value. * For a trusted version, use getMimeType() instead. - * - * @return string */ public function getClientMimeType(): string; /** * Returns whether the file was uploaded successfully, based on whether * it was uploaded via HTTP and has no errors. - * - * @return bool */ public function isValid(): bool; @@ -145,12 +135,6 @@ interface UploadedFileInterface * First, it checks whether the delimiter is present in the filename, if it is, then it checks whether the * last element is an integer as there may be cases that the delimiter may be present in the filename. * For the all other cases, it appends an integer starting from zero before the file's extension. - * - * @param string $destination - * @param string $delimiter - * @param int $i - * - * @return string */ public function getDestination(string $destination, string $delimiter = '_', int $i = 0): string; } diff --git a/system/HTTP/Header.php b/system/HTTP/Header.php index 402eabf65e..9cab888d44 100644 --- a/system/HTTP/Header.php +++ b/system/HTTP/Header.php @@ -36,7 +36,6 @@ class Header /** * Header constructor. name is mandatory, if a value is provided, it will be set. * - * @param string $name * @param array|string|null $value */ public function __construct(string $name, $value = null) @@ -47,8 +46,6 @@ class Header /** * Returns the name of the header, in the same case it was set. - * - * @return string */ public function getName(): string { @@ -69,8 +66,6 @@ class Header /** * Sets the name of the header, overwriting any previous value. * - * @param string $name - * * @return $this */ public function setName(string $name) @@ -179,8 +174,6 @@ class Header /** * Returns a representation of the entire header string, including * the header name and all values converted to the proper format. - * - * @return string */ public function __toString(): string { diff --git a/system/HTTP/IncomingRequest.php b/system/HTTP/IncomingRequest.php index 2357bf2da8..4dec7ebc61 100755 --- a/system/HTTP/IncomingRequest.php +++ b/system/HTTP/IncomingRequest.php @@ -188,9 +188,6 @@ class IncomingRequest extends Request * Sets up our URI object based on the information we have. This is * either provided by the user in the baseURL Config setting, or * determined from the environment as needed. - * - * @param string $protocol - * @param string $baseURL */ protected function detectURI(string $protocol, string $baseURL) { @@ -204,10 +201,6 @@ class IncomingRequest extends Request /** * Detects the relative path based on * the URIProtocol Config setting. - * - * @param string $protocol - * - * @return string */ public function detectPath(string $protocol = ''): string { @@ -293,8 +286,6 @@ class IncomingRequest extends Request * Parse QUERY_STRING * * Will parse QUERY_STRING and automatically detect the URI from it. - * - * @return string */ protected function parseQueryString(): string { @@ -323,12 +314,6 @@ class IncomingRequest extends Request /** * Provides a convenient way to work with the Negotiate class * for content negotiation. - * - * @param string $type - * @param array $supported - * @param bool $strictMatch - * - * @return string */ public function negotiate(string $type, array $supported, bool $strictMatch = false): string { @@ -355,8 +340,6 @@ class IncomingRequest extends Request /** * Determines if this request was made from the command line (CLI). - * - * @return bool */ public function isCLI(): bool { @@ -365,8 +348,6 @@ class IncomingRequest extends Request /** * Test to see if a request contains the HTTP_X_REQUESTED_WITH header. - * - * @return bool */ public function isAJAX(): bool { @@ -376,8 +357,6 @@ class IncomingRequest extends Request /** * Attempts to detect if the current connection is secure through * a few different methods. - * - * @return bool */ public function isSecure(): bool { @@ -440,8 +419,6 @@ class IncomingRequest extends Request /** * Returns the path relative to SCRIPT_NAME, * running detection as necessary. - * - * @return string */ public function getPath(): string { @@ -455,8 +432,6 @@ class IncomingRequest extends Request /** * Sets the locale string for this request. * - * @param string $locale - * * @return IncomingRequest */ public function setLocale(string $locale) @@ -476,8 +451,6 @@ class IncomingRequest extends Request /** * Gets the current locale, with a fallback to the default * locale if none is set. - * - * @return string */ public function getLocale(): string { @@ -486,8 +459,6 @@ class IncomingRequest extends Request /** * Returns the default locale as set in Config\App.php - * - * @return string */ public function getDefaultLocale(): string { @@ -682,8 +653,6 @@ class IncomingRequest extends Request * with redirect_with_input(). It first checks for the data in the old * POST data, then the old GET data and finally check for dot arrays * - * @param string $key - * * @return mixed */ public function getOldInput(string $key) @@ -729,8 +698,6 @@ class IncomingRequest extends Request /** * Returns an array of all files that have been uploaded with this * request. Each file is represented by an UploadedFile instance. - * - * @return array */ public function getFiles(): array { @@ -745,8 +712,6 @@ class IncomingRequest extends Request * Verify if a file exist, by the name of the input field used to upload it, in the collection * of uploaded files and if is have been uploaded with multiple option. * - * @param string $fileID - * * @return array|null */ public function getFileMultiple(string $fileID) @@ -762,8 +727,6 @@ class IncomingRequest extends Request * Retrieves a single file by the name of the input field used * to upload it. * - * @param string $fileID - * * @return UploadedFile|null */ public function getFile(string $fileID) @@ -780,10 +743,6 @@ class IncomingRequest extends Request * * Do some final cleaning of the URI and return it, currently only used in static::_parse_request_uri() * - * @param string $uri - * - * @return string - * * @deprecated Use URI::removeDotSegments() directly */ protected function removeRelativeDirectory(string $uri): string diff --git a/system/HTTP/Message.php b/system/HTTP/Message.php index 37c2e7d19c..99a4e39588 100644 --- a/system/HTTP/Message.php +++ b/system/HTTP/Message.php @@ -71,8 +71,6 @@ class Message implements MessageInterface * Returns a single header object. If multiple headers with the same * name exist, then will return an array of header objects. * - * @param string $name - * * @return array|Header|null * * @deprecated Use Message::header() to make room for PSR-7 @@ -86,10 +84,6 @@ class Message implements MessageInterface /** * Determines whether a header exists. - * - * @param string $name - * - * @return bool */ public function hasHeader(string $name): bool { @@ -108,10 +102,6 @@ class Message implements MessageInterface * NOTE: Not all header values may be appropriately represented using * comma concatenation. For such headers, use getHeader() instead * and supply your own delimiter when concatenating. - * - * @param string $name - * - * @return string */ public function getHeaderLine(string $name): string { @@ -126,8 +116,6 @@ class Message implements MessageInterface /** * Returns the HTTP Protocol Version. - * - * @return string */ public function getProtocolVersion(): string { diff --git a/system/HTTP/MessageInterface.php b/system/HTTP/MessageInterface.php index d5cd770667..2addc2b2a8 100644 --- a/system/HTTP/MessageInterface.php +++ b/system/HTTP/MessageInterface.php @@ -61,7 +61,6 @@ interface MessageInterface /** * Sets a header and it's value. * - * @param string $name * @param array|string|null $value * * @return $this @@ -71,8 +70,6 @@ interface MessageInterface /** * Removes a header from the list of headers we track. * - * @param string $name - * * @return $this */ public function removeHeader(string $name); @@ -81,9 +78,6 @@ interface MessageInterface * Adds an additional header value to any headers that accept * multiple values (i.e. are an array or implement ArrayAccess) * - * @param string $name - * @param string|null $value - * * @return $this */ public function appendHeader(string $name, ?string $value); @@ -92,9 +86,6 @@ interface MessageInterface * Adds an additional header value to any headers that accept * multiple values (i.e. are an array or implement ArrayAccess) * - * @param string $name - * @param string $value - * * @return $this */ public function prependHeader(string $name, string $value); @@ -102,8 +93,6 @@ interface MessageInterface /** * Sets the HTTP protocol version. * - * @param string $version - * * @throws HTTPException For invalid protocols * * @return $this diff --git a/system/HTTP/MessageTrait.php b/system/HTTP/MessageTrait.php index 9f2cd2447e..e4fb73841c 100644 --- a/system/HTTP/MessageTrait.php +++ b/system/HTTP/MessageTrait.php @@ -134,7 +134,6 @@ trait MessageTrait /** * Sets a header and it's value. * - * @param string $name * @param array|string|null $value * * @return $this @@ -162,8 +161,6 @@ trait MessageTrait /** * Removes a header from the list of headers we track. * - * @param string $name - * * @return $this */ public function removeHeader(string $name): self @@ -178,9 +175,6 @@ trait MessageTrait * Adds an additional header value to any headers that accept * multiple values (i.e. are an array or implement ArrayAccess) * - * @param string $name - * @param string|null $value - * * @return $this */ public function appendHeader(string $name, ?string $value): self @@ -198,9 +192,6 @@ trait MessageTrait * Adds an additional header value to any headers that accept * multiple values (i.e. are an array or implement ArrayAccess) * - * @param string $name - * @param string $value - * * @return $this */ public function prependHeader(string $name, string $value): self @@ -215,10 +206,6 @@ trait MessageTrait /** * Takes a header name in any case, and returns the * normal-case version of the header. - * - * @param string $name - * - * @return string */ protected function getHeaderName(string $name): string { @@ -228,8 +215,6 @@ trait MessageTrait /** * Sets the HTTP protocol version. * - * @param string $version - * * @throws HTTPException For invalid protocols * * @return $this diff --git a/system/HTTP/Negotiate.php b/system/HTTP/Negotiate.php index ef87f738c1..b379a6e169 100644 --- a/system/HTTP/Negotiate.php +++ b/system/HTTP/Negotiate.php @@ -33,8 +33,6 @@ class Negotiate /** * Constructor - * - * @param RequestInterface|null $request */ public function __construct(?RequestInterface $request = null) { @@ -46,8 +44,6 @@ class Negotiate /** * Stores the request instance to grab the headers from. * - * @param RequestInterface $request - * * @return $this */ public function setRequest(RequestInterface $request) @@ -65,11 +61,8 @@ class Negotiate * If no match is found, the first, highest-ranking client requested * type is returned. * - * @param array $supported - * @param bool $strictMatch If TRUE, will return an empty string when no match found. - * If FALSE, will return the first supported element. - * - * @return string + * @param bool $strictMatch If TRUE, will return an empty string when no match found. + * If FALSE, will return the first supported element. */ public function media(array $supported, bool $strictMatch = false): string { @@ -83,10 +76,6 @@ class Negotiate * * If no match is found, the first, highest-ranking client requested * type is returned. - * - * @param array $supported - * - * @return string */ public function charset(array $supported): string { @@ -108,10 +97,6 @@ class Negotiate * * If no match is found, the first, highest-ranking client requested * type is returned. - * - * @param array $supported - * - * @return string */ public function encoding(array $supported = []): string { @@ -127,10 +112,6 @@ class Negotiate * * If no match is found, the first, highest-ranking client requested * type is returned. - * - * @param array $supported - * - * @return string */ public function language(array $supported): string { @@ -195,10 +176,6 @@ class Negotiate * Parses an Accept* header into it's multiple values. * * This is based on code from Aura.Accept library. - * - * @param string $header - * - * @return array */ public function parseHeader(string $header): array { @@ -277,12 +254,7 @@ class Negotiate /** * Match-maker * - * @param array $acceptable - * @param string $supported - * @param bool $enforceTypes - * @param bool $matchLocales - * - * @return bool + * @param bool $matchLocales */ protected function match(array $acceptable, string $supported, bool $enforceTypes = false, $matchLocales = false): bool { @@ -313,11 +285,6 @@ class Negotiate /** * Checks two Accept values with matching 'values' to see if their * 'params' are the same. - * - * @param array $acceptable - * @param array $supported - * - * @return bool */ protected function matchParameters(array $acceptable, array $supported): bool { @@ -339,11 +306,6 @@ class Negotiate /** * Compares the types/subtypes of an acceptable Media type and * the supported string. - * - * @param array $acceptable - * @param array $supported - * - * @return bool */ public function matchTypes(array $acceptable, array $supported): bool { @@ -369,11 +331,6 @@ class Negotiate /** * Will match locales against their broader pairs, so that fr-FR would * match a supported localed of fr - * - * @param array $acceptable - * @param array $supported - * - * @return bool */ public function matchLocales(array $acceptable, array $supported): bool { diff --git a/system/HTTP/RedirectResponse.php b/system/HTTP/RedirectResponse.php index 3ff94ce940..54e1ae12f3 100644 --- a/system/HTTP/RedirectResponse.php +++ b/system/HTTP/RedirectResponse.php @@ -24,9 +24,8 @@ class RedirectResponse extends Response * Sets the URI to redirect to and, optionally, the HTTP status code to use. * If no code is provided it will be automatically determined. * - * @param string $uri The URI to redirect to - * @param int|null $code HTTP status code - * @param string $method + * @param string $uri The URI to redirect to + * @param int|null $code HTTP status code * * @return $this */ @@ -45,11 +44,6 @@ class RedirectResponse extends Response * Sets the URI to redirect to but as a reverse-routed or named route * instead of a raw URI. * - * @param string $route - * @param array $params - * @param int $code - * @param string $method - * * @throws HTTPException * * @return $this @@ -71,9 +65,6 @@ class RedirectResponse extends Response * Example: * return redirect()->back(); * - * @param int|null $code - * @param string $method - * * @return $this */ public function back(?int $code = null, string $method = 'auto') @@ -115,7 +106,6 @@ class RedirectResponse extends Response /** * Adds a key and message to the session as Flashdata. * - * @param string $key * @param array|string $message * * @return $this diff --git a/system/HTTP/Request.php b/system/HTTP/Request.php index d6db28d590..6294295db4 100644 --- a/system/HTTP/Request.php +++ b/system/HTTP/Request.php @@ -72,8 +72,6 @@ class Request extends Message implements MessageInterface, RequestInterface * @param string $ip IP Address * @param string $which IP protocol: 'ipv4' or 'ipv6' * - * @return bool - * * @deprecated Use Validation instead * * @codeCoverageIgnore @@ -88,8 +86,6 @@ class Request extends Message implements MessageInterface, RequestInterface * * @param bool $upper Whether to return in upper or lower case. * - * @return string - * * @deprecated The $upper functionality will be removed and this will revert to its PSR-7 equivalent * * @codeCoverageIgnore @@ -102,8 +98,6 @@ class Request extends Message implements MessageInterface, RequestInterface /** * Sets the request method. Used when spoofing the request. * - * @param string $method - * * @return Request * * @deprecated Use withMethod() instead for immutability diff --git a/system/HTTP/RequestInterface.php b/system/HTTP/RequestInterface.php index a1f77b6461..e7bc14a3f3 100644 --- a/system/HTTP/RequestInterface.php +++ b/system/HTTP/RequestInterface.php @@ -34,8 +34,6 @@ interface RequestInterface * @param string $ip IP Address * @param string $which IP protocol: 'ipv4' or 'ipv6' * - * @return bool - * * @deprecated Use Validation instead */ public function isValidIP(string $ip, ?string $which = null): bool; @@ -46,8 +44,6 @@ interface RequestInterface * * @param bool $upper Whether to return in upper or lower case. * - * @return string - * * @deprecated The $upper functionality will be removed and this will revert to its PSR-7 equivalent */ public function getMethod(bool $upper = false): string; diff --git a/system/HTTP/RequestTrait.php b/system/HTTP/RequestTrait.php index 9a6e151997..50444a481a 100644 --- a/system/HTTP/RequestTrait.php +++ b/system/HTTP/RequestTrait.php @@ -186,8 +186,7 @@ trait RequestTrait /** * Allows manually setting the value of PHP global, like $_GET, $_POST, etc. * - * @param string $method - * @param mixed $value + * @param mixed $value * * @return $this */ @@ -303,8 +302,6 @@ trait RequestTrait /** * Saves a copy of the current state of one of several PHP globals * so we can retrieve them later. - * - * @param string $method */ protected function populateGlobals(string $method) { diff --git a/system/HTTP/Response.php b/system/HTTP/Response.php index a96829cc0d..70f31bd35f 100644 --- a/system/HTTP/Response.php +++ b/system/HTTP/Response.php @@ -191,8 +191,6 @@ class Response extends Message implements MessageInterface, ResponseInterface * Note that this is not a part of the interface so * should not be relied on outside of internal testing. * - * @param bool $pretend - * * @return $this */ public function pretend(bool $pretend = true) @@ -224,9 +222,6 @@ class Response extends Message implements MessageInterface, ResponseInterface * * @see http://tools.ietf.org/html/rfc7231#section-6 * @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml - * - * @return string - * * @deprecated Use getReasonPhrase() * * @codeCoverageIgnore diff --git a/system/HTTP/ResponseInterface.php b/system/HTTP/ResponseInterface.php index 92b38c6887..c1d615c515 100644 --- a/system/HTTP/ResponseInterface.php +++ b/system/HTTP/ResponseInterface.php @@ -141,9 +141,6 @@ interface ResponseInterface * * @see http://tools.ietf.org/html/rfc7231#section-6 * @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml - * - * @return string - * * @deprecated Use getReasonPhrase() */ public function getReason(): string; @@ -155,8 +152,6 @@ interface ResponseInterface /** * Sets the date header * - * @param DateTime $date - * * @return ResponseInterface */ public function setDate(DateTime $date); @@ -174,8 +169,6 @@ interface ResponseInterface /** * Set the Link Header * - * @param PagerInterface $pager - * * @see http://tools.ietf.org/html/rfc5988 * * @return Response @@ -188,9 +181,6 @@ interface ResponseInterface * Sets the Content Type header for this response with the mime type * and, optionally, the charset. * - * @param string $mime - * @param string $charset - * * @return ResponseInterface */ public function setContentType(string $mime, string $charset = 'UTF-8'); @@ -203,7 +193,6 @@ interface ResponseInterface * Converts the $body into JSON and sets the Content Type header. * * @param array|string $body - * @param bool $unencoded * * @return $this */ @@ -272,8 +261,6 @@ interface ResponseInterface * - proxy-revalidate * - no-transform * - * @param array $options - * * @return ResponseInterface */ public function setCache(array $options = []); @@ -339,21 +326,12 @@ interface ResponseInterface /** * Checks to see if the Response has a specified cookie or not. - * - * @param string $name - * @param string|null $value - * @param string $prefix - * - * @return bool */ public function hasCookie(string $name, ?string $value = null, string $prefix = ''): bool; /** * Returns the cookie * - * @param string|null $name - * @param string $prefix - * * @return Cookie|Cookie[]|null */ public function getCookie(?string $name = null, string $prefix = ''); @@ -361,11 +339,6 @@ interface ResponseInterface /** * Sets a cookie to be deleted when the response is sent. * - * @param string $name - * @param string $domain - * @param string $path - * @param string $prefix - * * @return $this */ public function deleteCookie(string $name = '', string $domain = '', string $path = '/', string $prefix = ''); @@ -384,9 +357,8 @@ interface ResponseInterface /** * Perform a redirect to a new URL, in two flavors: header or location. * - * @param string $uri The URI to redirect to - * @param string $method - * @param int $code The type of redirection, defaults to 302 + * @param string $uri The URI to redirect to + * @param int $code The type of redirection, defaults to 302 * * @throws HTTPException For invalid status code. * diff --git a/system/HTTP/ResponseTrait.php b/system/HTTP/ResponseTrait.php index 2bb0cac68a..2b1205a5d4 100644 --- a/system/HTTP/ResponseTrait.php +++ b/system/HTTP/ResponseTrait.php @@ -169,8 +169,6 @@ trait ResponseTrait /** * Sets the date header * - * @param DateTime $date - * * @return Response */ public function setDate(DateTime $date) @@ -185,8 +183,6 @@ trait ResponseTrait /** * Set the Link Header * - * @param PagerInterface $pager - * * @see http://tools.ietf.org/html/rfc5988 * * @return Response @@ -220,9 +216,6 @@ trait ResponseTrait * Sets the Content Type header for this response with the mime type * and, optionally, the charset. * - * @param string $mime - * @param string $charset - * * @return Response */ public function setContentType(string $mime, string $charset = 'UTF-8') @@ -242,7 +235,6 @@ trait ResponseTrait * Converts the $body into JSON and sets the Content Type header. * * @param array|string $body - * @param bool $unencoded * * @return $this */ @@ -376,8 +368,6 @@ trait ResponseTrait * - proxy-revalidate * - no-transform * - * @param array $options - * * @return Response */ public function setCache(array $options = []) @@ -499,9 +489,8 @@ trait ResponseTrait /** * Perform a redirect to a new URL, in two flavors: header or location. * - * @param string $uri The URI to redirect to - * @param string $method - * @param int $code The type of redirection, defaults to 302 + * @param string $uri The URI to redirect to + * @param int $code The type of redirection, defaults to 302 * * @throws HTTPException For invalid status code. * @@ -609,12 +598,6 @@ trait ResponseTrait /** * Checks to see if the Response has a specified cookie or not. - * - * @param string $name - * @param string|null $value - * @param string $prefix - * - * @return bool */ public function hasCookie(string $name, ?string $value = null, string $prefix = ''): bool { @@ -626,9 +609,6 @@ trait ResponseTrait /** * Returns the cookie * - * @param string|null $name - * @param string $prefix - * * @return Cookie|Cookie[]|null */ public function getCookie(?string $name = null, string $prefix = '') @@ -651,11 +631,6 @@ trait ResponseTrait /** * Sets a cookie to be deleted when the response is sent. * - * @param string $name - * @param string $domain - * @param string $path - * @param string $prefix - * * @return $this */ public function deleteCookie(string $name = '', string $domain = '', string $path = '/', string $prefix = '') diff --git a/system/HTTP/URI.php b/system/HTTP/URI.php index a0a8675531..f6eec4e80a 100644 --- a/system/HTTP/URI.php +++ b/system/HTTP/URI.php @@ -143,8 +143,6 @@ class URI * @param string $path * @param string $query * @param string $fragment - * - * @return string */ public static function createURIString(?string $scheme = null, ?string $authority = null, ?string $path = null, ?string $query = null, ?string $fragment = null): string { @@ -179,10 +177,6 @@ class URI * * @see http://tools.ietf.org/html/rfc3986#section-5.2.4 * - * @param string $path - * - * @return string - * * @internal */ public static function removeDotSegments(string $path): string @@ -246,8 +240,6 @@ class URI * If $silent == true, then will not throw exceptions and will * attempt to continue gracefully. * - * @param bool $silent - * * @return URI */ public function setSilent(bool $silent = true) @@ -261,8 +253,6 @@ class URI * If $raw == true, then will use parseStr() method * instead of native parse_str() function. * - * @param bool $raw - * * @return URI */ public function useRawQueryString(bool $raw = true) @@ -275,8 +265,6 @@ class URI /** * Sets and overwrites any current URI information. * - * @param string|null $uri - * * @return URI */ public function setURI(?string $uri = null) @@ -335,8 +323,6 @@ class URI * * @see https://tools.ietf.org/html/rfc3986#section-3.2 * - * @param bool $ignorePort - * * @return string The URI authority, in "[user-info@]host[:port]" format. */ public function getAuthority(bool $ignorePort = false): string @@ -397,8 +383,6 @@ class URI * Temporarily sets the URI to show a password in userInfo. Will * reset itself after the first call to authority(). * - * @param bool $val - * * @return URI */ public function showPassword(bool $val = true) @@ -478,10 +462,6 @@ class URI /** * Retrieve the query string - * - * @param array $options - * - * @return string */ public function getQuery(array $options = []): string { @@ -516,8 +496,6 @@ class URI /** * Retrieve a URI fragment - * - * @return string */ public function getFragment(): string { @@ -526,8 +504,6 @@ class URI /** * Returns the segments of the path as an array. - * - * @return array */ public function getSegments(): array { @@ -560,8 +536,7 @@ class URI * Set the value of a specific segment of the URI path. * Allows to set only existing segments or add new one. * - * @param int $number - * @param mixed $value (string or int) + * @param mixed $value (string or int) * * @return $this */ @@ -587,8 +562,6 @@ class URI /** * Returns the total number of segments. - * - * @return int */ public function getTotalSegments(): int { @@ -602,8 +575,6 @@ class URI * assumes URIs with the same host as baseURL should * be relative to the project's configuration. * This aspect of __toString() is deprecated and should be avoided. - * - * @return string */ public function __toString(): string { @@ -642,8 +613,6 @@ class URI /** * Parses the given string and saves the appropriate authority pieces. * - * @param string $str - * * @return $this */ public function setAuthority(string $str) @@ -672,8 +641,6 @@ class URI * * @see https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml * - * @param string $str - * * @return $this */ public function setScheme(string $str) @@ -705,8 +672,6 @@ class URI /** * Sets the host name to use. * - * @param string $str - * * @return $this */ public function setHost(string $str) @@ -745,8 +710,6 @@ class URI /** * Sets the path portion of the URI. * - * @param string $path - * * @return $this */ public function setPath(string $path) @@ -780,8 +743,6 @@ class URI * Sets the query portion of the URI, while attempting * to clean the various parts of the query keys and values. * - * @param string $query - * * @return $this */ public function setQuery(string $query) @@ -812,8 +773,6 @@ class URI * A convenience method to pass an array of items in as the Query * portion of the URI. * - * @param array $query - * * @return URI */ public function setQueryArray(array $query) @@ -826,8 +785,7 @@ class URI /** * Adds a single new element to the query vars. * - * @param string $key - * @param mixed $value + * @param mixed $value * * @return $this */ @@ -884,8 +842,6 @@ class URI * * @see https://tools.ietf.org/html/rfc3986#section-3.5 * - * @param string $string - * * @return $this */ public function setFragment(string $string) @@ -899,10 +855,6 @@ class URI * Encodes any dangerous characters, and removes dot segments. * While dot segments have valid uses according to the spec, * this URI class does not allow them. - * - * @param string|null $path - * - * @return string */ protected function filterPath(?string $path = null): string { @@ -937,8 +889,6 @@ class URI /** * Saves our parts from a parse_url call. - * - * @param array $parts */ protected function applyParts(array $parts) { @@ -990,8 +940,6 @@ class URI * * @see http://tools.ietf.org/html/rfc3986#section-5.2 * - * @param string $uri - * * @return URI */ public function resolveRelativeURI(string $uri) @@ -1052,8 +1000,6 @@ class URI * * @param URI $base * @param URI $reference - * - * @return string */ protected function mergePaths(self $base, self $reference): string { @@ -1076,10 +1022,6 @@ class URI /** * This is equivalent to the native PHP parse_str() function. * This version allows the dot to be used as a key of the query string. - * - * @param string $query - * - * @return array */ protected function parseStr(string $query): array { diff --git a/system/HTTP/UserAgent.php b/system/HTTP/UserAgent.php index 4c85398ae9..89db334b64 100644 --- a/system/HTTP/UserAgent.php +++ b/system/HTTP/UserAgent.php @@ -99,8 +99,6 @@ class UserAgent * Constructor * * Sets the User Agent and runs the compilation routine - * - * @param UserAgents|null $config */ public function __construct(?UserAgents $config = null) { @@ -116,8 +114,6 @@ class UserAgent * Is Browser * * @param string $key - * - * @return bool */ public function isBrowser(?string $key = null): bool { @@ -138,8 +134,6 @@ class UserAgent * Is Robot * * @param string $key - * - * @return bool */ public function isRobot(?string $key = null): bool { @@ -160,8 +154,6 @@ class UserAgent * Is Mobile * * @param string $key - * - * @return bool */ public function isMobile(?string $key = null): bool { @@ -180,8 +172,6 @@ class UserAgent /** * Is this a referral from another site? - * - * @return bool */ public function isReferral(): bool { @@ -201,8 +191,6 @@ class UserAgent /** * Agent String - * - * @return string */ public function getAgentString(): string { @@ -211,8 +199,6 @@ class UserAgent /** * Get Platform - * - * @return string */ public function getPlatform(): string { @@ -221,8 +207,6 @@ class UserAgent /** * Get Browser Name - * - * @return string */ public function getBrowser(): string { @@ -231,8 +215,6 @@ class UserAgent /** * Get the Browser Version - * - * @return string */ public function getVersion(): string { @@ -241,8 +223,6 @@ class UserAgent /** * Get The Robot Name - * - * @return string */ public function getRobot(): string { @@ -251,8 +231,6 @@ class UserAgent /** * Get the Mobile Device - * - * @return string */ public function getMobile(): string { @@ -261,8 +239,6 @@ class UserAgent /** * Get the referrer - * - * @return string */ public function getReferrer(): string { @@ -272,8 +248,6 @@ class UserAgent /** * Parse a custom user-agent string * - * @param string $string - * * @return void */ public function parse(string $string) @@ -313,8 +287,6 @@ class UserAgent /** * Set the Platform - * - * @return bool */ protected function setPlatform(): bool { @@ -335,8 +307,6 @@ class UserAgent /** * Set the Browser - * - * @return bool */ protected function setBrowser(): bool { @@ -358,8 +328,6 @@ class UserAgent /** * Set the Robot - * - * @return bool */ protected function setRobot(): bool { @@ -380,8 +348,6 @@ class UserAgent /** * Set the Mobile Device - * - * @return bool */ protected function setMobile(): bool { @@ -401,8 +367,6 @@ class UserAgent /** * Outputs the original Agent String when cast as a string. - * - * @return string */ public function __toString(): string { diff --git a/system/Helpers/array_helper.php b/system/Helpers/array_helper.php index e144e27833..a06d4bb96c 100644 --- a/system/Helpers/array_helper.php +++ b/system/Helpers/array_helper.php @@ -16,9 +16,6 @@ if (! function_exists('dot_array_search')) { * Searches an array through dot syntax. Supports * wildcard searches, like foo.*.bar * - * @param string $index - * @param array $array - * * @return mixed */ function dot_array_search(string $index, array $array) @@ -40,9 +37,6 @@ if (! function_exists('_array_search_dot')) { * * @internal This should not be used on its own. * - * @param array $indexes - * @param array $array - * * @return mixed */ function _array_search_dot(array $indexes, array $array) @@ -99,7 +93,6 @@ if (! function_exists('array_deep_search')) { * Returns the value of an element at a key in an array of uncertain depth. * * @param mixed $key - * @param array $array * * @return mixed|null */ @@ -144,8 +137,6 @@ if (! function_exists('array_sort_by_multiple_keys')) { * @param array $array the reference of the array to be sorted * @param array $sortColumns an associative array of columns to sort * after and their sorting flags - * - * @return bool */ function array_sort_by_multiple_keys(array &$array, array $sortColumns): bool { diff --git a/system/Helpers/cookie_helper.php b/system/Helpers/cookie_helper.php index c5d582c65c..7eeed052b2 100755 --- a/system/Helpers/cookie_helper.php +++ b/system/Helpers/cookie_helper.php @@ -56,7 +56,6 @@ if (! function_exists('get_cookie')) { * Fetch an item from the $_COOKIE array * * @param string $index - * @param bool $xssClean * * @return mixed * @@ -94,12 +93,6 @@ if (! function_exists('delete_cookie')) { if (! function_exists('has_cookie')) { /** * Checks if a cookie exists by name. - * - * @param string $name - * @param string|null $value - * @param string $prefix - * - * @return bool */ function has_cookie(string $name, ?string $value = null, string $prefix = ''): bool { diff --git a/system/Helpers/date_helper.php b/system/Helpers/date_helper.php index 1312f61103..31fcdfb90a 100644 --- a/system/Helpers/date_helper.php +++ b/system/Helpers/date_helper.php @@ -21,8 +21,6 @@ if (! function_exists('now')) { * @param string $timezone * * @throws Exception - * - * @return int */ function now(?string $timezone = null): int { @@ -51,8 +49,6 @@ if (! function_exists('timezone_select')) { * @param string $country A two-letter ISO 3166-1 compatible country code (for listIdentifiers) * * @throws Exception - * - * @return string */ function timezone_select(string $class = '', string $default = '', int $what = DateTimeZone::ALL, ?string $country = null): string { diff --git a/system/Helpers/filesystem_helper.php b/system/Helpers/filesystem_helper.php index e738305920..52341b848e 100644 --- a/system/Helpers/filesystem_helper.php +++ b/system/Helpers/filesystem_helper.php @@ -23,8 +23,6 @@ if (! function_exists('directory_map')) { * @param int $directoryDepth Depth of directories to traverse * (0 = fully recursive, 1 = current dir, etc) * @param bool $hidden Whether to show hidden files - * - * @return array */ function directory_map(string $sourceDir, int $directoryDepth = 0, bool $hidden = false): array { @@ -66,13 +64,9 @@ if (! function_exists('directory_mirror')) { * Recursively copies the files and directories of the origin directory * into the target directory, i.e. "mirror" its contents. * - * @param string $originDir - * @param string $targetDir - * @param bool $overwrite Whether individual files overwrite on collision + * @param bool $overwrite Whether individual files overwrite on collision * * @throws InvalidArgumentException - * - * @return void */ function directory_mirror(string $originDir, string $targetDir, bool $overwrite = true): void { @@ -115,8 +109,6 @@ if (! function_exists('write_file')) { * @param string $path File path * @param string $data Data to write * @param string $mode fopen() mode (default: 'wb') - * - * @return bool */ function write_file(string $path, string $data, string $mode = 'wb'): bool { @@ -154,8 +146,6 @@ if (! function_exists('delete_files')) { * @param bool $delDir Whether to delete any directories found in the path * @param bool $htdocs Whether to skip deleting .htaccess and index page files * @param bool $hidden Whether to include hidden files (files beginning with a period) - * - * @return bool */ function delete_files(string $path, bool $delDir = false, bool $htdocs = false, bool $hidden = false): bool { @@ -202,8 +192,6 @@ if (! function_exists('get_filenames')) { * @param string $sourceDir Path to source * @param bool|null $includePath Whether to include the path as part of the filename; false for no path, null for a relative path, true for full path * @param bool $hidden Whether to include hidden files (files beginning with a period) - * - * @return array */ function get_filenames(string $sourceDir, ?bool $includePath = false, bool $hidden = false): array { @@ -252,8 +240,6 @@ if (! function_exists('get_dir_file_info')) { * @param string $sourceDir Path to source * @param bool $topLevelOnly Look only at the top level directory specified? * @param bool $recursion Internal variable to determine recursion status - do not use in calls - * - * @return array */ function get_dir_file_info(string $sourceDir, bool $topLevelOnly = true, bool $recursion = false): array { @@ -362,8 +348,6 @@ if (! function_exists('symbolic_permissions')) { * standard symbolic notation representing that value * * @param int $perms Permissions - * - * @return string */ function symbolic_permissions(int $perms): string { @@ -412,8 +396,6 @@ if (! function_exists('octal_permissions')) { * a three character string representing the file's octal permissions * * @param int $perms Permissions - * - * @return string */ function octal_permissions(int $perms): string { @@ -425,9 +407,6 @@ if (! function_exists('same_file')) { /** * Checks if two files both exist and have identical hashes * - * @param string $file1 - * @param string $file2 - * * @return bool Same or not */ function same_file(string $file1, string $file2): bool @@ -440,10 +419,7 @@ if (! function_exists('set_realpath')) { /** * Set Realpath * - * @param string $path - * @param bool $checkExistence Checks to see if the path exists - * - * @return string + * @param bool $checkExistence Checks to see if the path exists */ function set_realpath(string $path, bool $checkExistence = false): string { diff --git a/system/Helpers/form_helper.php b/system/Helpers/form_helper.php index c0c5416931..bb4f6cd806 100644 --- a/system/Helpers/form_helper.php +++ b/system/Helpers/form_helper.php @@ -23,8 +23,6 @@ if (! function_exists('form_open')) { * @param string $action the URI segments of the form destination * @param array|string $attributes a key/value pair of attributes, or string representation * @param array $hidden a key/value pair hidden data - * - * @return string */ function form_open(string $action = '', $attributes = [], array $hidden = []): string { @@ -84,8 +82,6 @@ if (! function_exists('form_open_multipart')) { * @param string $action The URI segments of the form destination * @param array|string $attributes A key/value pair of attributes, or the same as a string * @param array $hidden A key/value pair hidden data - * - * @return string */ function form_open_multipart(string $action = '', $attributes = [], array $hidden = []): string { @@ -106,11 +102,8 @@ if (! function_exists('form_hidden')) { * Generates hidden fields. You can pass a simple key/value string or * an associative array with multiple values. * - * @param array|string $name Field name or associative array to create multiple fields - * @param array|string $value Field value - * @param bool $recursing - * - * @return string + * @param array|string $name Field name or associative array to create multiple fields + * @param array|string $value Field value */ function form_hidden($name, $value = '', bool $recursing = false): string { @@ -146,12 +139,8 @@ if (! function_exists('form_input')) { * Text Input Field. If 'type' is passed in the $type field, it will be * used as the input type, for making 'email', 'phone', etc input fields. * - * @param mixed $data - * @param string $value - * @param mixed $extra - * @param string $type - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_input($data = '', string $value = '', $extra = '', string $type = 'text'): string { @@ -171,11 +160,8 @@ if (! function_exists('form_password')) { * * Identical to the input function but adds the "password" type * - * @param mixed $data - * @param string $value - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_password($data = '', string $value = '', $extra = ''): string { @@ -194,11 +180,8 @@ if (! function_exists('form_upload')) { * * Identical to the input function but adds the "file" type * - * @param mixed $data - * @param string $value - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_upload($data = '', string $value = '', $extra = ''): string { @@ -221,11 +204,8 @@ if (! function_exists('form_textarea')) { /** * Textarea field * - * @param mixed $data - * @param string $value - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_textarea($data = '', string $value = '', $extra = ''): string { @@ -261,11 +241,7 @@ if (! function_exists('form_multiselect')) { * Multi-select menu * * @param mixed $name - * @param array $options - * @param array $selected * @param mixed $extra - * - * @return string */ function form_multiselect($name = '', array $options = [], array $selected = [], $extra = ''): string { @@ -287,8 +263,6 @@ if (! function_exists('form_dropdown')) { * @param mixed $options * @param mixed $selected * @param mixed $extra - * - * @return string */ function form_dropdown($data = '', $options = [], $selected = [], $extra = ''): string { @@ -364,12 +338,8 @@ if (! function_exists('form_checkbox')) { /** * Checkbox Field * - * @param mixed $data - * @param string $value - * @param bool $checked - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_checkbox($data = '', string $value = '', bool $checked = false, $extra = ''): string { @@ -402,12 +372,8 @@ if (! function_exists('form_radio')) { /** * Radio Button * - * @param mixed $data - * @param string $value - * @param bool $checked - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_radio($data = '', string $value = '', bool $checked = false, $extra = ''): string { @@ -424,11 +390,8 @@ if (! function_exists('form_submit')) { /** * Submit Button * - * @param mixed $data - * @param string $value - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_submit($data = '', string $value = '', $extra = ''): string { @@ -440,11 +403,8 @@ if (! function_exists('form_reset')) { /** * Reset Button * - * @param mixed $data - * @param string $value - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_reset($data = '', string $value = '', $extra = ''): string { @@ -456,11 +416,8 @@ if (! function_exists('form_button')) { /** * Form Button * - * @param mixed $data - * @param string $content - * @param mixed $extra - * - * @return string + * @param mixed $data + * @param mixed $extra */ function form_button($data = '', string $content = '', $extra = ''): string { @@ -487,8 +444,6 @@ if (! function_exists('form_label')) { * @param string $labelText The text to appear onscreen * @param string $id The id the label applies to * @param array $attributes Additional attributes - * - * @return string */ function form_label(string $labelText = '', string $id = '', array $attributes = []): string { @@ -515,12 +470,6 @@ if (! function_exists('form_datalist')) { * The element specifies a list of pre-defined options for an element. * Users will see a drop-down list of pre-defined options as they input data. * The list attribute of the element, must refer to the id attribute of the element. - * - * @param string $name - * @param string $value - * @param array $options - * - * @return string */ function form_datalist(string $name, string $value, array $options): string { @@ -552,8 +501,6 @@ if (! function_exists('form_fieldset')) { * * @param string $legendText The legend text * @param array $attributes Additional attributes - * - * @return string */ function form_fieldset(string $legendText = '', array $attributes = []): string { @@ -570,10 +517,6 @@ if (! function_exists('form_fieldset')) { if (! function_exists('form_fieldset_close')) { /** * Fieldset Close Tag - * - * @param string $extra - * - * @return string */ function form_fieldset_close(string $extra = ''): string { @@ -584,10 +527,6 @@ if (! function_exists('form_fieldset_close')) { if (! function_exists('form_close')) { /** * Form Close Tag - * - * @param string $extra - * - * @return string */ function form_close(string $extra = ''): string { @@ -629,12 +568,6 @@ if (! function_exists('set_select')) { * * Let's you set the selected value of a