Method createUserPrivilegesFile
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createUserPrivilegesFile($userId)
{
$file = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges' . \DIRECTORY_SEPARATOR . "user_privileges_$userId.php";
$user = [];
$userInstance = \CRMEntity::getInstance('Users');
Function createUserPrivilegesFile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function createUserPrivilegesFile($userId)
{
$file = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges' . \DIRECTORY_SEPARATOR . "user_privileges_$userId.php";
$user = [];
$userInstance = \CRMEntity::getInstance('Users');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Missing class import via use statement (line '28', column '22'). Open
$dataReader = (new \App\Db\Query())->select(['id', 'first_name', 'last_name', 'is_admin', 'cal_color', 'status', 'email1', 'user_name', 'deleted'])->from('vtiger_users')->createCommand()->query();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'App\Json' in method 'createUserPrivilegesFile'. Open
$logo = Json::isEmpty($multiCompany->get('logo')) ? [] : current(Json::decode($multiCompany->get('logo')));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\CRMEntity' in method 'createUserPrivilegesFile'. Open
$userInstance = \CRMEntity::getInstance('Users');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\Utils' in method 'createUserPrivilegesFile'. Open
file_put_contents($file, 'return ' . Utils::varExport($user) . ';' . PHP_EOL, FILE_APPEND);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\PrivilegeUtil' in method 'createUserPrivilegesFile'. Open
$user['groups'] = PrivilegeUtil::getAllGroupsByUser($userId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Purifier' in method 'createUserPrivilegesFile'. Open
$userInstance->column_fields[$field] = is_numeric($value) ? $value : \App\Purifier::encodeHtml($value);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\PrivilegeUtil' in method 'createUserPrivilegesFile'. Open
$userRoleInfo = PrivilegeUtil::getRoleDetail($userInstance->column_fields['roleid']);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\Record' in method 'createUserPrivilegesFile'. Open
if (Record::isExists($userRoleInfo['company'], 'MultiCompany')) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Vtiger_Record_Model' in method 'createUserPrivilegesFile'. Open
$multiCompany = \Vtiger_Record_Model::getInstanceById($userRoleInfo['company'], 'MultiCompany');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\Utils' in method 'createUsersFile'. Open
Utils::saveToFile(static::$usersFile, $users, '', 0, true);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\PrivilegeUtil' in method 'createUserPrivilegesFile'. Open
$user['leader'] = PrivilegeUtil::getGroupsWhereUserIsLeader($userId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\Module' in method 'createUserPrivilegesFile'. Open
}
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\PrivilegeUtil' in method 'createUserPrivilegesFile'. Open
$user['leadersByGroup'] = PrivilegeUtil::getLeadersGroupByUserId($userId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\Module' in method 'createUsersFile'. Open
$entityData = Module::getEntityInfo('Users');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\PrivilegeUtil' in method 'createUserPrivilegesFile'. Open
$user['profiles'] = PrivilegeUtil::getProfilesByRole($userInstance->column_fields['roleid']);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method createUserPrivilegesFile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$user['multiCompanyId'] = null;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'App\Json' in method 'createUserPrivilegesFile'. Open
$logo = Json::isEmpty($multiCompany->get('logo')) ? [] : current(Json::decode($multiCompany->get('logo')));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Define a constant instead of duplicating this literal "Users" 4 times. Open
$entityData = Module::getEntityInfo('Users');
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Reference to undeclared property \CRMEntity->column_fields
Open
$user['profiles'] = PrivilegeUtil::getProfilesByRole($userInstance->column_fields['roleid']);
- Exclude checks
Reference to undeclared property \CRMEntity->column_fields
Open
$userInstance->column_fields[$field] = is_numeric($value) ? $value : \App\Purifier::encodeHtml($value);
- Exclude checks
Reference to undeclared property \CRMEntity->column_fields
Open
$user['details'] = $userInstance->column_fields;
- Exclude checks
Reference to undeclared property \CRMEntity->column_fields
Open
$displayName .= ' ' . $userInstance->column_fields[$field];
- Exclude checks
Reference to undeclared property \CRMEntity->column_fields
Open
$userRoleInfo = PrivilegeUtil::getRoleDetail($userInstance->column_fields['roleid']);
- Exclude checks
Reference to undeclared property \CRMEntity->column_fields
Open
foreach ($userInstance->column_fields as $field => $value) {
- Exclude checks
Returning type false
but getUser()
is declared to return array
Open
return static::$usersFileCache[$type] ?? false;
- Exclude checks
Reference to undeclared property \CRMEntity->is_admin
Open
$userInstance->column_fields['is_admin'] = 'on' === $userInstance->is_admin;
- Exclude checks
Suspicious array access to false
Open
return static::$usersFileCache[$type] ?? false;
- Exclude checks
Reference to undeclared property \CRMEntity->column_fields
Open
$userInstance->column_fields['is_admin'] = 'on' === $userInstance->is_admin;
- Exclude checks
Call to undeclared method \App\Db\Query::select
Open
$dataReader = (new \App\Db\Query())->select(['id', 'first_name', 'last_name', 'is_admin', 'cal_color', 'status', 'email1', 'user_name', 'deleted'])->from('vtiger_users')->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($userInstance->column_fields as $field => $value) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dataReader = (new \App\Db\Query())->select(['id', 'first_name', 'last_name', 'is_admin', 'cal_color', 'status', 'email1', 'user_name', 'deleted'])->from('vtiger_users')->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Get the id and the name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userInstance->column_fields['is_admin'] = 'on' === $userInstance->is_admin;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['parent_role_seq'] = $userRoleInfo['parentrole'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['multiCompanyLogoUrl'] = $logo ? "file.php?module=MultiCompany&action=Logo&record={$userId}&key={$logo['key']}" : '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
$file = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges' . \DIRECTORY_SEPARATOR . "user_privileges_$userId.php";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['displayName'] = trim($displayName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$multiCompany = \Vtiger_Record_Model::getInstanceById($userRoleInfo['company'], 'MultiCompany');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['multiCompanyId'] = null;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['details'] = $userInstance->column_fields;
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
$user['multiCompanyLogoUrl'] = $logo ? "file.php?module=MultiCompany&action=Logo&record={$userId}&key={$logo['key']}" : '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $usersFile = 'user_privileges/users.php';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function createUsersFile()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['leader'] = PrivilegeUtil::getGroupsWhereUserIsLeader($userId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$entityData = Module::getEntityInfo('Users');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$row['fullName'] = trim($fullName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function createUserPrivilegesFile($userId)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$exclusionEncodeHtml = ['currency_symbol', 'date_format', 'currency_id', 'currency_decimal_separator', 'currency_grouping_separator', 'othereventduration', 'imagename'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected static $usersFileCache = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$users['id'][$row['id']] = array_map('\App\Purifier::encodeHtml', $row);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userInstance->retrieveEntityInfo($userId, 'Users');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$displayName = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['profiles'] = PrivilegeUtil::getProfilesByRole($userInstance->column_fields['roleid']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['multiCompanyLogo'] = $logo;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$users = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false === static::$usersFileCache) {
- Exclude checks
Line exceeds 120 characters; contains 177 characters Open
$exclusionEncodeHtml = ['currency_symbol', 'date_format', 'currency_id', 'currency_decimal_separator', 'currency_grouping_separator', 'othereventduration', 'imagename'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['leadersByGroup'] = PrivilegeUtil::getLeadersGroupByUserId($userId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['roleName'] = $userRoleInfo['rolename'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($row = $dataReader->read()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static::$usersFileCache = require static::$usersFile;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$displayName .= ' ' . $userInstance->column_fields[$field];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['groups'] = PrivilegeUtil::getAllGroupsByUser($userId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$logo = null;
- Exclude checks
Line exceeds 120 characters; contains 204 characters Open
$dataReader = (new \App\Db\Query())->select(['id', 'first_name', 'last_name', 'is_admin', 'cal_color', 'status', 'email1', 'user_name', 'deleted'])->from('vtiger_users')->createCommand()->query();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fullName .= ' ' . $row[$field];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $type
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function getUser($type)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return static::$usersFileCache[$type] ?? false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userRoleInfo = PrivilegeUtil::getRoleDetail($userInstance->column_fields['roleid']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Create users privileges file.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $userId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach (Module::getEntityInfo('Users')['fieldnameArr'] as $field) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['parent_roles'] = $userRoleInfo['parentRoles'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fullName = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Utils::saveToFile(static::$usersFile, $users, '', 0, true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Creates a file with all the user, user-role,user-profile, user-groups informations.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userInstance = \CRMEntity::getInstance('Users');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userInstance->column_fields[$field] = is_numeric($value) ? $value : \App\Purifier::encodeHtml($value);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
file_put_contents($file, 'return ' . Utils::varExport($user) . ';' . PHP_EOL, FILE_APPEND);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$file = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'user_privileges' . \DIRECTORY_SEPARATOR . "user_privileges_$userId.php";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user['multiCompanyId'] = $multiCompany->getId();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($entityData['fieldnameArr'] as $field) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$users['userName'][$row['user_name']] = $row['id'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* get general users privileges file.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!\in_array($field, $exclusionEncodeHtml)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (Record::isExists($userRoleInfo['company'], 'MultiCompany')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$logo = Json::isEmpty($multiCompany->get('logo')) ? [] : current(Json::decode($multiCompany->get('logo')));
- Exclude checks