Skip to content

Commit

Permalink
Rename some helpers functions
Browse files Browse the repository at this point in the history
  • Loading branch information
bulton-fr committed Sep 18, 2016
1 parent c3085b1 commit 827fa47
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion install/skeleton/cli/exemple.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Cli::displayMsg('CLI Exemple file', 'green');

//Get parameters passed to cli
$opt = Cli::getCliParams('vhp', array('version::', 'help::', 'parameters::'));
$opt = Cli::getParameters('vhp', array('version::', 'help::', 'parameters::'));

//version parameter
if (isset($opt['v']) || isset($opt['version'])) {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Cli
*
* @return array
*/
public static function getCliParams($options, $longopts = array())
public static function getParameters($options, $longopts = array())
{
$longopts = array_merge($longopts, array('type_site::'));
$opt = getopt('f:'.$options, $longopts);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Cookies
*
* @return void
*/
public static function createCookie($name, $value, $expire = 1209600)
public static function create($name, $value, $expire = 1209600)
{
$expireTime = time() + $expire;
setcookie($name, $value, $expireTime);
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/Datas.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Datas
*
* @return boolean
*/
public static function checkTypes($vars)
public static function checkType($vars)
{
if (!is_array($vars)) {
return false;
Expand Down Expand Up @@ -57,7 +57,7 @@ public static function checkTypes($vars)
*
* @return boolean
*/
public static function validMail($mail)
public static function checkMail($mail)
{
return Secure::securise($mail, 'email');
}
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Http
*
* @return void
*/
public static function redirection($page, $permanent = false)
public static function redirect($page, $permanent = false)
{
$httpStatus = 302;
if ($permanent === true) {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Secure.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Secure
*
* @return string
*/
public static function hashage($val)
public static function hash($val)
{
return substr(hash('sha256', md5($val)), 0, 32);
}
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/Sessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Sessions
*
* @return boolean
*/
public static function sessionIsStarted()
public static function isStarted()
{
if (PHP_SAPI === 'cli') {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class String
*
* @return string
*/
public static function nl2brReplace($str)
public static function nl2br($str)
{
return str_replace("\n", '<br>', $str);
}
Expand Down
4 changes: 2 additions & 2 deletions src/traits/Memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trait Memcache
*/
public function ifExists($key)
{
$verifParams = \BFW\Helpers\Datas::checkTypes(
$verifParams = \BFW\Helpers\Datas::checkType(
[
[
'type' => 'string',
Expand Down Expand Up @@ -52,7 +52,7 @@ public function ifExists($key)
*/
public function majExpire($key, $expire)
{
$verifParams = \BFW\Helpers\Datas::checkTypes(
$verifParams = \BFW\Helpers\Datas::checkType(
[
['type' => 'string', 'data' => $key],
['type' => 'int', 'data' => $expire]
Expand Down

0 comments on commit 827fa47

Please sign in to comment.