@@ -32,6 +32,8 @@ public function __construct(
3232 }
3333
3434 /**
35+ * @param GitHubUrlData|GitHubUrlData[] $urlData
36+ *
3537 * @return array<int, GitHubIssue|GitHubPullRequest>
3638 *
3739 * @throws HttpClientException
@@ -78,9 +80,9 @@ public function getGitHubDataFromUrl(GitHubUrlData|array $urlData, string $owner
7880 return $ match ;
7981 });
8082
81- if (null === $ result ) {
82- continue ;
83- }
83+ // if (null === $result) {
84+ // continue;
85+ // }
8486
8587 $ objects [] = new GitHubPullRequest (
8688 uri: $ result ->uri ,
@@ -99,9 +101,9 @@ public function getGitHubDataFromUrl(GitHubUrlData|array $urlData, string $owner
99101 return $ match ;
100102 });
101103
102- if (null === $ result ) {
103- continue ;
104- }
104+ // if (null === $result) {
105+ // continue;
106+ // }
105107
106108 $ objects [] = new GitHubIssue (
107109 uri: $ result ->uri ,
@@ -161,13 +163,23 @@ private function createQueryContent(array $urls): string
161163 ]);
162164 }
163165
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+ */
164172 private function getTemplate (string $ templatePath , array $ parameters ): string
165173 {
166174 ob_start ();
167175 extract ($ parameters , \EXTR_SKIP );
168176 include $ templatePath ;
169177
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 ;
171183 }
172184
173185 /**
0 commit comments