Skip to content

Commit

Permalink
PSR2 Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlawrence committed Aug 1, 2015
1 parent 3401a30 commit 38566b4
Show file tree
Hide file tree
Showing 72 changed files with 1,908 additions and 2,500 deletions.
26 changes: 13 additions & 13 deletions AccessLog_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
* @author Stephen Lawrence Jr.
* @param string $accesslog
*/
class AccessLog extends Plugin {
var $accesslog='';
class AccessLog extends Plugin
{
public $accesslog='';

/**
* AccessLog constructor for the AccessLog plugin
* @param string $_accesslog Message to display
*/
function AccessLog($_accesslog='') {
public function AccessLog($_accesslog='')
{
$this->name = 'AccessLog';
$this->author = 'Stephen Lawrence Jr';
$this->version = '1.0';
Expand All @@ -46,14 +47,16 @@ function AccessLog($_accesslog='') {
/**
* @param string $_var The string to display
*/
function setAccessLog($_var) {
public function setAccessLog($_var)
{
$this->accesslog = $_var;
}

/**
* @returns string $var Get the value of accesslog var
*/
function getAccessLog() {
public function getAccessLog()
{
$var = $this->accesslog;
return $var;
}
Expand All @@ -62,7 +65,7 @@ function getAccessLog() {
* Draw the admin menu
* Required if you want an admin menu to show for your plugin
*/
function onAdminMenu()
public function onAdminMenu()
{
$curdir = dirname(__FILE__);
$GLOBALS['smarty']->display('file:' . $curdir . '/templates/accesslog.tpl');
Expand All @@ -74,10 +77,9 @@ function onAdminMenu()
* @param string $type The type of entry to describe what happened
* @param PDO $pdo
*/
static function addLogEntry($fileId, $type, PDO $pdo)
public static function addLogEntry($fileId, $type, PDO $pdo)
{
if ($fileId == 0)
{
if ($fileId == 0) {
global $id;
$fileId = $id;
}
Expand All @@ -91,7 +93,5 @@ static function addLogEntry($fileId, $type, PDO $pdo)
':type' => $type
)
);

}

}
}
7 changes: 2 additions & 5 deletions Category_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
if (!defined('Category_class'))
{
if (!defined('Category_class')) {
define('Category_class', 'true', false);

class Category
Expand All @@ -36,12 +35,10 @@ public static function getAllCategories(PDO $pdo)
$stmt->execute();
$result = $stmt->fetchAll();

foreach($result as $row) {
foreach ($result as $row) {
$categoryListArray[] = $row;
}
return $categoryListArray;
}

}

}
11 changes: 4 additions & 7 deletions Department_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class. The only difference is that it provides it's own constructor to handle i
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

if( !defined('Department_class') )
{
if (!defined('Department_class')) {
define('Department_class', 'true', false);
class Department extends databaseData
{
Expand All @@ -31,7 +30,7 @@ class Department extends databaseData
* @param int $id
* @param PDO $connection
*/
function Department($id, PDO $connection)
public function Department($id, PDO $connection)
{
$this->field_name = 'name';
$this->field_id = 'id';
Expand All @@ -47,7 +46,7 @@ function Department($id, PDO $connection)
* @param PDO $pdo
* @returns array
*/
static function getAllDepartments(PDO $pdo)
public static function getAllDepartments(PDO $pdo)
{
$departments = array();
$query = "SELECT name, id FROM {$GLOBALS['CONFIG']['db_prefix']}department ORDER by name";
Expand All @@ -63,7 +62,5 @@ static function getAllDepartments(PDO $pdo)
}
return $departments;
}

}

}
}
Loading

0 comments on commit 38566b4

Please sign in to comment.