Adds some coverage data to the collector.

@param  array $coverage Some coverage data.
@return array           The current coverage data.
348336
public function add($coverage)
    {
        if (!$coverage) {
            return;
        }
        foreach ($coverage as $file => $data) {
            $this->addFile($file, $data);
        }
        return $this->_coverage;
    }
676215
private function extend(array $backup)
    {
        $preset = $this->presetStore->getPreset($this->application, $this->version, $this->options);

        return array_merge($preset, $backup);
    }
1113669
private function collectFunction(array $start, array $end, array $declaration, int $coverage = 0) : void
    {
        $this->fileCoverage['fnMap'][] = [
            'name' => '(anonymous_' . $this->funcCount . ')',
            'decl' => $declaration,
            'loc' => ['start' => $start, 'end' => $end],
        ];

        $this->fileCoverage['f'][] = $coverage;

        // Collect statements as well, one for entire function, one just for function declaration
        $this->collectStatement($start, $end, $coverage);
        $this->collectStatement($declaration['start'], $declaration['end'], $coverage);

        ++$this->funcCount;
    }
1312359
public function generateReport(CodeCoverage $coverage)
    {
        $format = $this->config['report']['format'];
        $options = $this->config['report']['options'];

        $report = $this->factory->create($format, $options);
        $output = $report->process($coverage);

        if ('text' === $format) {
            print_r($output);
        }
    }
900105
public function insert(array $set)
    {
        if (empty($set)) {
            return null;
        }
        if ($this->accum !== null) {
            $this->accum[] = $set;
            if (count($this->accum) >= $this->sizeAccum) {
                $this->multiInsert($this->accum, true);
                $this->accum = array();
            }
            $this->lastIdAccum++;
            return $this->lastIdAccum;
        }
        if ($this->map) {
            $set = $this->map->set($set);
        }
        if ($this->fake) {
            return $this->fake->insert($set);
        }
        $pattern = 'INSERT INTO ?t (?cols) VALUES (?ln)';
        $data = array($this->name, array_keys($set), array_values($set));
        return $this->db->query($pattern, $data)->id();
    }
1272515
public function add_fields( $fields )
	{
		if ( !is_array( $fields ) )
		{
			$fields = array( $fields );
		}
		
		// merge the new values with the existing ones.
		$this->fields = array_merge( $this->fields, $fields ); 
	
		// return self so we can continue running the next function
		return $this;
	}
897939
public static function extend(): array
    {
        $merged = [];

        foreach (func_get_args() as $array) {
            foreach ($array as $key => $value) {
                if (is_array($value) && static::has($merged, $key) && is_array($merged[$key])) {
                    $merged[$key] = static::extend($merged[$key], $value);
                } else {
                    $merged[$key] = $value;
                }
            }
        }

        return $merged;
    }
720644
function addDerivedInfo(coverage) {
    Object.keys(coverage).forEach(function (k) {
      addDerivedInfoForFile(coverage[k]);
    });
  }
543881
protected function expandAggregateInspectionData(InspectionInterface $inspection)
    {
        if ($inspection instanceof AggregateInspection) {
            return array_map(
                function (InspectionInterface $inspection) {
                    return [
                        static::PARAM_INSPECTION       => $inspection,
                        static::PARAM_INSPECTION_DATA  => $this->expandAggregateInspectionData($inspection),
                        static::PARAM_INSPECTION_CLASS => get_class($inspection),
                    ];
                },
                $inspection->getInspectionData()
            );
        }

        return $inspection->getInspectionData();
    }
525960
public function addFields($fields)
    {
        foreach ($fields as $field) {
            if (is_array($field)) {
                $this->addField(...$field);
            } else {
                $this->addField($field);
            }
        }

        return $this;
    }
1273952
public function addConditions( $conditions )
	{
		if( !is_array( $conditions ) )
			throw new InvalidArgumentException( 'An Array should be given.' );
		foreach( $conditions as $condition )
			$this->addCondition( $condition );
	}
863390
public function contacts(array $contact)
    {
        if (! isset($this->data->contacts)) {
            $this->data->contacts = [];
        }

        return $this->data->contacts[] = (object) $contact;
    }
24064
public function newFromElasticResults(Array $hit)
    {
        $instance = $this->newInstance(array(), true);

        $attributes = $hit['_source'];

        $instance->isDocument = true;

        if (isset($hit['_score'])) {
            $instance->documentScore = $hit['_score'];
        }

        if (isset($hit['_version'])) {
            $instance->documentVersion = $hit['_version'];
        }

        if (isset($hit['highlight'])) {
            foreach ($hit['highlight'] as $field => $value) {
                $instance->highlighted[$field] = $value[0];
            }
        }

        $instance->setRawAttributes($attributes, true);

        return $instance;
    }
340464
def add_coverage(self, qname, sname, qcover, scover=None):
        """"""
        self.alignment_coverage.loc[qname, sname] = qcover
        if scover:
            self.alignment_coverage.loc[sname, qname] = scover
15367
public function aggregateCoverageInformation()
	{
		if ( !isset($_GET[self::TEST_ID_VARIABLE]) ) {
			return '';
		}

		$coverage = array();
		$filter = new \PHP_CodeCoverage_Filter();

		foreach ( $this->getDataDirectoryFiles() as $data_directory_file ) {
			$raw_coverage_data = unserialize(file_get_contents($data_directory_file));

			foreach ( $raw_coverage_data as $file => $lines ) {
				if ( !$filter->isFile($file) ) {
					continue;
				}

				if ( !isset($coverage[$file]) ) {
					$coverage[$file] = array('md5' => md5_file($file), 'coverage' => $lines);
				}
				else {
					foreach ( $lines as $line => $flag ) {
						if ( !isset($coverage[$file]['coverage'][$line])
							|| $flag > $coverage[$file]['coverage'][$line]
						) {
							$coverage[$file]['coverage'][$line] = $flag;
						}
					}
				}
			}
		}

		return serialize($coverage);
	}
785126
function coverage(): Result {
    $path = (string) getenv('PATH');
    $vendor = (string) realpath(trim(`{$this->composer} global config bin-dir --absolute`));
    if (strpos($path, $vendor) === false) putenv("PATH=$vendor".PATH_SEPARATOR.$path);
    return $this->_exec('coveralls var/coverage.xml');
  }
813523
public function add(array $data)
    {
        $result = array();
        $this->hook->attach('wishlist.add.product.before', $data, $result, $this);

        if (!empty($result)) {
            return (array) $result;
        }

        if ($this->wishlist->exists($data)) {
            return $this->getResultErrorExists($data);
        }

        if ($this->wishlist->exceedsLimit($data['user_id'], $data['store_id'])) {
            return $this->getResultErrorExceeds($data);
        }

        $data['wishlist_id'] = $this->wishlist->add($data);

        if (empty($data['wishlist_id'])) {
            return $this->getResultError();
        }

        $result = $this->getResultAdded($data);
        $this->hook->attach('wishlist.add.product.after', $data, $result, $this);
        return (array) $result;
    }