Gather metadata about the current test to send to saucelabs, making it easier to filter tests
@return array
512271
protected function gatherMetaData($test)
    {
        $metadata = array(
            // Default tags from config
            'tags' => isset($this->config['tags']) ? explode(",", $this->config['tags']) : array(),
            // Default custom data is empty
            'custom-data' => array(),
        );

        // Tag with the current test string reference
        $metadata['tags'][] = "test:" . $test->toString();

        // Add codeception runtime options to custom-data
        $metadata['custom-data']['options'] = $this->options;

        return $metadata;
    }
347366
public static function getMeta(): array
    {
        $self = static::getInstance();
        if (empty($self->meta)) {
            $cacheKey = "db.table.{$self->name}";
            $meta = Cache::get($cacheKey);
            if (!$meta) {
                $schema = DbProxy::getOption('connect', 'name');

                $meta = DbProxy::fetchUniqueGroup(
                    '
                    SELECT 
                      COLUMN_NAME AS `name`,
                      DATA_TYPE AS `type`,
                      COLUMN_DEFAULT AS `default`,
                      COLUMN_KEY AS `key`
                    FROM INFORMATION_SCHEMA.COLUMNS
                    WHERE TABLE_SCHEMA = ?
                      AND TABLE_NAME = ?',
                    [$schema, $self->getName()]
                );
                Cache::set($cacheKey, $meta, Cache::TTL_NO_EXPIRY, ['system', 'db']);
            }
            $self->meta = $meta;
        }
        return $self->meta;
    }
690964
private function getApiEditData()
    {
        $result = [
            'minor' => '',
        ];
        if (null !== $this->title) {
            $result['title'] = $this->title;
        }
        if (null !== $this->id) {
            $result['pageid'] = $this->id;
        }
        $result[$this->modeMap[$this->mode]] = $this->content;

        return $result;
    }
114903
final public function getMetadata()
  {
    $item = Container::cache('target')->getItem('metadata');

    if (!$item->isHit()) {
      $metadata = [];
      $reflection = new \ReflectionClass($this);
      $interfaces = $reflection->getInterfaces();
      $reader = new AnnotationReader();

      foreach ($interfaces as $interface) {
        $methods = $interface->getMethods(\ReflectionMethod::IS_PUBLIC);
        foreach ($methods as $method) {
          $annotation = $reader->getMethodAnnotation($method, 'Drutiny\Annotation\Metadata');
          if (empty($annotation)) {
            continue;
          }
          $metadata[$annotation->name] = $method->name;
        }
      }
      Container::cache('target')->save($item->set($metadata));
    }
    return $item->get();
  }
1049385
public function getMetadata()
    {
        $schema = array();
        foreach ($this->from as $path) {
            if (is_dir($path)) {
                $files = glob($path . '/*.yml');
                foreach ($files as $file) {
                    $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file)));
                }
            } else {
                $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($path)));
            }
        }

        $metadatas = array();
        foreach ($schema as $className => $mappingInformation) {
            $metadatas[] = $this->convertToClassMetadataInfo($className, $mappingInformation);
        }

        return $metadatas;
    }
258831
public function showABDefinitions()
		{
			$xml = $this->call('show_abdefinitions');

			$ab_tests = array();

			foreach ($xml->Data as $ab_test_item) {
				$ab_test = new ABTest;

				$is_testing_subject = $ab_test_item->test_subject == '1' ? TRUE : FALSE;
				$is_testing_from_address = $ab_test_item->test_from_address == '1' ? TRUE : FALSE;
				$is_testing_content = $ab_test_item->test_content == '1' ? TRUE : FALSE;
				$ab_test
					->setId((int)$ab_test_item->id)
					->setName((string)$ab_test_item->name)
					->setDescription((string)$ab_test_item->description)
					->setListId((int)$ab_test_item->list_id)
					->setListName((string)$ab_test_item->list_name)
					->setSegmentationRuleId((int)$ab_test_item->segmentation_rule_id)
					->setSuppressionList((string)$ab_test_item->suppression_list)
					->setMaxTime((int)$ab_test_item->max_time)
					->setMeasuring((string)$ab_test_item->measuring)
					->setNumSamples((int)$ab_test_item->num_samples)
					->setSampleSize((int)$ab_test_item->sample_size)
					->setSampleType((string)$ab_test_item->sample_type)
					->setTestSubject((boolean)$is_testing_subject)
					->setTestFromAddress((boolean)$is_testing_from_address)
					->setTestContent((boolean)$is_testing_content)
					->setTestEndsWhen((string)$ab_test_item->test_ends_when)
					->setThreshold((int)$ab_test_item->threshold)
					->setPostTestAction((string)$ab_test_item->post_test_action);
				$ab_tests[] = $ab_test;
			}

			return $ab_tests;
		}
487832
public function getHelpOutput()
    {
        // print out some "phpUnit-Mode" runtime samples
        $help  = sprintf('%sscan by using your "phpunit.xml" config-file inside "Tests/" directory and using test suite "My Test Suite" directly with normal output-level and no ansi-colors:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> <comment>./Tests/phpunit.xml</comment> --phpunit-config-suite "<comment>My Test Suite</comment>" --output-level <comment>1</comment> --no-ansi%s', PHP_EOL);
        $help .= sprintf('%sscan by using your "phpunit.xml" config-file inside "Tests/" directory without any given testSuite (so first suite will taken) with normal output-level and no ansi-colors:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> <comment>./Tests/phpunit.xml</comment> --output-level <comment>1</comment> --no-ansi%s', PHP_EOL);
        $help .= sprintf('%ssame scan with maximum output-level and disabled ansi output:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> <comment>./Tests/phpunit.xml</comment> --output-level <comment>2</comment>%s', PHP_EOL);

        // print out some "raw-Mode" runtime samples
        $help .= sprintf('%sscan by using raw-mode, using "Tests/" directory as base scan path, autoload file "vendor/autoload.php" and exclude "Tests/data/" with normal output-level and no ansi-colors:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> --raw-scan-path <comment>./Tests/phpunit.xml</comment> --raw-autoload-file <comment>vendor/autoload.php</comment> --raw-exclude-path <comment>Tests/data</comment> --output-level <comment>1</comment> --no-ansi%s', PHP_EOL);

        return $help;
    }
444425
private function getMatches(): array
    {
        // Extract URI of current query
        $uri = $this->getRequest()->getUri()->getPath();

        // Extract method of current request
        $method = $this->getRequest()->getMethod();
        $method = strtolower($method);

        // Foreach emulation
        return $this->checkMatches($uri, $method);
    }
350521
private function getAllInfo()
    {
        $data = [
            'id'        => $this->getId(),
            'cover'     => $this->getCover(),
            'title'     => $this->getTitle(),
            'title2'    => $this->getTitle2(),
            'video'     => $this->getVideo(),
            'synopsis'  => $this->getSynopsis(),
            'score'     => $this->getScore(),
            'voter'     => $this->getVoter(),
            'rank'      => $this->getRank(),
            'popularity'=> $this->getPopularity(),
            'members'   => $this->getMembers(),
            'favorite'  => $this->getFavorite(),
        ];

        $data = array_merge($data, $this->getOtherInfo());

        $data2 = [
            'related'        => $this->getRelated(),
            'character'      => $this->getCharacter(),
            'staff'          => $this->getStaff(),
            'song'           => $this->getSong(),
            'review'         => $this->getReview(),
            'recommendation' => $this->getRecommendation(),
        ];

        $data = array_merge($data, $data2);

        return $data;
    }
142654
public function getMetadata(): array
    {
        if ($this->metadata === null) {
            $this->metadata = $this->readMetadata();

            ksort($this->metadata);
        }

        return $this->metadata;
    }
1143251
public function getJavascriptClientData()
    {
        $data = [
            'routes' => [
                'prefixes' => config('tddd.routes.prefixes'),
            ],

            'project_id' => request()->get('project_id'),

            'test_id' => request()->get('test_id'),

            'root' => config('tddd.root'),
        ];

        return json_encode($data);
    }
654459
public function getClassMetadata()
    {
        $class = $this->class;
        if ($this->classMetadata === null) {
            $classMetadata = $this->metadata->loadMetadataForClass($class);
            $this->classMetadata = $classMetadata;
        }

        return $this->classMetadata;
    }
343471
public function getMetadata()
    {
        if (isset($this->raw->metadata)) {
            if (is_object($this->raw->metadata)) {
                return (array) $this->raw->metadata;
            }

            return $this->raw->metadata;
        }

        return null;
    }
967209
public function getReport()
	{
		if (!isset($this->report))
		{
			$tests = array();

			foreach ($this->getTests() as $key => $audit)
			{
				if (!isset($tests[$key]))
				{
					$tests[$key] = array(
						'name'   => $audit->name(),
						'total'  => 0,
						'totals' => array(
							'skipped' => 0,
							'passed'  => 0,
							'failed'  => 0
						)
					);
				}

				$tests[$key]['totals']['skipped'] = Result::all()
					->whereEquals('scope', $this->scope)
					->whereEquals('test_id', $key)
					->whereEquals('status', 0)
					->total();

				$tests[$key]['totals']['passed'] = Result::all()
					->whereEquals('scope', $this->scope)
					->whereEquals('test_id', $key)
					->whereEquals('status', 1)
					->total();

				$tests[$key]['totals']['failed'] = Result::all()
					->whereEquals('scope', $this->scope)
					->whereEquals('test_id', $key)
					->whereEquals('status', -1)
					->total();

				$tests[$key]['total'] += $tests[$key]['totals']['skipped'];
				$tests[$key]['total'] += $tests[$key]['totals']['passed'];
				$tests[$key]['total'] += $tests[$key]['totals']['failed'];
			}

			$this->report = $tests;
		}

		return $this->report;
	}
927543
public function meta()
    {
        return [
            'Connection' => e($this->meta['queue']->connection),
            'Queue' => e($this->meta['queue']->tube),
            'Driver' => e($this->meta['queue']->driver),
            'Your threshold' => e($this->meta['queue']->alert_pending_jobs_greater_than),
            'Actual pending job count' => e($this->meta['pending_job_count']),
        ];
    }
1338403
protected function getClassMetadata()
    {
        $classes = array();
        foreach ($this->_repositories as $repository) {
            $classes[] = $repository->getClassMetadata();
        }
        return $classes;
    }
831300
public function getMeta()
    {
        if (isset($this->_contextConfig['site']['meta'])) {
            return array_merge($this->_contextConfig['site']['meta'],$this->_data['meta']);
        } else {
            return $this->_data['meta'];
        }
    }