-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #342 from catalyst/fixup-ci-and-codingstandards
cleanup: fixup to match coding standards
- Loading branch information
Showing
35 changed files
with
40 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* calendar class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\calendar; | ||
|
||
use auth_outage\local\outage; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,18 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* outagedb class. | ||
* | ||
* The DB Context to manipulate Outages. | ||
* It will also commit changes to the calendar as you change outages. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\dml; | ||
|
||
use auth_outage\calendar\calendar; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Toutage_created class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\event; | ||
|
||
use core\event\base; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,14 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* outage_deleted class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace auth_outage\event; | ||
|
||
use core\event\base; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* outage_updated class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\event; | ||
|
||
use core\event\base; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,23 +14,11 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* delete class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\form\outage; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
require_once($CFG->libdir.'/formslib.php'); | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
/** | ||
* delete class. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* edit class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\form\outage; | ||
|
||
use auth_outage\local\outage; | ||
|
@@ -166,7 +157,7 @@ public function set_data($outage) { | |
if (array_key_exists('auth_outage', $CFG->forced_plugin_settings) | ||
&& array_key_exists('default_autostart', $CFG->forced_plugin_settings['auth_outage'])) { | ||
$this->_form->setDefaults([ | ||
'autostart' => $CFG->forced_plugin_settings['auth_outage']['default_autostart'] | ||
'autostart' => $CFG->forced_plugin_settings['auth_outage']['default_autostart'], | ||
]); | ||
$mform->freeze('autostart'); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* finish class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\form\outage; | ||
|
||
use moodleform; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* cli_exception class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\cli; | ||
|
||
use Exception; | ||
|
@@ -85,9 +76,9 @@ class cli_exception extends Exception { | |
* cliexception constructor. | ||
* @param string $message An explanation of the exception. | ||
* @param int $code Exit code to be used. | ||
* @param Exception $previous Another exception as reference or null. | ||
* @param Exception|null $previous Another exception as reference or null. | ||
*/ | ||
public function __construct($message, $code = 1, Exception $previous = null) { | ||
public function __construct($message, $code = 1, ?Exception $previous = null) { | ||
parent::__construct('*ERROR* '.$message, $code, $previous = null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* clibase class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\cli; | ||
|
||
use auth_outage\local\outagelib; | ||
|
@@ -50,10 +41,10 @@ abstract class clibase { | |
|
||
/** | ||
* clibase constructor. | ||
* @param array $options The parameters to use. | ||
* @param array|null $options The parameters to use. | ||
* @throws cli_exception | ||
*/ | ||
public function __construct(array $options = null) { | ||
public function __construct(?array $options = null) { | ||
global $CFG; | ||
require_once($CFG->libdir.'/clilib.php'); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* create class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\cli; | ||
|
||
use auth_outage\dml\outagedb; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* finish class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\cli; | ||
|
||
use auth_outage\dml\outagedb; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* waitforit class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\cli; | ||
|
||
use auth_outage\dml\outagedb; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* infopage class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\controllers; | ||
|
||
use auth_outage\dml\outagedb; | ||
|
@@ -53,9 +44,9 @@ class infopage { | |
|
||
/** | ||
* infopage_controller constructor. | ||
* @param array $params Parameters to use or null to get from Moodle API (request). | ||
* @param array|null $params Parameters to use or null to get from Moodle API (request). | ||
*/ | ||
public function __construct(array $params = null) { | ||
public function __construct(?array $params = null) { | ||
global $CFG; | ||
// Enable SVG support here to make sure all SVG files | ||
// used in the current theme are served properly. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* maintenance_static_page class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\controllers; | ||
|
||
use auth_outage\local\outage; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* maintenance_static_page_generator class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\controllers; | ||
|
||
use auth_outage\local\outagelib; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* maintenance_static_page_io class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local\controllers; | ||
|
||
use auth_outage\local\outagelib; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,6 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* outage class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local; | ||
|
||
use coding_exception; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,10 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* outagelib class. | ||
* | ||
* @package auth_outage | ||
* @author Daniel Thee Roperto <[email protected]> | ||
* @copyright 2016 Catalyst IT | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace auth_outage\local; | ||
|
||
use auth_outage\dml\outagedb; | ||
use auth_outage\local\controllers\maintenance_static_page; | ||
use auth_outage\output\renderer; | ||
use coding_exception; | ||
use curl; | ||
use Exception; | ||
|
@@ -36,7 +26,6 @@ | |
use stdClass; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
require_once(__DIR__.'/../../lib.php'); | ||
|
||
/** | ||
|
Oops, something went wrong.