yiisoft / yiisoft/strings

Use more strict parameter type in methods `toOrdinal()` and `normalize()` of `NumericHelper`

Open
#110 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:enhancement
Dominant language
PHP
Stars
49
Forks
18
Avg merge
49m
Merged PRs (30d)
1

Description

This allow remove check type into this methods.

NumericHelper::toOrdinal(float|int|string $value);
NumericHelper::normalize(bool|float|int|string $value);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the NumericHelper::toOrdinal() and NumericHelper::normalize() entry points named in the issue, and inspect their current type checks. Update the signatures as specified, remove the redundant checks, and run the existing project tests to confirm current behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.