diff options
author | emkael <emkael@tlen.pl> | 2016-03-16 22:56:13 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-03-16 22:56:13 +0100 |
commit | 75dc7a1df808ab2ca93ca96e299b06d90ebcedf6 (patch) | |
tree | 3c7671d8e47b5b68e534ad13ecb5acb9374d4272 /app | |
parent | c5058d68713fc710c68488db726b05453e18d85d (diff) |
* refactoring, code formatting
Diffstat (limited to 'app')
-rw-r--r-- | app/php/components/PasswordChange.php | 4 | ||||
-rw-r--r-- | app/php/components/TimezoneSelect.php | 8 | ||||
-rw-r--r-- | app/php/dto/CalendarGroupDTO.php | 2 | ||||
-rw-r--r-- | app/php/facades/EventFacade.php | 4 | ||||
-rw-r--r-- | app/php/facades/Facade.php | 2 | ||||
-rw-r--r-- | app/php/user/DbUser.php | 2 |
6 files changed, 14 insertions, 8 deletions
diff --git a/app/php/components/PasswordChange.php b/app/php/components/PasswordChange.php index d0a90fb..1224f33 100644 --- a/app/php/components/PasswordChange.php +++ b/app/php/components/PasswordChange.php @@ -10,7 +10,9 @@ class PasswordChange extends TTemplateControl { public function setUserToChange(DbUser $user) { if ($user->IsGuest) { - throw new TInvalidDataValueException('Password change impossible for guest user'); + throw new TInvalidDataValueException( + 'Password change impossible for guest user' + ); } $this->setControlState('user', $user); } diff --git a/app/php/components/TimezoneSelect.php b/app/php/components/TimezoneSelect.php index d97514f..5825b1a 100644 --- a/app/php/components/TimezoneSelect.php +++ b/app/php/components/TimezoneSelect.php @@ -11,7 +11,9 @@ class TimezoneSelect extends TTemplateControl { public function setUserToChange(DbUser $user) { if ($user->IsGuest) { - throw new TInvalidDataValueException('Password change impossible for guest user'); + throw new TInvalidDataValueException( + 'Password change impossible for guest user' + ); } $this->setControlState('user', $user); } @@ -22,7 +24,9 @@ class TimezoneSelect extends TTemplateControl { $this->Timezones->DataValueField = 'Name'; $this->Timezones->DataTextField = 'Label'; $this->Timezones->dataBind(); - $this->Timezones->setSelectedValue($this->UserToChange->getTimezonePreference()->Name); + $this->Timezones->setSelectedValue( + $this->UserToChange->getTimezonePreference()->Name + ); } public function saveTimezone($sender, $param) { diff --git a/app/php/dto/CalendarGroupDTO.php b/app/php/dto/CalendarGroupDTO.php index e1f39b5..75ec6c6 100644 --- a/app/php/dto/CalendarGroupDTO.php +++ b/app/php/dto/CalendarGroupDTO.php @@ -6,7 +6,7 @@ Prado::using('Application.dto.CalendarDTO'); class CalendarGroupDTO { public $Name; - public $Calendars = array(); + public $Calendars = []; public function loadRecord(Category $categoryRecord, array $calendars) { $this->Name = $categoryRecord->Name; diff --git a/app/php/facades/EventFacade.php b/app/php/facades/EventFacade.php index 6ed739f..e7b3abe 100644 --- a/app/php/facades/EventFacade.php +++ b/app/php/facades/EventFacade.php @@ -22,11 +22,11 @@ class EventFacade extends Facade { } return $this->fetchList( 'getEvents', - array( + [ 'date_from' => $dateFrom ?: '0000-00-00 00:00:00', 'date_to' => $dateTo ?: '9999-99-99', 'calendar_clause' => $calendarClause - ) + ] ); } diff --git a/app/php/facades/Facade.php b/app/php/facades/Facade.php index 5d71a89..742365c 100644 --- a/app/php/facades/Facade.php +++ b/app/php/facades/Facade.php @@ -2,7 +2,7 @@ class Facade { - protected static $_instances = array(); + protected static $_instances = []; protected $_sqlMap; diff --git a/app/php/user/DbUser.php b/app/php/user/DbUser.php index c3b441b..730a1c0 100644 --- a/app/php/user/DbUser.php +++ b/app/php/user/DbUser.php @@ -48,7 +48,7 @@ class DbUser extends TDbUser { } public function __call($name, $args) { - $match = array(); + $match = []; if (preg_match('/^getIs(.+)$/', $name, $match)) { return $this->isInRole($match[1]); } |