From 389c303d9b7c0eac4c82070f9c1a9ddc64a916bb Mon Sep 17 00:00:00 2001 From: LuisParada7 Date: Tue, 7 May 2024 08:21:08 -0500 Subject: [PATCH 1/4] Fix File must end with a newline character --- block_snapfeeds.php | 2 +- classes/api/block_replacer.php | 2 +- classes/event_handlers.php | 2 +- classes/privacy/provider.php | 2 +- cli/replace_block_instances.php | 2 +- db/events.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block_snapfeeds.php b/block_snapfeeds.php index 44a9b25..46ef609 100644 --- a/block_snapfeeds.php +++ b/block_snapfeeds.php @@ -112,4 +112,4 @@ public function get_content() { return $this->content; } -} \ No newline at end of file +} diff --git a/classes/api/block_replacer.php b/classes/api/block_replacer.php index dc8039d..2dbca06 100644 --- a/classes/api/block_replacer.php +++ b/classes/api/block_replacer.php @@ -118,4 +118,4 @@ public function replace_snap_feeds_deadlines_with_upcoming_events($parentcontext ]; $this->replace_block('calendar_upcoming', 'snapfeeds', null, $config, $parentcontextid); } -} \ No newline at end of file +} diff --git a/classes/event_handlers.php b/classes/event_handlers.php index 72c812e..a6ae00b 100644 --- a/classes/event_handlers.php +++ b/classes/event_handlers.php @@ -47,4 +47,4 @@ public static function review_course(base $event) { } block_replacer::get_instance()->replace_upcoming_events_with_snap_feeds_deadlines($event->contextid); } -} \ No newline at end of file +} diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 2665ced..ced019f 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -43,4 +43,4 @@ class provider implements \core_privacy\local\metadata\null_provider { public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/cli/replace_block_instances.php b/cli/replace_block_instances.php index 6773ce5..13804e9 100644 --- a/cli/replace_block_instances.php +++ b/cli/replace_block_instances.php @@ -109,4 +109,4 @@ } cli_writeln("[INFO] Replacement done."); -exit(0); \ No newline at end of file +exit(0); diff --git a/db/events.php b/db/events.php index 992f38f..e6ff794 100644 --- a/db/events.php +++ b/db/events.php @@ -37,4 +37,4 @@ 'eventname' => \core\event\course_restored::class, 'callback' => '\block_snapfeeds\event_handlers::review_course', ], -]; \ No newline at end of file +]; From 89c0694f5b274a8a316f7c8f0bb879c57469b1cd Mon Sep 17 00:00:00 2001 From: LuisParada7 Date: Tue, 7 May 2024 08:23:11 -0500 Subject: [PATCH 2/4] Fix should be a comma after the last array --- version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.php b/version.php index 8638a01..f081b2c 100644 --- a/version.php +++ b/version.php @@ -30,5 +30,5 @@ $plugin->maturity = MATURITY_STABLE; $plugin->component = 'block_snapfeeds'; $plugin->dependencies = [ - 'theme_snap' => '2024040200' + 'theme_snap' => '2024040200', ]; From 55031491a0e44e2addb9273a9df43ac85653c28b Mon Sep 17 00:00:00 2001 From: LuisParada7 Date: Tue, 7 May 2024 08:26:50 -0500 Subject: [PATCH 3/4] Fix There must not be a space before the colon --- classes/api/block_replacer.php | 2 +- classes/privacy/provider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/api/block_replacer.php b/classes/api/block_replacer.php index 2dbca06..a4cde82 100644 --- a/classes/api/block_replacer.php +++ b/classes/api/block_replacer.php @@ -49,7 +49,7 @@ private function __construct() { * Singleton instance getter. * @return block_replacer */ - public static function get_instance() : block_replacer { + public static function get_instance(): block_replacer { if (self::$instance == null) { self::$instance = new block_replacer(); } diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index ced019f..a0a6f4f 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider { * * @return string */ - public static function get_reason() : string { + public static function get_reason(): string { return 'privacy:metadata'; } } From 0debc0c52f2bc7700e717737a2a97462a2169532 Mon Sep 17 00:00:00 2001 From: LuisParada7 Date: Tue, 7 May 2024 14:18:15 -0500 Subject: [PATCH 4/4] Fix No space found before comment text --- tests/replace_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/replace_test.php b/tests/replace_test.php index 070655c..6866927 100644 --- a/tests/replace_test.php +++ b/tests/replace_test.php @@ -1,5 +1,5 @@