Skip to content

Commit

Permalink
docs: fix or remove @param
Browse files Browse the repository at this point in the history
php-cs-fixer has been modified to remove these tags.
  • Loading branch information
kenjis committed Aug 30, 2023
1 parent defd761 commit f34580d
Show file tree
Hide file tree
Showing 23 changed files with 11 additions and 59 deletions.
2 changes: 1 addition & 1 deletion system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static function init()
* Named options must be in the following formats:
* php index.php user -v --v -name=John --name=John
*
* @param string $prefix
* @param string $prefix You may specify a string with which to prompt the user.
*/
public static function input(?string $prefix = null): string
{
Expand Down
2 changes: 1 addition & 1 deletion system/Config/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ public static function toolbar(?ToolbarConfig $config = null, bool $getShared =
/**
* The URI class provides a way to model and manipulate URIs.
*
* @param string $uri
* @param string|null $uri The URI string
*
* @return URI The current URI if $uri is null.
*/
Expand Down
1 change: 0 additions & 1 deletion system/Database/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ public function where($key, $value = null, ?bool $escape = null)
*
* @param array|RawSql|string $key
* @param mixed $value
* @param bool $escape
*
* @return $this
*/
Expand Down
4 changes: 0 additions & 4 deletions system/Database/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ abstract class Migration

/**
* Constructor.
*
* @param Forge $forge
*/
public function __construct(?Forge $forge = null)
{
Expand All @@ -53,8 +51,6 @@ public function __construct(?Forge $forge = null)

/**
* Returns the database group name this migration uses.
*
* @return string
*/
public function getDBGroup(): ?string
{
Expand Down
2 changes: 0 additions & 2 deletions system/Database/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ public function getQuery(): string
* for it's start and end values. If no end value is present, will
* use the current time to determine total duration.
*
* @param float $end
*
* @return $this
*/
public function setDuration(float $start, ?float $end = null)
Expand Down
3 changes: 0 additions & 3 deletions system/Debug/Toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ protected function roundTo(float $number, int $increments = 5): float
/**
* Prepare for debugging..
*
* @param RequestInterface $request
* @param ResponseInterface $response
*
* @return void
*/
public function prepare(?RequestInterface $request = null, ?ResponseInterface $response = null)
Expand Down
2 changes: 0 additions & 2 deletions system/Encryption/Exceptions/EncryptionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public static function forNoHandlerAvailable(string $handler)
/**
* Thrown when the handler requested is unknown.
*
* @param string $driver
*
* @return static
*/
public static function forUnKnownHandler(?string $driver = null)
Expand Down
2 changes: 1 addition & 1 deletion system/Entity/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function __construct(?array $data = null)
* properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
* @param array<string, array|bool|float|int|object|string|null> $data
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion system/Format/Exceptions/FormatException.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static function forInvalidFormatter(string $class)
* Thrown in JSONFormatter when the json_encode produces
* an error code other than JSON_ERROR_NONE and JSON_ERROR_RECURSION.
*
* @param string $error
* @param string $error The error message
*
* @return static
*/
Expand Down
2 changes: 0 additions & 2 deletions system/HTTP/URI.php
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,6 @@ public function setHost(string $str)
/**
* Sets the port portion of the URI.
*
* @param int $port
*
* @return $this
*
* @TODO PSR-7: Should be `withPort($port)`.
Expand Down
6 changes: 0 additions & 6 deletions system/HTTP/UserAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ public function __construct(?UserAgents $config = null)

/**
* Is Browser
*
* @param string $key
*/
public function isBrowser(?string $key = null): bool
{
Expand All @@ -132,8 +130,6 @@ public function isBrowser(?string $key = null): bool

/**
* Is Robot
*
* @param string $key
*/
public function isRobot(?string $key = null): bool
{
Expand All @@ -152,8 +148,6 @@ public function isRobot(?string $key = null): bool

/**
* Is Mobile
*
* @param string $key
*/
public function isMobile(?string $key = null): bool
{
Expand Down
2 changes: 0 additions & 2 deletions system/Images/Handlers/BaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,6 @@ public function getEXIF(?string $key = null, bool $silent = false)
* - bottom
* - bottom-right
*
* @param int $height
*
* @return BaseHandler
*/
public function fit(int $width, ?int $height = null, string $position = 'center')
Expand Down
2 changes: 1 addition & 1 deletion system/Images/ImageHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function text(string $text, array $options = []);
* $image->resize(100, 200, true)
* ->save($target);
*
* @param string $target
* @param string|null $target The path to save the file to.
*
* @return bool
*/
Expand Down
2 changes: 0 additions & 2 deletions system/Log/Handlers/ChromeLoggerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ protected function format($object)
/**
* Attaches the header and the content to the passed in request object.
*
* @param ResponseInterface $response
*
* @return void
*/
public function sendLogs(?ResponseInterface &$response = null)
Expand Down
2 changes: 0 additions & 2 deletions system/Pager/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ public function only(array $queries): self
/**
* Ensures that an array exists for the group specified.
*
* @param int $perPage
*
* @return void
*/
protected function ensureGroup(string $group, ?int $perPage = null)
Expand Down
7 changes: 4 additions & 3 deletions system/Router/RouteCollectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ interface RouteCollectionInterface
/**
* Adds a single route to the collection.
*
* @param array|Closure|string $to
* @param array $options
* @param string $from The route path (with placeholders or regex)
* @param array|Closure|string $to The route handler
* @param array|null $options The route options
*
* @return RouteCollectionInterface
*/
Expand All @@ -44,7 +45,7 @@ public function add(string $from, $to, ?array $options = null);
* multiple placeholders added at once.
*
* @param array|string $placeholder
* @param string $pattern
* @param string|null $pattern The regex pattern
*
* @return RouteCollectionInterface
*/
Expand Down
5 changes: 0 additions & 5 deletions system/Test/DOMParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ public function withFile(string $path)

/**
* Checks to see if the text is found within the result.
*
* @param string $search
* @param string $element
*/
public function see(?string $search = null, ?string $element = null): bool
{
Expand All @@ -121,8 +118,6 @@ public function see(?string $search = null, ?string $element = null): bool

/**
* Checks to see if the text is NOT found within the result.
*
* @param string $search
*/
public function dontSee(?string $search = null, ?string $element = null): bool
{
Expand Down
2 changes: 0 additions & 2 deletions system/Test/FeatureTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class FeatureTestCase extends CIUnitTestCase
* ['get', 'home', 'Home::index']
* ]
*
* @param array $routes
*
* @return $this
*/
protected function withRoutes(?array $routes = null)
Expand Down
2 changes: 1 addition & 1 deletion system/Test/FeatureTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ trait FeatureTestTrait
* ['get', 'home', 'Home::index']
* ]
*
* @param array $routes
* @param array|null $routes Array to set routes
*
* @return $this
*/
Expand Down
2 changes: 0 additions & 2 deletions system/Validation/CreditCardRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,6 @@ public function valid_cc_number(?string $ccNumber, string $type): bool

/**
* Checks the given number to see if the number passing a Luhn check.
*
* @param string $number
*/
protected function isValidLuhn(?string $number = null): bool
{
Expand Down
10 changes: 0 additions & 10 deletions system/Validation/FormatRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ public function regex_match(?string $str, string $pattern): bool
* timezone_identifiers_list function.
*
* @see http://php.net/manual/en/datetimezone.listidentifiers.php
*
* @param string $str
*/
public function timezone(?string $str = null): bool
{
Expand All @@ -189,8 +187,6 @@ public function timezone(?string $str = null): bool
*
* Tests a string for characters outside of the Base64 alphabet
* as defined by RFC 2045 http://www.faqs.org/rfcs/rfc2045
*
* @param string $str
*/
public function valid_base64(?string $str = null): bool
{
Expand All @@ -203,8 +199,6 @@ public function valid_base64(?string $str = null): bool

/**
* Valid JSON
*
* @param string $str
*/
public function valid_json(?string $str = null): bool
{
Expand All @@ -215,8 +209,6 @@ public function valid_json(?string $str = null): bool

/**
* Checks for a correctly formatted email address
*
* @param string $str
*/
public function valid_email(?string $str = null): bool
{
Expand All @@ -233,8 +225,6 @@ public function valid_email(?string $str = null): bool
*
* Example:
* valid_emails[[email protected],[email protected]]
*
* @param string $str
*/
public function valid_emails(?string $str = null): bool
{
Expand Down
4 changes: 0 additions & 4 deletions system/Validation/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ public function min_length(?string $str, string $val): bool

/**
* Does not equal the static value provided.
*
* @param string $str
*/
public function not_equals(?string $str, string $val): bool
{
Expand All @@ -214,8 +212,6 @@ public function not_equals(?string $str, string $val): bool

/**
* Value should not be within an array of values.
*
* @param string $value
*/
public function not_in_list(?string $value, string $list): bool
{
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/Config/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Services extends BaseServices
/**
* The URI class provides a way to model and manipulate URIs.
*
* @param string $uri
* @param string|null $uri The URI string
*
* @return URI
*/
Expand Down

0 comments on commit f34580d

Please sign in to comment.