summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2016-11-05 17:42:32 +0100
committerGitHub <noreply@github.com>2016-11-05 17:42:32 +0100
commit7bfe6ea38deaaef1d2693681a06a07c55dc38c8c (patch)
tree8a3b2eb8518510d2c3b3b3bf2ef8662235369062
parent154fe192d102954434e2d9bac0bcaa3a7b5b4a23 (diff)
downloadfig-standards-7bfe6ea38deaaef1d2693681a06a07c55dc38c8c.zip
fig-standards-7bfe6ea38deaaef1d2693681a06a07c55dc38c8c.tar.gz
fig-standards-7bfe6ea38deaaef1d2693681a06a07c55dc38c8c.tar.bz2
Specify that ContainerInterface::has() takes a string
See https://groups.google.com/d/msg/php-fig/L8rDUwRFsOU/R2f9-TKYCAAJ > Small point: should the has() section in 1.1 say that the entry identifier MUST be a string, similar to how it does so for get()?
-rw-r--r--proposed/container.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/proposed/container.md b/proposed/container.md
index fedb301..723c565 100644
--- a/proposed/container.md
+++ b/proposed/container.md
@@ -32,7 +32,7 @@ Users of dependency injections containers (DIC) are referred to as `user`.
While `ContainerInterface` only defines one mandatory parameter in `get()`, implementations
MAY accept additional optional parameters.
-- `has` takes one unique parameter: an entry identifier. It MUST return `true`
+- `has` takes one unique parameter: an entry identifier. It MUST be a string. It MUST return `true`
if an entry identifier is known to the container and `false` if it is not.
`has($id)` returning true does not mean that `get($id)` will not throw an exception.
It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.