Skip to content

Commit

Permalink
No underscores in class names
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Feb 19, 2017
1 parent d4a547f commit db5cd78
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions classes/Event/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

namespace Required\Digest\Event;

use Required\Digest\Message\Comment_Moderation;
use Required\Digest\Message\Comment_Notification;
use Required\Digest\Message\Core_Update;
use Required\Digest\Message\Password_Change_Notification;
use Required\Digest\Message\User_Notification;
use Required\Digest\Message\CommentModeration;
use Required\Digest\Message\CommentNotification;
use Required\Digest\Message\CoreUpdate;
use Required\Digest\Message\PasswordChangeNotification;
use Required\Digest\Message\UserNotification;

/**
* Event registry.
Expand Down Expand Up @@ -89,7 +89,7 @@ public function get_registered_events() {
public function register_default_events() {
// Register default events.
$this->register_event( 'core_update_success', function ( $content, $entries, $user, $event ) {
$message = new Core_Update( $entries, $user, $event );
$message = new CoreUpdate( $entries, $user, $event );

if ( '' === $content ) {
$content = '<p><b>' . __( 'Core Updates', 'digest' ) . '</b></p>';
Expand All @@ -99,7 +99,7 @@ public function register_default_events() {
} );

$this->register_event( 'core_update_failure', function ( $content, $entries, $user, $event ) {
$message = new Core_Update( $entries, $user, $event );
$message = new CoreUpdate( $entries, $user, $event );

if ( '' === $content ) {
$content = '<p><b>' . __( 'Core Updates', 'digest' ) . '</b></p>';
Expand All @@ -109,28 +109,28 @@ public function register_default_events() {
} );

$this->register_event( 'comment_moderation', function ( $content, $entries, $user ) {
$message = new Comment_Moderation( $entries, $user );
$message = new CommentModeration( $entries, $user );

return $content . $message->get_message();
} );

$this->register_event( 'comment_notification', function ( $content, $entries, $user ) {
$message = new Comment_Notification( $entries, $user );
$message = new CommentNotification( $entries, $user );

return $content . $message->get_message();
} );

if ( in_array( 'new_user_notification', get_option( 'digest_hooks' ), true ) ) {
$this->register_event( 'new_user_notification', function ( $content, $entries, $user ) {
$message = new User_Notification( $entries, $user );
$message = new UserNotification( $entries, $user );

return $content . $message->get_message();
} );
}

if ( in_array( 'password_change_notification', get_option( 'digest_hooks' ), true ) ) {
$this->register_event( 'password_change_notification', function ( $content, $entries, $user ) {
$message = new Password_Change_Notification( $entries, $user );
$message = new PasswordChangeNotification( $entries, $user );

return $content . $message->get_message();
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* @since 2.0.0
*/
class Comment_Moderation extends Section {
class CommentModeration extends Section {
/**
* Constructor.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* Responsible for creating the comment notification section
*/
class Comment_Notification extends Comment_Moderation {
class CommentNotification extends CommentModeration {
/**
* Constructor.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Responsible for creating the core update section
*/
class Core_Update extends Section {
class CoreUpdate extends Section {
/**
* The comment moderation entries.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Password_Change_Notification class.
* PasswordChangeNotification class.
*
* @package Digest
*/
Expand All @@ -16,7 +16,7 @@
*
* @since 2.0.0
*/
class Password_Change_Notification extends Section {
class PasswordChangeNotification extends Section {
/**
* Constructor.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* User_Notification class.
* UserNotification class.
*
* @package Digest
*/
Expand All @@ -16,7 +16,7 @@
*
* @since 2.0.0
*/
class User_Notification extends Section {
class UserNotification extends Section {
/**
* Constructor.
*
Expand Down

0 comments on commit db5cd78

Please sign in to comment.