src/MediaTrait.php
private function parseOptions() {
    $default_options = [
      'alt' => NULL,
      'title' => NULL,
      'name' => NULL,
      'weight' => NULL,
    ];

    $this->options += $default_options;

    $this->options = (object) $this->options;
  }
private function parseOptions() {
    $default_options = [
      'alt' => NULL,
      'title' => NULL,
      'name' => NULL,
      'weight' => NULL,
    ];

    $this->options += $default_options;

    $this->options = (object) $this->options;
  }
Parse the optional arguments and merge them with the defaults