@@ -32,6 +32,8 @@ public function __construct(
32
32
}
33
33
34
34
/**
35
+ * @param GitHubUrlData|GitHubUrlData[] $urlData
36
+ *
35
37
* @return array<int, GitHubIssue|GitHubPullRequest>
36
38
*
37
39
* @throws HttpClientException
@@ -78,9 +80,9 @@ public function getGitHubDataFromUrl(GitHubUrlData|array $urlData, string $owner
78
80
return $ match ;
79
81
});
80
82
81
- if (null === $ result ) {
82
- continue ;
83
- }
83
+ // if (null === $result) {
84
+ // continue;
85
+ // }
84
86
85
87
$ objects [] = new GitHubPullRequest (
86
88
uri: $ result ->uri ,
@@ -99,9 +101,9 @@ public function getGitHubDataFromUrl(GitHubUrlData|array $urlData, string $owner
99
101
return $ match ;
100
102
});
101
103
102
- if (null === $ result ) {
103
- continue ;
104
- }
104
+ // if (null === $result) {
105
+ // continue;
106
+ // }
105
107
106
108
$ objects [] = new GitHubIssue (
107
109
uri: $ result ->uri ,
@@ -161,13 +163,23 @@ private function createQueryContent(array $urls): string
161
163
]);
162
164
}
163
165
166
+ /**
167
+ * @param string $templatePath The absolute path to the template with filename and extension
168
+ * @param array<string, mixed> $parameters array of variables used in the template
169
+ * where the "key" is the variable name and the "value" is the value of the variable
170
+ * in the template
171
+ */
164
172
private function getTemplate (string $ templatePath , array $ parameters ): string
165
173
{
166
174
ob_start ();
167
175
extract ($ parameters , \EXTR_SKIP );
168
176
include $ templatePath ;
169
177
170
- return ob_get_clean ();
178
+ if (false === $ template = ob_get_clean ()) {
179
+ throw new \RuntimeException ('Ooops! somethign went wrong trying to generate the template. ' );
180
+ }
181
+
182
+ return $ template ;
171
183
}
172
184
173
185
/**
0 commit comments