HH\Shapes::at

Returns the value of the field $index of $shape, throws if the field is missing

public static function at(
  shape() $shape,
  arraykey $index,
);

Use this to access optional fields on shapes.

Parameters

  • shape() $shape
  • arraykey $index