Skip to content

Commit

Permalink
rename $class parameter of autoload function to $class_name
Browse files Browse the repository at this point in the history
  • Loading branch information
stklcode committed Nov 10, 2023
1 parent 8b2b3ca commit 4165353
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions antivirus.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@
/**
* Plugin autoloader.
*
* @param string $class The classname.
* @param string $class_name The classname.
*/
function antivirus_autoload( $class ) {
if ( in_array( $class, array( 'AntiVirus', 'AntiVirus_CheckInternals', 'AntiVirus_SafeBrowsing', 'AntiVirus_ChecksumVerifier' ), true ) ) {
function antivirus_autoload( $class_name ) {
if ( in_array( $class_name, array( 'AntiVirus', 'AntiVirus_CheckInternals', 'AntiVirus_SafeBrowsing', 'AntiVirus_ChecksumVerifier' ), true ) ) {
require_once sprintf(
'%s%s%s%sclass-%s.php',
dirname( __FILE__ ),
DIRECTORY_SEPARATOR,
'inc',
DIRECTORY_SEPARATOR,
strtolower( str_replace( '_', '-', $class ) )
strtolower( str_replace( '_', '-', $class_name ) )
);
}
}
Expand Down

0 comments on commit 4165353

Please sign in to comment.