phpDocumentor/fig-standards — pull request #56 by sun (2014-08-15 16:37:32+00:00)
Title: Add type 'scalar'

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 (https://github.com/phpDocumentor/fig-standards/issues/20#issuecomment-29877395) 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**._