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 type 'scalar' #56

Closed
wants to merge 1 commit into from
Closed

Add type 'scalar' #56

wants to merge 1 commit into from

Conversation

sun
Copy link

@sun sun commented Aug 15, 2014

Resolves #20 — The trumping argument:

PHP function Alias PHPDoc type(s)
is_array() array
is_bool() bool, boolean
is_callable() callable
is_double() is_float() double
is_float() float
is_int() int, integer
is_integer() is_int() int, integer
is_long() is_int() int, integer
is_null() null
is_object() object
is_real() is_float() float
is_resource() resource
is_scalar()
is_string() string
mixed

(Original analysis by @ThomasWeinert.)

A poll/vote on this proposal (#20 (comment)) resulted in 46% support for it; i.e., roughly 50/50.

Since (1) there are legit use-cases, (2) this is a super-trivial addition to the spec, and (3) no one is harmed by including it (you don't have to use it), let's stop to debate such a minor thing, simply include it, and move on to more complex topics to get PSR-5 done, please.


Note: is_numeric() is intentionally ignored and not the the topic of this PR, because it validates the content, not the type. All discussion on is_numeric() belongs into #42, not here.

@sun sun mentioned this pull request Aug 15, 2014
@mvriel
Copy link
Member

mvriel commented Aug 15, 2014

This change is still being discussed in #20

@mvriel
Copy link
Member

mvriel commented Dec 9, 2014

Rejected this improvement, see #20 for more information

@mvriel mvriel closed this Dec 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pseudo type: scalar
2 participants