Code Duplication    Length = 12-12 lines in 3 locations

ext.php 3 locations

@@ 50-61 (lines=12) @@
47
	 * @return mixed Returns false after last step, otherwise temporary state
48
	 * @access public
49
	 */
50
	public function enable_step($old_state)
51
	{
52
		switch ($old_state)
53
		{
54
			case '': // Empty means nothing has run yet
55
				// Enable notifications
56
				return $this->notification_handler('enable', array('skouat.ppde.notification.type.donation_received'));
57
			default:
58
				// Run parent enable step method
59
				return parent::enable_step($old_state);
60
		}
61
	}
62
63
	/**
64
	 * Overwrite disable_step to disable extension notifications before the extension is disabled.
@@ 71-82 (lines=12) @@
68
	 * @return mixed Returns false after last step, otherwise temporary state
69
	 * @access public
70
	 */
71
	public function disable_step($old_state)
72
	{
73
		switch ($old_state)
74
		{
75
			case '': // Empty means nothing has run yet
76
				// Disable notifications
77
				return $this->notification_handler('enable', array('skouat.ppde.notification.type.donation_received'));
78
			default:
79
				// Run parent disable step method
80
				return parent::disable_step($old_state);
81
		}
82
	}
83
84
	/**
85
	 * Overwrite purge_step to purge extension notifications before any included and installed migrations are reverted.
@@ 92-103 (lines=12) @@
89
	 * @return mixed Returns false after last step, otherwise temporary state
90
	 * @access public
91
	 */
92
	public function purge_step($old_state)
93
	{
94
		switch ($old_state)
95
		{
96
			case '': // Empty means nothing has run yet
97
				// Purge notifications
98
				return $this->notification_handler('enable', array('skouat.ppde.notification.type.donation_received'));
99
			default:
100
				// Run parent purge step method
101
				return parent::purge_step($old_state);
102
		}
103
	}
104
105
	/**
106
	 * Notification handler to call notification enable/disable/purge steps