Skip to content

Commit 513b13e

Browse files
committed
Fix codechecker warnings
1 parent 1bef4c7 commit 513b13e

File tree

7 files changed

+1
-15
lines changed

7 files changed

+1
-15
lines changed

classes/componentsupport/base_component.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
namespace filter_imageopt\componentsupport;
2727

28-
defined('MOODLE_INTERNAL') || die;
29-
3028
/**
3129
* The base component class.
3230
*

classes/componentsupport/mod_page.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
*/
2525
namespace filter_imageopt\componentsupport;
2626

27-
defined('MOODLE_INTERNAL') || die;
28-
2927
use filter_imageopt\local;
3028

3129
/**

classes/componentsupport/question.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
*/
2525
namespace filter_imageopt\componentsupport;
2626

27-
defined('MOODLE_INTERNAL') || die;
28-
2927
use filter_imageopt\local;
3028

3129
/**

classes/local.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
*/
2525
namespace filter_imageopt;
2626

27-
defined('MOODLE_INTERNAL') || die();
28-
2927
use stored_file;
3028

3129
/**
@@ -113,7 +111,7 @@ public static function get_optimised_src(\stored_file $file, $originalsrc, $opti
113111
global $CFG;
114112
$classname = '\\filter_imageopt\\componentsupport\\'.$file->get_component();
115113
$optimisedsrc = null;
116-
if (!self::file_is_public($file->get_contenthash()) && class_exists($classname) && method_exists($classname, 'get_optimised_src')) {
114+
if (!self::file_is_public($file->get_contenthash()) && method_exists($classname, 'get_optimised_src')) {
117115
$optimisedsrc = $classname::get_optimised_src($file, $originalsrc);
118116
}
119117
if (empty($optimisedsrc)) {

db/upgrade.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

25-
defined('MOODLE_INTERNAL') || die();
26-
2725
/**
2826
* Filter upgrade function.
2927
*

filter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

25-
defined('MOODLE_INTERNAL') || die();
26-
2725
use filter_imageopt\local;
2826

2927
/**

lib.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
use filter_imageopt\local;
2626

27-
defined('MOODLE_INTERNAL') || die();
28-
2927
/**
3028
* Serves any files associated with the image optimiser filter
3129
*

0 commit comments

Comments
 (0)