@@ -49,7 +49,7 @@ class RedirectRepository extends Repository
4949
5050 /**
5151 * @param string $sourceUriPath
52- * @param string $host Full qualified host name
52+ * @param string|null $host Full qualified host name
5353 * @param boolean $fallback If not redirect found, match a redirect with host value as null
5454 * @return Redirect|null
5555 */
@@ -79,7 +79,7 @@ public function findOneBySourceUriPathAndHost(string $sourceUriPath, ?string $ho
7979
8080 /**
8181 * @param string $targetUriPath
82- * @param string $host Full qualified host name
82+ * @param string|null $host Full qualified host name
8383 * @return Redirect|null
8484 */
8585 public function findOneByTargetUriPathAndHost (string $ targetUriPath , ?string $ host = null ): ?Redirect
@@ -156,14 +156,14 @@ protected function buildQuery(bool $onlyActive = false, ?string $type = null): Q
156156 /**
157157 * Finds all redirects filtered by the parameters and returns an IterableResult
158158 *
159- * @param string $host Fully qualified host name
159+ * @param string|null $host Fully qualified host name
160160 * @param bool $onlyActive Filters redirects which start and end datetime match the current datetime
161161 * @param string|null $type Filters redirects by their type
162- * @param callable $callback
162+ * @param callable|null $callback
163163 * @return \Generator<Redirect>
164164 * @throws \Exception
165165 */
166- public function findAllWithParameters (?string $ host = null , bool $ onlyActive = false , ?string $ type = null , callable $ callback = null ): \Generator
166+ public function findAllWithParameters (?string $ host = null , bool $ onlyActive = false , ?string $ type = null , ? callable $ callback = null ): \Generator
167167 {
168168 $ query = $ this ->buildQuery ($ onlyActive , $ type );
169169
@@ -180,11 +180,11 @@ public function findAllWithParameters(?string $host = null, bool $onlyActive = f
180180 *
181181 * @param bool $onlyActive Filters redirects which start and end datetime match the current datetime
182182 * @param string|null $type Filters redirects by their type
183- * @param callable $callback
183+ * @param callable|null $callback
184184 * @return \Generator<Redirect>
185185 * @throws \Exception
186186 */
187- public function findAllWithoutHost (bool $ onlyActive = false , ?string $ type = null , callable $ callback = null ): \Generator
187+ public function findAllWithoutHost (bool $ onlyActive = false , ?string $ type = null , ? callable $ callback = null ): \Generator
188188 {
189189 $ query = $ this ->buildQuery ($ onlyActive , $ type );
190190 $ query ->andWhere ('r.host IS NULL ' );
@@ -254,10 +254,10 @@ public function incrementHitCount(RedirectInterface $redirect): void
254254 * Iterator over an IterableResult and return a Generator
255255 *
256256 * @param IterableResult $iterator
257- * @param callable $callback
257+ * @param callable|null $callback
258258 * @return \Generator<RedirectDto>
259259 */
260- protected function iterate (IterableResult $ iterator , callable $ callback = null ): \Generator
260+ protected function iterate (IterableResult $ iterator , ? callable $ callback = null ): \Generator
261261 {
262262 $ iteration = 0 ;
263263 foreach ($ iterator as $ object ) {
0 commit comments