Fixed code inspections, missing phpdocs and code standards.

This commit is contained in:
Daniel Thee Roperto
2016-09-15 14:01:45 +10:00
parent 6041d945e1
commit 7ca44c74ab
17 changed files with 143 additions and 65 deletions

View File

@@ -14,6 +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/>.
use auth_outage\models\outage;
defined('MOODLE_INTERNAL') || die();
/**
* Tests performed on outage class.
*
@@ -22,12 +26,6 @@
* @copyright Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use auth_outage\models\outage;
defined('MOODLE_INTERNAL') || die();
class outage_test extends basic_testcase {
public function test_constructor() {
$outage = new outage();

View File

@@ -14,6 +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/>.
use auth_outage\models\outage;
use auth_outage\outagedb;
defined('MOODLE_INTERNAL') || die();
/**
* Tests performed on outage class.
*
@@ -22,13 +27,6 @@
* @copyright Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use auth_outage\models\outage;
use auth_outage\outagedb;
defined('MOODLE_INTERNAL') || die();
class outagedb_test extends advanced_testcase {
/**
* Ensure DB tests run as admin.
@@ -40,7 +38,8 @@ class outagedb_test extends advanced_testcase {
/**
* Creates an array of ids in from the given outages array.
* @param $outages
* @param array $outages An array of outages.
* @return array An array with the keys of the outages as values.
*/
private static function createidarray(array $outages) {
$ids = [];

View File

@@ -14,6 +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/>.
use auth_outage\outagelib;
defined('MOODLE_INTERNAL') || die();
/**
* Tests performed on outageutils class.
*
@@ -22,12 +26,6 @@
* @copyright Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use auth_outage\outagelib;
defined('MOODLE_INTERNAL') || die();
class outagelib_test extends basic_testcase
{
public function test_data2object() {