booleanUtils = $booleanUtils; } /** * Compute and return effective value of an argument * * @param array $data * @return mixed * @throws \InvalidArgumentException * @throws \UnexpectedValueException */ public function evaluate(array $data) { $result = ['instance' => $data['value']]; if (isset($data['shared'])) { $result['shared'] = $this->booleanUtils->toBoolean($data['shared']); } return $result; } }