fix formatting

This commit is contained in:
Antonio Ramirez
2016-12-14 02:50:12 +01:00
parent f3f4b31bb4
commit 3ba01b4674
140 changed files with 512 additions and 523 deletions

View File

@ -1,4 +1,5 @@
<?php
namespace Da\User\Helper;
use Da\User\Model\AbstractAuthItem;
@ -15,7 +16,7 @@ class AuthHelper
use AuthManagerTrait;
/**
* Checks whether a user has certain role
* Checks whether a user has certain role.
*
* @param $userId
* @param $role

View File

@ -3,11 +3,11 @@
namespace Da\User\Helper;
/**
*
* ModelMapHelper.php
* ModelMapHelper.php.
*
* Date: 3/12/16
* Time: 18:10
*
* @author Antonio Ramirez <hola@2amigos.us>
*/
class ClassMapHelper
@ -37,13 +37,14 @@ class ClassMapHelper
* @param $key
*
* @return mixed
*
* @throws \Exception
*/
public function get($key)
{
if (array_key_exists($key, $this->map)) {
return $this->map[$key];
};
throw new \Exception('Unknown model map key: ' . $key);
}
throw new \Exception('Unknown model map key: '.$key);
}
}

View File

@ -1,4 +1,5 @@
<?php
namespace Da\User\Helper;
class GravatarHelper
@ -10,6 +11,6 @@ class GravatarHelper
public function getUrl($id, $size = 200)
{
return '//gravatar.com/avatar/' . $id . '?s=' . $size;
return '//gravatar.com/avatar/'.$id.'?s='.$size;
}
}

View File

@ -19,7 +19,7 @@ class SecurityHelper
/**
* Generates a secure hash from a password and a random salt.
*
* @param string $password
* @param string $password
* @param null|int $cost
*
* @return string
@ -54,7 +54,7 @@ class SecurityHelper
}
$all = str_split($all);
for ($i = 0; $i < $length - count($sets); $i++) {
for ($i = 0; $i < $length - count($sets); ++$i) {
$password .= $all[array_rand($all)];
}

View File

@ -1,15 +1,15 @@
<?php
namespace Da\User\Helper;
use DateTimeZone;
use yii\helpers\ArrayHelper;
use DateTime;
class TimezoneHelper
{
/**
* Get all of the time zones with the offsets sorted by their offset
* Get all of the time zones with the offsets sorted by their offset.
*
* @return array
*/
@ -23,8 +23,8 @@ class TimezoneHelper
$offset = $date->getOffset() / 60 / 60;
$timeZones[] = [
'timezone' => $timeZone,
'name' => "{$timeZone} (UTC " . ($offset > 0 ? '+' : '') . "{$offset})",
'offset' => $offset
'name' => "{$timeZone} (UTC ".($offset > 0 ? '+' : '')."{$offset})",
'offset' => $offset,
];
}