fix formatting
This commit is contained in:
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)];
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user