Skip to content

Commit

Permalink
although having return types is pretty we will remove them for mixed …
Browse files Browse the repository at this point in the history
…until 7.4 finally drops'
  • Loading branch information
NinaHerrmann committed Jun 4, 2024
1 parent e488a6e commit e3c5c53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class filter_opencast extends moodle_text_filter {
* @param string $attributecontentregex Regex of what the content of the attribute might be.
* @return string|null The content of the attribute or null, if it doesn't exist.
*/
private static function get_attribute(string $tag, string $attributename, string $attributecontentregex = '.*'): string|null {
private static function get_attribute(string $tag, string $attributename, string $attributecontentregex = '.*') {
$pattern = "/$attributename=(['\"])($attributecontentregex)\\1/";
preg_match($pattern, $tag, $matches);
return $matches[2] ?? null;
Expand All @@ -54,7 +54,7 @@ private static function get_attribute(string $tag, string $attributename, string
* @param array $episodeurls array of [ocinstanceid, episoderegex, baseurl].
* @return array|null [ocinstanceid, episodeid] or null if there are no matches.
*/
private static function test_url(string $url, array $episodeurls) : array|null {
private static function test_url(string $url, array $episodeurls) {
foreach ($episodeurls as [$ocinstanceid, $episoderegex, $baseurl]) {
if (preg_match_all($episoderegex, $url, $matches)) {
return [$ocinstanceid, $matches[1][0]];
Expand Down

0 comments on commit e3c5c53

Please sign in to comment.