src/Metadata.php
public function set($key, $value)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('$key must be string');
        }

        if (!is_string($value) && !is_numeric($value) && !is_bool($value)) {
            throw new \InvalidArgumentException('$value must be string, int or bool');
        }

        $this->annotations[] = [
            'key' => $key,
            'value' => (string) $value
        ];
    }
public function set($key, $value)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException('$key must be string');
        }

        if (!is_string($value) && !is_numeric($value) && !is_bool($value)) {
            throw new \InvalidArgumentException('$value must be string, int or bool');
        }

        $this->annotations[] = [
            'key' => $key,
            'value' => (string) $value
        ];
    }
public function set ( $ key , $ value ) { if ( ! is_string ( $ key ) ) { throw new \ InvalidArgumentException ( '$key must be string' ) ; } if ( ! is_string ( $ value ) && ! is_numeric ( $ value ) && ! is_bool ( $ value ) ) { throw new \ InvalidArgumentException ( '$value must be string, int or bool' ) ; } $ this -> annotations [ ] = [ 'key' => $ key , 'value' => ( string ) $ value ] ; }
Set meta annotation

@param $key string
@param $value string|int|float|bool

@throws \InvalidArgumentException
Set meta annotation