Apply a horizontal or vertical flip (mirror effect).

Horizontal flip

$layer->flip('horizontal');

Vertical flip

$layer->flip('vertical');