Showing 4,652 of 306,333 total issues
Method getSourceVariable
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSourceVariable()
{
if (empty(self::$sourceModules[$this->moduleName])) {
return false;
}
Method organization
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function organization(string $params): string
{
if (!$params) {
return '';
}
Method getModuleConverters
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getModuleConverters(string $moduleName, string $view = '', array $recordIds = [], ?int $userId = null): array
{
$converters = [];
if (null === $userId) {
$userId = \App\User::getCurrentUserId();
Method get
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function get(): array
{
$fullVer = \explode('.', \App\Version::get());
array_pop($fullVer);
self::$version = \implode('.', $fullVer);
Method getUnreadByType
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getUnreadByType(string $roomType = 'global')
{
$dataReader = static::getQueryForUnread($roomType)->createCommand()->query();
$rows = [];
while ($row = $dataReader->read()) {
Method saveEnv
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function saveEnv(): void
{
$data = self::getEnv();
$key = \PHP_SAPI !== 'cli' ? 'www' : 'cli';
$data[$key]['sapi'] = \PHP_SAPI;
Method businessTime
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function businessTime(string $start, string $end, string $startHour, string $endHour, array $days, bool $holidays): int
{
$start = new \DateTime($start);
$end = new \DateTime($end);
$holidaysDates = $dates = [];
Method check
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function check(): array
{
$result = [];
if (!\App\YetiForce\Shop::check('YetiForceVulnerabilities')) {
return $result;
Method loadFromUrl
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function loadFromUrl($url, $param = [])
{
if (empty($url)) {
Log::warning('No url: ' . $url, __CLASS__);
return false;
Method getErrorMessage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getErrorMessage(int $code): string
{
switch ($code) {
case UPLOAD_ERR_INI_SIZE:
$message = 'The uploaded file exceeds the upload_max_filesize directive in php.ini';
Method dropForeignKeys
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function dropForeignKeys(array $foreignKeys)
{
$this->logs .= "> start drop foreign keys\n";
$startMain = microtime(true);
$db = \App\Db::getInstance();
Method getDataFromApi
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getDataFromApi(string $cnpj): void
{
try {
$this->setApiKey();
if ($this->apiKey) {
Method recordPreSave
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function recordPreSave(App\Request $request): void
{
$message = '';
$moduleName = $request->getModule();
$checkUserName = false;
Method parseTreeDataForSave
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function parseTreeDataForSave(array $tree): array
{
$values = [];
foreach ($tree as $branch) {
$value = [];
Method process
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
Method verifyPasswordChange
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function verifyPasswordChange(App\User $userModel): void
{
$passConfig = \Settings_Password_Record_Model::getUserPassConfig();
$time = (int) $passConfig['change_time'];
if (1 === (int) $userModel->getDetail('force_password_change')) {
Method reset
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reset(App\Request $request): void
{
$moduleName = $request->getModule();
$password = \App\Encryption::generateUserPassword();
$userRecordModel = Users_Record_Model::getInstanceById($request->getInteger('record'), $moduleName);
Method getItemModelFromRequest
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getItemModelFromRequest(App\Request $request): App\Fields\Picklist\Item
{
$moduleName = $request->getByType('source_module', \App\Purifier::ALNUM);
$pickListFieldName = $request->getByType('picklistName', \App\Purifier::ALNUM);
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
Method getDependencyGraph
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDependencyGraph(App\Request $request)
{
$qualifiedName = $request->getModule(false);
$recordModel = Settings_PickListDependency_Record_Model::getCleanInstance();
foreach (['tabid', 'source_field'] as $fieldName) {
Method getInstanceById
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getInstanceById(int $id)
{
$db = App\Db::getInstance('admin');
$instance = self::getCleanInstance();
$baseTable = $instance->getTable();