Analyse the 'file' key from the backtrace step.

@return string
The generated dom.
766467
protected function fileToOutput()
    {
        $stepData = $this->parameters[static::PARAM_DATA];
        if (isset($stepData[static::TRACE_FILE]) === true) {
            return $this->pool->render->renderSingleChild(
                $this->dispatchEventWithModel(
                    __FUNCTION__ . static::EVENT_MARKER_END,
                    $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Model')
                        ->setData($stepData[static::TRACE_FILE])
                        ->setName('File')
                        ->setNormal($stepData[static::TRACE_FILE])
                        ->setType(static::TYPE_STRING . strlen($stepData[static::TRACE_FILE]))
                )
            );
        }

        return '';
    }
112752
public function key()
    {
        if (null === $this->singular || '' === $this->singular) {
            return false;
        }

        // Prepend context and EOT, like in MO files
        $key = !$this->context ? $this->singular : $this->context . chr(4) . $this->singular;
        // Standardize on \n line endings
        $key = str_replace(array("\r\n", "\r"), "\n", $key);

        return $key;
    }
33965
protected function getPreviewCode()
    {
        $file = file(self::$stack['file']);
        $line = self::$stack['line'];

        $start = ($line - 5 >= 0) ? $line - 5 : $line - 1;
        $end = ($line - 5 >= 0) ? $line + 4 : $line + 8;

        for ($i = $start; $i < $end; $i++) {
            if (! isset($file[$i])) {
                continue;
            }

            $text = trim($file[$i]);

            if ($i == $line - 1) {
                self::$stack['preview'] .=
                    "<span class='jst-line'>" . ($i + 1) . '</span>' .
                    "<span class='jst-mark text'>" . $text . '</span><br>';
                continue;
            }

            self::$stack['preview'] .=
                "<span class='jst-line'>" . ($i + 1) . '</span>' .
                "<span class='text'>" . $text . '</span><br>';
        }
    }
1261201
private function filesFromKey()
    {
        try {
            return $this->manager->files()[$this->fileName];
        } catch (\ErrorException $e) {
            if ($this->confirm(sprintf('Language file %s.php not found, would you like to create it?', $this->fileName))) {
                $this->manager->createFile(str_replace($this->packageName.'::', '', $this->fileName));
            }

            return [];
        }
    }
1210169
private function getFilesContainingOldKey()
    {
        $affectedFiles = [];

        foreach ($this->manager->getAllViewFilesWithTranslations() as $file => $keys) {
            foreach ($keys as $key) {
                if ($key == $this->argument('oldKey')) {
                    $affectedFiles[$file][] = $key;
                }
            }
        }

        return $affectedFiles;
    }
562400
public function get_value() {

        // Wait until DOM and JS is ready.
        $this->session->wait(behat_base::get_timeout(), behat_base::PAGE_READY_JS);

        // Get the label to restrict the files to this single form field.
        $fieldlabel = $this->get_field_locator();

        // Get the name of the current directory elements.
        $xpath = "//label[contains(., '" . $fieldlabel . "')]" .
            "/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' fitem ')]" .
            "/descendant::div[@data-fieldtype = 'filemanager']" .
            "/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' fp-filename ')]";

        // We don't need to wait here, also we don't have access to protected
        // contexts find* methods.
        $files = $this->session->getPage()->findAll('xpath', $xpath);

        if (!$files) {
            return '';
        }

        $filenames = array();
        foreach ($files as $filenode) {
            $filenames[] = $filenode->getText();
        }

        return implode(',', $filenames);
    }
623893
public function loadCallLocationInfo()
    {
        $this->callFile = null;
        $this->callLine = null;

        $backtraceFlags = DEBUG_BACKTRACE_PROVIDE_OBJECT;
        if (version_compare(PHP_VERSION, '5.3.6', '>=')) {
            $backtraceFlags = DEBUG_BACKTRACE_IGNORE_ARGS;
        }

        $backtrace = debug_backtrace($backtraceFlags);

        $backtraceCount = count($backtrace);
        $idx = $backtraceCount - 1;
        $found = false;

        $container = $this->application->container;

        $helpers = array_merge(
            $container->getParameter('helpers'),
            $container->hasParameter('extra_helpers') ? $container->getParameter('extra_helpers') : array()
        );

        while ($idx > 0 && !$found) {
            $callable = isset($backtrace[$idx]['class']) ? $backtrace[$idx]['class'] . ':' . $backtrace[$idx]['function'] : $backtrace[$idx]['function'];

            if (in_array($callable, $helpers)) {
                $this->callFile = isset($backtrace[$idx]['file']) ? $backtrace[$idx]['file'] : null;
                $this->callLine = isset($backtrace[$idx]['line']) ? $backtrace[$idx]['line'] : null;

                if (!is_null($this->callLineFileCallback)) {
                    list($this->callFile, $this->callLine) = call_user_func_array($this->callLineFileCallback, array(
                        $this->callFile,
                        $this->callLine
                    ));
                }

                $xdebugLink = ini_get('xdebug.file_link_format');
                if (!empty($xdebugLink)) {
                    $this->xdebugLink = str_replace(array('%f', '%l'), array($this->callFile, $this->callLine), $xdebugLink);
                }

                return;
            }

            $idx--;
        }

    }
1034708
public function getFilesInUse()
    {
        $list = ArrayList::create();

        // Check SiteTreeFileExtension
        if ($this->owner instanceof Folder) {
            // Join on tracking table
            $parents = static::nestedFolderIDs($this->owner->ID);
            $linkQuery = FileLink::get()->sql($linkParams);
            $list = File::get()->filter('ParentID', $parents)
                ->innerJoin(
                    "({$linkQuery})",
                    '"File"."ID" = "FileLinkTracking"."LinkedID"',
                    'FileLinkTracking',
                    20,
                    $linkParams
                );
        }

        // Allow extension
        $this->owner->extend('updateFilesInUse', $list);
        return $list;
    }
620486
public static function getDocRoot(): string
    {
        $result = '.';
        $root = Arr::key('DOCUMENT_ROOT', $_SERVER, true);

        if ($root) {
            $result = $root;
        }

        $result = FS::clean($result);
        $result = FS::real($result);

        if (!$result) {
            $result = FS::real('.'); // @codeCoverageIgnore
        }

        return $result;
    }
909950
public function getPrivateKey()
    {
        if (!is_null($this->privateKey)) {
            return $this->privateKey;
        }

        return $this->privateKey = file_get_contents($this->getPrivateKeyFilePath());
    }
761427
public static function inspect()
	{
		$backtrace = debug_backtrace();

		// If being called from within, show the file above in the backtrack
		if (strpos($backtrace[0]['file'], 'core/classes/debug.php') !== false)
		{
			$callee = $backtrace[1];
			$label = \Inflector::humanize($backtrace[1]['function']);
		}
		else
		{
			$callee = $backtrace[0];
			$label = 'Debug';
		}

		$arguments = func_get_args();
		$total_arguments = count($arguments);

		$callee['file'] = \Fuel::clean_path($callee['file']);

		if ( ! static::$js_displayed)
		{
			echo <<<JS
<script type="text/javascript">function fuel_debug_toggle(a){if(document.getElementById){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}}else{if(document.layers){if(document.id.display=="none"){document.id.display="block"}else{document.id.display="none"}}else{if(document.all.id.style.display=="none"){document.all.id.style.display="block"}else{document.all.id.style.display="none"}}}};</script>
JS;
			static::$js_displayed = true;
		}
		echo '<div class="fuelphp-inspect" style="font-size: 13px;background: #EEE !important; border:1px solid #666; color: #000 !important; padding:10px;">';
		echo '<h1 style="border-bottom: 1px solid #CCC; padding: 0 0 5px 0; margin: 0 0 5px 0; font: bold 120% sans-serif;">'.$callee['file'].' @ line: '.$callee['line'].'</h1>';
		echo '<pre style="overflow:auto;font-size:100%;">';
		$i = 0;
		foreach ($arguments as $argument)
		{
			echo '<strong>'.$label.' #'.(++$i).' of '.$total_arguments.'</strong>:<br />';
				echo static::format('...', $argument);
			echo '<br />';
		}

		echo "</pre>";
		echo "</div>";
	}
1150603
public function getFileInfo() {
    // Create a build list tag from the filename.
    $filename_pieces = explode('.', $this->component_data['filename']);
    if ($filename_pieces[0] == '%module') {
      // Take off the module name from the front.
      array_shift($filename_pieces);
    }
    if (in_array(end($filename_pieces), ['php', 'inc'])) {
      // Take off a file extenstion.
      array_pop($filename_pieces);
    }
    // Implode whatever's left.
    $file_key_tag = implode('.', $filename_pieces);

    return array(
      'path' => '', // Means base folder.
      'filename' => $this->component_data['filename'],
      'body' => $this->fileContents(),
      'build_list_tags' => ['code', $file_key_tag],
    );
  }
1343287
function file()
    {
        $data    = implode('', $this -> datasec);
        $ctrldir = implode('', $this -> ctrl_dir);

        return
            $data .
            $ctrldir .
            $this -> eof_ctrl_dir .
            pack('v', sizeof($this -> ctrl_dir)) .  // total # of entries "on this disk"
            pack('v', sizeof($this -> ctrl_dir)) .  // total # of entries overall
            pack('V', strlen($ctrldir)) .           // size of central dir
            pack('V', strlen($data)) .              // offset to start of central dir
            "\x00\x00";                             // .zip file comment length
    }
39326
public static function getCurrentFileHashLine()
    {
        $args = func_get_args();

        $deep = &$args[0];

        $backtrace = debug_backtrace();
        $backtrace = &$backtrace[$deep ? $deep : 0];

        if ($backtrace) {
            return sprintf(
                "%s#%s",
                $backtrace["file"],
                $backtrace["line"]
            );
        }

        return false;
    }
656671
protected function getTrace()
    {
        $backtrace = debug_backtrace();
        $index = null;
        $hasNull = false;
        $realClassName = static::__getRealClassName();
        foreach($backtrace as $i => $item)
        {
            if($realClassName === $item['class'])
            {
                $index = $i + 2;
                break;
            }
        }
        if(null === $index)
        {
            return [];
        }
        return array_splice($backtrace, $index);
    }
1078287
public function getStackTrace()
    {
        if (!isset($this->message[4]) || empty($this->message[4])) {
            return null;
        }

        $traces = array_map(function ($trace) {
            return "in {$trace['file']}:{$trace['line']}";
        }, $this->message[4]);
        return implode("\n", $traces);
    }
548078
public function getTotalDataRowCount() {
        if (empty($this->file_data)) {
            return false;
        }

        $data = $this->file_data;

        $this->_detect_and_remove_sep_row_from_data($data);

        $pattern = sprintf('/%1$s[^%1$s]*%1$s/i', $this->enclosure);
        preg_match_all($pattern, $data, $matches);

        /** @var array[] $matches */
        foreach ($matches[0] as $match) {
            if (empty($match) || (strpos($match, $this->enclosure) === false)) {
                continue;
            }

            $replace = str_replace(["\r", "\n"], '', $match);
            $data = str_replace($match, $replace, $data);
        }

        $headingRow = $this->heading ? 1 : 0;

        $count = substr_count($data, "\r")
            + substr_count($data, "\n")
            - substr_count($data, "\r\n")
            - $headingRow;

        return $count;
    }