X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FCore%2FCiviEventInspector.php;h=34514f9bf750dffa23203502a5133a5a22e6d0ed;hb=a4934764e309b794d091a3a1448a36b6fe1367e8;hp=ad260c099c32b6bcfcf9b392de78ab8d050e342b;hpb=085d8bc50399130290953d45b146ce0f48a6cf1a;p=civicrm-core.git diff --git a/Civi/Core/CiviEventInspector.php b/Civi/Core/CiviEventInspector.php index ad260c099c..34514f9bf7 100644 --- a/Civi/Core/CiviEventInspector.php +++ b/Civi/Core/CiviEventInspector.php @@ -7,10 +7,10 @@ namespace Civi\Core; * The event inspector is a development tool which provides metadata about events. * It can be used for code-generators and documentation-generators. * - * @code + * ``` * $i = new CiviEventInspector(); * print_r(CRM_Utils_Array::collect('name', $i->getAll())); - * @endCode + * ``` * * An event definition includes these fields: * - type: string, required. Ex: 'hook' or 'object' @@ -133,7 +133,7 @@ class CiviEventInspector { * @return CiviEventInspector */ public function add($eventDef) { - $name = isset($eventDef['name']) ? $eventDef['name'] : NULL; + $name = $eventDef['name'] ?? NULL; if (!isset($eventDef['type'])) { $eventDef['type'] = preg_match('/^hook_/', $eventDef['name']) ? 'hook' : 'object';