projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #17753 from demeritcowboy/unused-gencode
[civicrm-core.git]
/
Civi
/
Core
/
CiviEventInspector.php
diff --git
a/Civi/Core/CiviEventInspector.php
b/Civi/Core/CiviEventInspector.php
index ad260c099c32b6bcfcf9b392de78ab8d050e342b..34514f9bf750dffa23203502a5133a5a22e6d0ed 100644
(file)
--- 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.
*
* 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()));
* $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'
*
* 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) {
* @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';
if (!isset($eventDef['type'])) {
$eventDef['type'] = preg_match('/^hook_/', $eventDef['name']) ? 'hook' : 'object';