Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @deprecated phpdoc #52

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions app/Support/Str/functions/case-converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* Convert a string to "camelCase" format.
*
* @deprecated 1.3, use `Str::toCamelCase` instead.
*/
function camelcased(string $value): string
{
Expand All @@ -24,6 +26,8 @@ function camelcased(string $value): string

/**
* Convert a string to "kebab-case" format.
*
* @deprecated 1.3, use `Str::toKebabCase` instead.
*/
function kebabcased(string $value): string
{
Expand All @@ -40,6 +44,8 @@ function kebabcased(string $value): string

/**
* Convert a string to "snake_case" format.
*
* @deprecated 1.3, use `Str::toSnakeCase` instead.
*/
function snakecased(string $value): string
{
Expand All @@ -56,6 +62,8 @@ function snakecased(string $value): string

/**
* Convert a string to "PascalCase" format.
*
* @deprecated 1.3, use `Str::toPascalCase` instead.
*/
function pascalcased(string $value): string
{
Expand All @@ -72,6 +80,8 @@ function pascalcased(string $value): string

/**
* Convert a string to "Title case" format.
*
* @deprecated 1.3, use `Str::toTitleCase` instead.
*/
function titlecased(string $value): string
{
Expand All @@ -88,6 +98,8 @@ function titlecased(string $value): string

/**
* Convert a string to "lowercased" format.
*
* @deprecated 1.3, use `Str::toLowercase` instead.
*/
function lowercased(string $value): string
{
Expand All @@ -104,6 +116,8 @@ function lowercased(string $value): string

/**
* Convert a string to "UPPERCASE" format.
*
* @deprecated 1.3, use `Str::toUpperCase` instead.
*/
function uppercased(string $value): string
{
Expand All @@ -120,6 +134,8 @@ function uppercased(string $value): string

/**
* Convert a string to "MACRO_CASED" format.
*
* @deprecated 1.3, use `Str::toMacroCase` instead.
*/
function macrocased(string $value): string
{
Expand All @@ -136,6 +152,8 @@ function macrocased(string $value): string

/**
* Convert a string to "COBOL-CASED" format.
*
* @deprecated 1.3, use `Str::toCobolCase` instead.
*/
function cobolcased(string $value): string
{
Expand All @@ -152,6 +170,8 @@ function cobolcased(string $value): string

/**
* Convert a string to "Sentence case" format.
*
* @deprecated 1.3, use `Str::toSentenceCase` instead.
*/
function sentencecased(string $value): string
{
Expand Down
6 changes: 6 additions & 0 deletions app/Support/Str/functions/inflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* Convert a string (word) to its singular form.
*
* @deprecated 1.3, use `Str::toSingular` instead.
*/
function singularize(string $value): string
{
Expand All @@ -24,6 +26,8 @@ function singularize(string $value): string

/**
* Convert a string (word) to its plural form.
*
* @deprecated 1.3, use `Str::toPlural` instead.
*/
function pluralize(string $value): string
{
Expand All @@ -40,6 +44,8 @@ function pluralize(string $value): string

/**
* Convert a string to a URL friendly format.
*
* @deprecated 1.3, use `Str::toSlug` instead.
*/
function slugify(string $value): string
{
Expand Down
13 changes: 13 additions & 0 deletions app/Support/Validator/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*
* @param mixed $value
*
* @deprecated 1.4, use `Val::isEmail` instead.
*
* @phpstan-assert-if-true non-empty-string $value
* @psalm-assert-if-true non-empty-string $value
*/
Expand All @@ -33,6 +35,8 @@ function is_email($value): bool
*
* @param mixed $value
* @param array<int>|null $versions
*
* @deprecated 1.4, use `Val::isEmail` instead.
*/
function is_uuid($value, ?array $versions = null): bool
{
Expand All @@ -50,6 +54,7 @@ function is_uuid($value, ?array $versions = null): bool
/**
* @param mixed ...$value
*
* @deprecated 1.4, use `Val::isBlank` instead.
* @phpstan-assert-if-true ''|array{}|false|null $value
*/
function is_blank(...$value): bool
Expand Down Expand Up @@ -77,6 +82,8 @@ function is_blank(...$value): bool
* @param mixed $value
* @param array<array-key, "http"|"https"|"ftp"|"file"|"git"> $protocols
*
* @deprecated 1.4, use `Val::isURL` instead.
*
* @phpstan-assert-if-true non-empty-string $value
* @psalm-assert-if-true non-empty-string $value
*/
Expand All @@ -96,6 +103,8 @@ function is_url($value, array $protocols = ['http', 'https']): bool
/**
* @param mixed $value
*
* @deprecated 1.4, use `Val::isSemVer` instead.
*
* @phpstan-assert-if-true non-empty-string $value
* @psalm-assert-if-true non-empty-string $value
*/
Expand All @@ -117,6 +126,8 @@ function is_semver($value): bool
*
* @param mixed $value
*
* @deprecated 1.4, use `Val::isIPAddress` instead.
*
* @phpstan-assert-if-true non-empty-string $value
* @psalm-assert-if-true non-empty-string $value
*/
Expand All @@ -142,6 +153,8 @@ function is_ip_address($value): bool
* to be examined for uniqueness.
* Required PHP 8.1 or higher.
*
* @deprecated 1.4, use `Val::isUnique` instead.
*
* @phpstan-assert-if-true non-empty-array $value
* @psalm-assert-if-true non-empty-array $value
*/
Expand Down