Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion com_ccex/site/ccex.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// No direct access
ini_set('display_errors', true);
error_reporting(E_ALL);
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
defined('_JEXEC') or die('Restricted access');

//sessions
Expand Down
2 changes: 1 addition & 1 deletion com_ccex/site/helpers/cast.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CCExHelpersCast
* @param object $sourceObject
* @return object
*/
function cast($destination, $sourceObject) {
static function cast($destination, $sourceObject) {
if (is_string($destination)) {
$destination = new $destination();
}
Expand Down
2 changes: 1 addition & 1 deletion com_ccex/site/helpers/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class CCExHelpersStyle
{
function load() {
static function load() {
$document = JFactory::getDocument();

//javascripts
Expand Down
8 changes: 4 additions & 4 deletions com_ccex/site/helpers/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class CCExHelpersTag
{
function formatCurrency($value) {
static function formatCurrency($value) {
if ($value < 0.01 || $value > 99999999) {
return sprintf('%.2e', $value);
} else if (is_float($value)) {
Expand All @@ -15,15 +15,15 @@ function formatCurrency($value) {
}
}

function formatCurrencyWithSymbol($value, $symbol) {
static function formatCurrencyWithSymbol($value, $symbol) {
return sprintf('%s%s', $symbol, CCExHelpersTag::formatCurrency($value));
}

function formatWithSymbol($value, $symbol) {
static function formatWithSymbol($value, $symbol) {
return sprintf('%s%s', $symbol, $value);
}

function formatBoolean($boolean) {
static function formatBoolean($boolean) {
if ($boolean) {
return "Yes";
} else {
Expand Down
4 changes: 2 additions & 2 deletions com_ccex/site/helpers/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class CCExHelpersView
{
function load($viewName, $layoutName = 'default', $viewFormat = 'html', $vars = null) {
static function load($viewName, $layoutName = 'default', $viewFormat = 'html', $vars = null) {

// Get the application
$app = JFactory::getApplication();
Expand Down Expand Up @@ -36,7 +36,7 @@ function load($viewName, $layoutName = 'default', $viewFormat = 'html', $vars =
return $view;
}

function getHtml($view, $layout, $item, $data) {
static function getHtml($view, $layout, $item, $data) {
$objectView = CCExHelpersView::load($view, $layout, 'phtml');
$objectView->$item = $data;

Expand Down
3 changes: 2 additions & 1 deletion com_ccex/site/models/collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ public function intervalsWithoutLast() {
}

public function lastInterval() {
return CCExHelpersCast::cast('CCExModelsInterval', end($this->intervals()));
$intervals = $this->intervals();
return CCExHelpersCast::cast('CCExModelsInterval', end($intervals));
}

public function newInterval() {
Expand Down