Download the PHP package typedduck/steins-attributes without Composer
On this page you can find all versions of the php package typedduck/steins-attributes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download typedduck/steins-attributes
More information about typedduck/steins-attributes
Files in typedduck/steins-attributes
Package steins-attributes
Short Description Effect-envelope attributes for the PHP;STEINS static analyzer: #[Pure] and #[Effect]. Inert at runtime.
License MIT
Homepage https://github.com/rigortype/steins-attributes
Informations about the package steins-attributes
PHP;STEINS Attributes
Effect-envelope attributes for PHP;STEINS, a value-precise static analyzer for PHP. Two classes, both inert at runtime.
An envelope is an upper bound you assert, and Steins reports what it does not
admit. Checking is by prefix, so a declared io admits an inferred
io.net.http. #[Pure] is the empty envelope.
Labels must be plain string literals. A class constant, a concatenation, or a named argument makes the whole attribute unrecognized — no envelope, no checking, silently. Which is why there is no constants class for them.
Known labels: output, output.header; io, io.fs, io.fs.read,
io.fs.write, io.net, io.net.http, io.db, io.ipc, io.process,
io.signal; global.read, global.write; nondet, nondet.random,
nondet.time; mutate, exit, ffi; failure, failure.environment,
failure.input, failure.resource. Anything else is effect.unknown-label.
Write them fully qualified, qualified, or bare under a use import
(use Steins\Pure as P; makes #[P] work). A bare #[Pure] without the
import is not recognized — JetBrains' #[Pure] is a different attribute.
--dev is right, and as a fact rather than a convention: code declaring these
runs with the classes absent entirely, and only newInstance() needs them —
which only a development tool calls. Installing them alone is a fine end state
if you do not want the analyzer; installing the analyzer brings them along.
Copyright
This package is licensed under MIT License.