src/ReflectionObject.php
public function withProperty(string $name, $value): self
    {
        return new self(
            $this->object,
            $this->properties->put($name, $value),
            $this->injectionStrategy,
            $this->extractionStrategy
        );
    }
public function withProperty(string $name, $value): self
    {
        return new self(
            $this->object,
            $this->properties->put($name, $value),
            $this->injectionStrategy,
            $this->extractionStrategy
        );
    }
public function withProperty ( string $ name , $ value ) : self { return new self ( $ this -> object , $ this -> properties -> put ( $ name , $ value ) , $ this -> injectionStrategy , $ this -> extractionStrategy ) ; }
Add a property that will be injected

@param mixed  $value
Add a property that will be injected