This attribute is the equivalent of the @pure
annotation for class methods and functions.
The attribute accepts no arguments.
<?php
use PhpStaticAnalysis\Attributes\Pure;
class PureExample
{
#[Pure] // this function is pure
public static function add(int $left, int $right) : int
{
return $left + $right;
}
...
}