When logs entity comes from automation job

@param array $params
@return String
357458
protected function job(&$params)
    {
        $operationName = $this->model->name;
        $instance      = app($this->model->owner_type)->with('job')->find($this->model->owner_id);
        if (is_null($instance)) {
            array_set($params, 'time', '0.0');
            array_set($params, 'name', '[not available]');
            $params['return'] = '<span class="label-basic label-basic--danger ">Error</span>';
            return 'JOBRESULTS_CREATED_ERROR';
        }
        array_set($params, 'return', $instance->return);
        array_set($params, 'time', $instance->runtime);
        array_set($params, 'name', anchor(handles('antares::automation/show/' . $instance->job_id), $instance->job->name));

        if (array_get($this->model->new_value, 'has_error') !== false) {
            $operationName    = 'JOBRESULTS_CREATED_ERROR';
            $params['return'] = '<span id="error-' . $this->model->owner_id . '" class="label-basic label-basic--danger ">error</span><div class="mdl-tooltip" for="error-' . $this->model->owner_id . '">error</div>';
        } else {
            $params['return'] = '<span id="success-' . $this->model->owner_id . '" class="label-basic label-basic--success ">SUCCESSFULLY</span><div class="mdl-tooltip" for="success-' . $this->model->owner_id . '">successfully</div>';
        }
        return $operationName;
    }
1097419
protected function getSignature(array $params)
    {
        ksort($params);

        $srcStr = 'POSTcdn.api.qcloud.com/v2/index.php?'.urldecode(http_build_query($params));

        return base64_encode(hash_hmac('sha1', $srcStr, $this->getCredentials()['secretKey'], true));
    }
1130932
public function getReqSign(&$params)
    {
        $params['app_id'] = $this->appId;
        if (empty($params['nonce_str'])) {
            $params['nonce_str'] = md5(uniqid("{$params['app_id']}_"));
        }
        if (empty($params['time_stamp'])) {
            $params['time_stamp'] = strval(time());
        }
        ksort($params);
        $str = '';
        array_walk($params, function ($item, $key) use (&$str) {
            if ($item !== '') {
                $str .= sprintf('%s=%s&', $key, urlencode($item));
            }
        });

        return strtoupper(md5(sprintf('%s%s=%s', $str, 'app_key', $this->secret)));
    }
1076018
private function getFullName(array $params): string
    {
        if (isset($params['full_name'])) {
            return $this->get($params, 'full_name', '');
        }

        return trim(sprintf('%s %s', $this->get($params, 'first', ''), $this->get($params, 'last', '')));
    }
869190
protected function encodePayload(array $params)
  {
    $encoded = [];
    foreach ($params as $key => $value)
    {
      if (is_array($value))                 $encoded[$key] = $this->encodePayload($value);
      else if ($value instanceof \DateTime) $encoded[$key] = $value->format(\DateTime::ISO8601);
      else                                  $encoded[$key] = $value;
    }

    return $encoded;
  }
1011747
public static function calculateCHash($params) {
		t3lib_div::logDeprecatedFunction();
		/* @var $cacheHash t3lib_cacheHash */
		$cacheHash = t3lib_div::makeInstance('t3lib_cacheHash');
		return $cacheHash->calculateCacheHash($params);
	}
1060500
public function actionLs($params = false){
        /**
         * @var $cron Crontab
         */

        if(false == $params) {

            $cron = $this->module->get($this->module->nameComponent);
            $jobs = $cron->getJobs();

            foreach ($jobs as $index=>$job) {
                /**
                 * @var $job Cronjob
                 */
                if($job->getGroup() == $this->module->cronGroup)
                echo '['.$index.'] '. $this->ansiFormat($job->getJobCommand(), Console::FG_CYAN);
            }
        } elseif($params == 'a' || $params == 'al') {
            echo shell_exec('crontab -l') . PHP_EOL;
        }

    }
144340
public function getServiceDataInstance(array $params) {

        $dataPostgresql = new \Cityware\Monitoring\Models\Services\DataPostgreSql($params);

        $locksInstance = $dataPostgresql->getDataPgSqlInstanceLocks();
        $serverVersionInstance = $dataPostgresql->getDataPgSqlInstanceVersion();
        $checkPointsInstance = $dataPostgresql->getDataPgSqlInstanceCheckpoint();
        $connectionsInstance = $dataPostgresql->getDataPgSqlInstanceConnections();

        $return = Array();

        $return['des_server_version'] = $serverVersionInstance['server_version'];

        $return['num_total_checkpoints'] = (float) $checkPointsInstance['total_checkpoints'];

        $return['num_total_checkpoints_req'] = (float) $checkPointsInstance['checkpoints_req'];
        $return['num_total_checkpoints_timed'] = (float) $checkPointsInstance['checkpoints_timed'];

        $return['num_sec_between_checkpoints'] = ($return['num_total_checkpoints'] > 0) ? ((float) $checkPointsInstance['seconds_since_start'] / $return['num_total_checkpoints']) : 0;
        $return['num_checkpoint_req_timed_ratio'] = ($return['num_total_checkpoints_timed'] > 0) ? (($return['num_total_checkpoints_req'] / $return['num_total_checkpoints_timed']) * 100) : 0;

        $return['num_total_connections'] = (float) $connectionsInstance['total_connections'];
        $return['num_max_connections'] = (float) $connectionsInstance['max_connections'];
        $return['num_connection_ratio'] = (float) $connectionsInstance['connection_ratio'];

        $return['num_max_locks_per_transaction'] = (float) $locksInstance['max_total_locks'];
        $return['num_access_exclusive_lock'] = $locksInstance['AccessExclusiveLock'];
        $return['num_access_share_lock'] = $locksInstance['AccessShareLock'];
        $return['num_exclusive_lock'] = $locksInstance['ExclusiveLock'];
        $return['num_row_exclusive_lock'] = $locksInstance['RowExclusiveLock'];
        $return['num_row_share_lock'] = $locksInstance['RowShareLock'];
        $return['num_share_lock'] = $locksInstance['ShareLock'];
        $return['num_share_row_exclusive_lock'] = $locksInstance['ShareRowExclusiveLock'];
        $return['num_share_update_exclusive_lock'] = $locksInstance['ShareUpdateExclusiveLock'];


        return $return;
    }
723745
protected function initiate(&$params)
    {
        $name   = $this->model->name;
        $owner  = isset($this->model->new_value['name']) ? $this->model->new_value['name'] : $this->model->owner_id;
        $user   = is_null($this->model->user) ? 'Automation' : anchor('users/' . $this->model->user_id, '#' . $this->model->user->id . ' ' . $this->model->user->fullname);
        $params = [
            'owner_id' => $owner,
            'user_id'  => $this->model->user_id,
            'user'     => $user
        ];
        $params = array_merge($params, (array) $this->model->additional_params);
        return $name;
    }
1265397
protected function getColumnIndex($params)
    {
        if (isset($params['parent'])) {
            if (is_array($params['parent']) && isset($params['parent']['parent'])) {
                return md5($params['parent'][0]);
            }

            return md5($params['parent'], true);
        }

        return ++$this->iThead;
    }
5551
private function decorateParamsForMethodCall(array $params) : string
    {
        $params_out = [];
        foreach($params as $param) {
            $params_out[] = $this->decorateValue($param);
        }
        return implode(',',$params_out);
    }
1331523
public function export(array $params = array()) {
		$result = array(
			'type' => 'list',
			'count' => $this->getCount(),
			'limit' => elgg_extract('limit', $this->options, elgg_get_config('default_limit')),
			'offset' => elgg_extract('offset', $this->options, 0),
			'items' => array(),
		);

		$batch = $this->getBatch();
		foreach ($batch as $entity) {
			$result['items'][] = hypeApps()->graph->export($entity, $params);
		}

		return $result;
	}
440534
public function queryColumn($params = array())
    {
        $this->mergeParams($params);
        $this->beginQuery();
        $rst = $this->statement->fetchAll(\PDO::FETCH_COLUMN);
        $this->statement->closeCursor();
        return $rst;
    }
1055666
private function _get_args_from_params(array $params)
	{
		$byType	=	$this->container->requestRouteParams;
		$args	=	[];
		foreach ($params as $param)
		{
			if ($param->hasType() && isset($byType[$type = strtolower($param->getType())]))
				$args[] = $byType[$type];
			else if (isset($this->params[$param->name]))
				$args[] = $this->params[$param->name];
			else if (isset($_GET[$param->name]))
				$args[] = $_GET[$param->name];
			else if (isset($_POST[$param->name]))
				$args[] = $_POST[$param->name];
			else
			{
				if ( ! $param->isOptional())
					throw new \Exception('Unable to find NON-optional parameter `' . $param->name . ($param->hasType() ? '` of type `' . $param->getType() : null) . '` for route controller/handler: ' . var_export($this->route, true));
				$args[] = $param->getDefaultValue();
			}
		}
		return $args;
	}
580417
private function getCampaignClientStatsData($params)
    {
        /** @var LedgerEntryRepository $repo */
        $repo     = $this->em->getRepository(\MauticPlugin\MauticContactLedgerBundle\Entity\LedgerEntry::class);
        $statData = $repo->getCampaignClientStatsData($params, $params['cacheDir'], false);

        return $statData;
    }
1188784
private function mode($params) {

		$mode = 'params';

	 	if(count($params) > 0 && 0 === count(array_filter(array_keys($params), 'is_string'))) {
	 		$mode = 'bind';
	 	}

	 	return $mode;
	}
882932
public function findOneBy (array $params)
    {
        $entity = $this->er->findOneBy($params);

        if (NULL == $entity) {
            return NULL;
        }

        return $this->getModel($entity);
    }