Skip to content

Commit

Permalink
Explicitly stating the visibility
Browse files Browse the repository at this point in the history
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
madhuracj committed May 10, 2014
1 parent 33a30ad commit c154b1b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libraries/Advisor.class.php
Expand Up @@ -26,7 +26,7 @@ class Advisor
*
* @return array with run and parse results
*/
function run()
public function run()
{
// HowTo: A simple Advisory system in 3 easy steps.

Expand Down Expand Up @@ -70,7 +70,7 @@ function run()
*
* @return void
*/
function storeError($description, $exception)
public function storeError($description, $exception)
{
$this->runResult['errors'][] = $description
. ' '
Expand All @@ -85,7 +85,7 @@ function storeError($description, $exception)
*
* @return boolean
*/
function runRules()
public function runRules()
{
$this->runResult = array(
'fired' => array(),
Expand Down Expand Up @@ -159,7 +159,7 @@ function runRules()
*
* @return string
*/
static function escapePercent($str)
public static function escapePercent($str)
{
return preg_replace('/%( |,|\.|$|\(|\)|<|>)/', '%%\1', $str);
}
Expand All @@ -172,7 +172,7 @@ static function escapePercent($str)
*
* @return string
*/
function translate($str, $param = null)
public function translate($str, $param = null)
{
$string = _gettext(Advisor::escapePercent($str));
if ( ! is_null($param)) {
Expand All @@ -190,7 +190,7 @@ function translate($str, $param = null)
*
* @return string[]
*/
static function splitJustification($rule)
public static function splitJustification($rule)
{
$jst = preg_split('/\s*\|\s*/', $rule['justification'], 2);
if (count($jst) > 1) {
Expand All @@ -207,7 +207,7 @@ static function splitJustification($rule)
*
* @return void
*/
function addRule($type, $rule)
public function addRule($type, $rule)
{
switch($type) {
case 'notfired':
Expand Down Expand Up @@ -322,7 +322,7 @@ private function _ruleExprEvaluateVariable($matches)
*
* @throws Exception
*/
function ruleExprEvaluate($expr)
public function ruleExprEvaluate($expr)
{
// Evaluate fired() conditions
$expr = preg_replace_callback(
Expand Down Expand Up @@ -367,7 +367,7 @@ function ruleExprEvaluate($expr)
*
* @return array with parsed data
*/
static function parseRulesFile()
public static function parseRulesFile()
{
$file = file('libraries/advisory_rules.txt', FILE_IGNORE_NEW_LINES);
$errors = array();
Expand Down

0 comments on commit c154b1b

Please sign in to comment.