* Dear God Why Do I Have To Write This (Dumb SQL Builder)
*
* Usage:
- * @code
+ * ```
* $del = CRM_Utils_SQL_Delete::from('civicrm_activity act')
* ->where('activity_type_id = #type', array('type' => 234))
* ->where('status_id IN (#statuses)', array('statuses' => array(1,2,3))
* 'value' => $form['foo']
* ))
* echo $del->toSQL();
- * @endcode
+ * ```
*
* Design principles:
* - Portable
* xor output. The notations for input and output interpolation are a bit different,
* and they may not be mixed.
*
- * @code
+ * ```
* // Interpolate on input. Set params when using them.
* $select->where('activity_type_id = #type', array(
* 'type' => 234,
* $select
* ->where('activity_type_id = #type')
* ->param('type', 234),
- * @endcode
+ * ```
*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
*/
public function __construct($from, $options = []) {
$this->from = $from;
- $this->mode = isset($options['mode']) ? $options['mode'] : self::INTERPOLATE_AUTO;
+ $this->mode = $options['mode'] ?? self::INTERPOLATE_AUTO;
}
/**