Run PHP-CS-FIXER to make sure

code is consisted with PSR-1 + PSR-2
This commit is contained in:
eldadfux committed 2019-09-06 20:04:26 +03:00
1 parent c9d3448571
commit 35680bbae9
37 files changed
+928 -753

No files matched your search

+18 -12
View File
@@ -9,17 +9,19 @@ abstract class Adapter
protected $namespace = '';
/**
* Set Namespace
* Set Namespace.
*
* Set namespace to divide different scope of data sets
*
* @param $namespace
*
* @throws Exception
*
* @return bool
*/
public function setNamespace($namespace)
{
if(empty($namespace)) {
if (empty($namespace)) {
throw new Exception('Missing namespace');
}
@@ -29,16 +31,17 @@ abstract class Adapter
}
/**
* Get Namespace
* Get Namespace.
*
* Get namespace of current set scope
*
* @throws Exception
*
* @return string
*/
public function getNamespace()
{
if(empty($this->namespace)) {
if (empty($this->namespace)) {
throw new Exception('Missing namespace');
}
@@ -46,41 +49,44 @@ abstract class Adapter
}
/**
* Log
* Log.
*
* Add specific event log
*
* @param int $userId
* @param int $userType
* @param int $userId
* @param int $userType
* @param string $event
* @param string $resource
* @param string $userAgent
* @param string $ip
* @param string $location
* @param array $data
* @param array $data
*
* @return
*/
abstract public function log($userId, $userType, $event, $resource, $userAgent, $ip, $location, $data);
/**
* Get All Logs By User
* Get All Logs By User.
*
* Get all user logs
*
* @param int $userId
* @param int $userType
*
* @return mixed
*/
abstract public function getLogsByUser($userId, $userType);
/**
* Get All Logs By User and Actions
* Get All Logs By User and Actions.
*
* Get all user logs by given action names
*
* @param int $userId
* @param int $userType
* @param int $userId
* @param int $userType
* @param array $actions
*
* @return mixed
*/
abstract public function getLogsByUserAndActions($userId, $userType, array $actions);