We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c5293f7 + a7f91c9 commit 6eadacfCopy full SHA for 6eadacf
1 file changed
graph.php
@@ -10,15 +10,14 @@
10
<h2>Navigation</h2>
11
<?php
12
include_once "data.php";
13
-function hasElementChildren($element) {
14
- $hasContent = false;
15
- foreach ($element as $activityName => $content) {
16
- if (!array_key_exists("dependsOn", $content)) {
17
- continue;
18
- }
19
- $hasContent = true;
+
+/** Return true if has dependsOn. */
+function hasElementChildren($activities) {
+ foreach ($activities as $activityName => $activity) {
+ if ($activity["dependsOn"] ?? null)
+ return true;
20
}
21
- return $hasContent;
+ return false;
22
23
24
foreach ($dimensions as $dimension => $subdimensions) {
@@ -211,4 +210,4 @@ function transform(d) {
211
210
212
213
214
-?>
+?>
0 commit comments