Skip to content

Instantly share code, notes, and snippets.

@afilina
Created November 7, 2025 14:54
Show Gist options
  • Select an option

  • Save afilina/fc1630a455ef98e1c9a2e8c30660c2ac to your computer and use it in GitHub Desktop.

Select an option

Save afilina/fc1630a455ef98e1c9a2e8c30660c2ac to your computer and use it in GitHub Desktop.
array_sum, array_product
/intervention/image/src/Colors/Cmyk/Color.php
return 0 === array_sum([
$this->cyan()->value(),
$this->magenta()->value(),
$this->yellow()->value(),
]);
/shardj/zf1-future/library/Zend/Barcode/Renderer/Pdf.php
array_sum($widths) / $font->getUnitsPerEm()
/shardj/zf1-future/library/Zend/Barcode/Object/Postnet.php
$sum = array_sum(str_split($text));
/shardj/zf1-future/library/Zend/Text/Table/Row.php
$colSpan - 1 + array_sum(array_slice($columnWidths,
$colNum,
$colSpan))
/shardj/zf1-future/library/Zend/Text/Table/Row.php
$remainingWidth = (count($columnWidths) - $colNum - 1) +
array_sum(array_slice($columnWidths,
$colNum));
/illuminate/database/Query/Processors/SQLiteProcessor.php
$hasPrimaryKey = array_sum(array_column($results, 'primary')) === 1;
/widmogrod/php-functional/test/Functional/ReverseTest.php
return array_product($args);
/phing/phing/src/Phing/Util/Series.php
return array_sum($this->getTimes());
/globalcitizen/php-iban/php-iban.php
return array_sum(str_split($checksum)) % 10;
/prestashop/ps_linklist/ps_linklist.php
return array_sum([
parent::_clearCache($this->templateFile),
parent::_clearCache($this->templateFileColumn),
]);
/prestashop/statscheckup/statscheckup.php
$scores['average'] = array_sum($scores) / $divisor;
/prestashop/statscheckup/statscheckup.php
$totals['average'] = array_sum($totals) / $divisor;
/prestashop/dashtrends/dashtrends.php
$summing['sales'] = array_sum($data['sales']);
/prestashop/dashtrends/dashtrends.php
$summing['orders'] = array_sum($data['orders']);
/prestashop/dashtrends/dashtrends.php
$summing['visits'] = array_sum($data['visits']);
/prestashop/dashtrends/dashtrends.php
$summing['net_profits'] = array_sum($data['net_profits']);
/prestashop/dashtrends/dashtrends.php
$calibration = array_sum($this->dashboard_data[$chart_key]) / $count;
/hoa/math/Source/Context.php
return array_sum($arguments) / count($arguments);
/hoa/math/Source/Context.php
return array_sum(func_get_args());
/rmccue/requests/src/Requests.php
$first_file_start = array_sum(unpack('v2', substr($gz_data, 26, 4)));
/php-http/httplug-bundle/src/Collector/Collector.php
return array_sum(array_map(fn (Stack $stack) => $this->countStackMessages($stack), $this->getClientRootStacks($client)));
/php-http/httplug-bundle/src/Collector/Collector.php
return 1 + array_sum(array_map(fn (Stack $child) => $this->countStackMessages($child), $this->getChildrenStacks($stack)));
/tracy/tracy/src/Tracy/Bar/dist/warnings.tab.phtml
$sum = array_sum($data)
/phpmd/phpmd/src/main/php/PHPMD/Renderer/HTMLRenderer.php
$sum = array_sum($items);
/fakerphp/faker/src/Calculator/Isbn.php
11 - array_sum($digits) % 11
/fakerphp/faker/src/Calculator/Luhn.php
$sum += array_sum(str_split($number[$i] * 2));
/promphp/prometheus_client_php/src/Prometheus/Storage/Redis.php
array_sum($samples),
/promphp/prometheus_client_php/src/Prometheus/Storage/InMemory.php
array_sum(array_column($values, 'value')),
/promphp/prometheus_client_php/src/Prometheus/Storage/RedisNg.php
array_sum($samples),
/promphp/prometheus_client_php/src/Prometheus/Storage/APC.php
array_sum($samples),
/promphp/prometheus_client_php/src/Prometheus/Storage/APCng.php
array_sum($samples),
/promphp/prometheus_client_php/src/Prometheus/Storage/PDO.php
array_sum(array_column($samples, 'value')),
/wp-cli/php-cli-tools/lib/cli/table/Ascii.php
$widths && $max_width && array_sum( $widths ) > $max_width
/wp-cli/php-cli-tools/lib/cli/table/Ascii.php
$width = $max_width - array_sum( $widths );
/wp-cli/wp-cli/bundle/rmccue/requests/src/Requests.php
$first_file_start = array_sum(unpack('v2', substr($gz_data, 26, 4)));
/wp-cli/import-command/src/Import_Command.php
array_sum( $shortestavg ) / count( $shortestavg )
/infection/infection/src/TestFramework/Coverage/JUnit/JUnitTestCaseTimeAdder.php
return array_sum(
$this->uniqueTestLocations(),
);
/predis/predis/src/Cluster/SlotMap.php
return array_sum(array_map(
function ($slotRange) {
return $slotRange->count();
},
$this->slotRanges
));
/james-heinrich/getid3/getid3/module.audio-video.matroska.php
$block_data['lace_frames_size'][] = $element['end'] - $this->current_offset - array_sum($block_data['lace_frames_size']);
/james-heinrich/getid3/getid3/module.audio.amr.php
$info['playtime_seconds'] = array_sum($thisfile_amr['frame_mode_count']) * 0.020;
/james-heinrich/getid3/getid3/module.audio.mp3.php
array_sum($ActualFrameLengthValues) / count($ActualFrameLengthValues)
/james-heinrich/getid3/getid3/module.audio.mp3.php
$info['mpeg']['audio']['frame_count'] = array_sum($Distribution['bitrate']);
/growthbook/growthbook/src/Growthbook.php
$sum = array_sum($weights);
/vimeo/psalm/src/Psalm/IssueBuffer.php
$total_count = array_sum(self::$fixable_issue_counts);
/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php
array_sum($mixed_counts),
/vimeo/psalm/src/Psalm/Internal/Codebase/DataFlowGraph.php
$count = array_sum($destination_counts);
/vimeo/psalm/src/Psalm/Config/Creator.php
array_sum($filtered_issues) > 0.5
/composer/composer/src/Composer/Platform/Version.php
return strlen($alpha) * (-ord('a') + 1) + array_sum(array_map('ord', str_split($alpha)));
/composer/composer/src/Composer/Command/BumpCommand.php
$changeCount = array_sum(array_map('count', $updates));
/php-debugbar/php-debugbar/src/DebugBar/DataCollector/ObjectCountCollector.php
fn($a, $b) => array_sum($b) <=> array_sum($a)
/php-debugbar/php-debugbar/src/DebugBar/DataCollector/ObjectCountCollector.php
fn($a, $b) => array_sum($b) <=> array_sum($a)
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$suitesGroupTotal = array_sum($suiteNameToGroupCount);
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
array_sum($testNameToSize) + array_sum($suiteNameToSize)
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
array_sum($testNameToSize) + array_sum($suiteNameToSize)
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$ceilSuiteGroupTotal = array_sum($ceilSuiteNameToGroupCount);
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
array_sum($testNameToSize) / $ceilTestGroupTotal
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$floorSuiteGroupTotal = array_sum($floorSuiteNameToGroupCount);
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
array_sum($testNameToSize) / $floorTestGroupTotal
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
array_sum($suiteNameToGroupCount) == $total
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$suiteTime = array_sum($tests);
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$groups[][$suiteName] = array_sum($suiteTests);
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$groups[][$newSuiteName] = array_sum($tests);
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
array_sum($group) < $timeMaximum && !empty($testNameToSizeForUse)
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$groupSize = array_sum($group);
/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/Sorter/ParallelGroupSorter.php
$size = array_sum($tests);
/respect/validation/library/Rules/Nif.php
$increaser = array_sum(str_split((string) ($digit * 2)));
/respect/validation/library/Rules/Cnpj.php
array_sum($digits) < 1
/respect/validation/library/Rules/PortugueseNif.php
$sum = array_sum($sumTerms);
/pagerfanta/core/Adapter/ConcatenationAdapter.php
return array_sum($this->adaptersNbResultsCache);
/pagerfanta/pagerfanta/lib/Core/Adapter/ConcatenationAdapter.php
return array_sum($this->adaptersNbResultsCache);
/maatwebsite/excel/src/ChunkReader.php
array_sum($totalRows)
/phpbench/phpbench/lib/Expression/Func/SumFunction.php
array_sum($values->nonNullPhpValues())
/phpbench/phpbench/lib/Model/Summary.php
return array_sum($this->stats['sum']);
/phpbench/phpbench/lib/Math/Kde.php
$result[$i] = array_sum($energy);
/phpbench/phpbench/lib/Math/Statistics.php
$sum = array_sum($values);
/phpbench/phpbench/lib/Math/Statistics.php
$mode = array_sum($modes) / count($modes);
/phpbench/phpbench/lib/Math/Distribution.php
fn () => array_sum($this->samples),
/yiisoft/yii2-debug/src/views/default/panels/db/detail.php
$excessiveCallersInfo = "<p><b>$numExcessiveCallers</b> excessive caller" . ($numExcessiveCallers > 1 ? 's' : '')
. ' making '. array_sum($excessiveCallers) .' cals.</p>';
/yiisoft/yii2-gii/src/console/GenerateAction.php
!array_sum($answers)
/yiisoft/yii2/console/widgets/Table.php
$totalFixWidth = array_sum($fixWidths);
/laminas/laminas-text/src/Table/Row.php
$columnWidth = $colSpan - 1 + array_sum(array_slice($columnWidths, $colNum, $colSpan));
/laminas/laminas-text/src/Table/Row.php
$remainingWidth = (count($columnWidths) - $colNum - 1) +
array_sum(array_slice($columnWidths, $colNum));
/masterminds/html5/src/HTML5/Parser/UTF8Utils.php
return array_sum(array_slice($count, 0, 0x80)) + array_sum(array_slice($count, 0xC2, 0x33));
/masterminds/html5/src/HTML5/Parser/UTF8Utils.php
return array_sum(array_slice($count, 0, 0x80)) + array_sum(array_slice($count, 0xC2, 0x33));
/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php
$all_count = array_sum( $this->status_counts );
/dompdf/php-font-lib/src/FontLib/Table/DirectoryEntry.php
return array_sum($table);
/markrogoyski/math-php/tests/Functions/Special/MiscSpecialTest.php
$∑ = array_sum($result);
/solarium/solarium/src/Component/ResponseParser/TermVector.php
fn ($val) => \is_array($val) && \count($val) === array_sum(array_map('\is_string', $val))
/php-ds/php-ds/src/Traits/GenericSequence.php
return array_sum($this->array);
/php-ds/php-ds/src/Set.php
return array_sum($this->toArray());
/smalot/pdfparser/src/Smalot/PdfParser/RawData/RawDataParser.php
$rowlen = array_sum($wb);
/pestphp/pest-plugin-type-coverage/src/Logging/JsonLogger.php
array_sum(array_column($this->logs, 'percentage')) / count($this->logs),
/pestphp/pest-plugin-type-coverage/src/Plugin.php
$coverage = array_sum($totals) / count($totals);
/pestphp/pest-plugin-mutate/src/Repositories/MutationRepository.php
return array_sum(array_map(fn (MutationTestCollection $testCollection): int => $testCollection->count(), $this->tests));
/pestphp/pest-plugin-mutate/src/Repositories/MutationRepository.php
return array_sum(array_map(fn (MutationTestCollection $testCollection): int => $testCollection->untested(), $this->tests));
/pestphp/pest-plugin-mutate/src/Repositories/MutationRepository.php
return array_sum(array_map(fn (MutationTestCollection $testCollection): int => $testCollection->tested(), $this->tests));
/pestphp/pest-plugin-mutate/src/Repositories/MutationRepository.php
return array_sum(array_map(fn (MutationTestCollection $testCollection): int => $testCollection->timedOut(), $this->tests));
/pestphp/pest-plugin-mutate/src/Repositories/MutationRepository.php
return array_sum(array_map(fn (MutationTestCollection $testCollection): int => $testCollection->uncovered(), $this->tests));
/pestphp/pest-plugin-mutate/src/Repositories/MutationRepository.php
return array_sum(array_map(fn (MutationTestCollection $testCollection): int => $testCollection->notRun(), $this->tests));
/pestphp/pest-plugin-mutate/src/Support/Printers/DefaultPrinter.php
$timeElapsedInSlowTests = array_sum(array_map(fn (MutationTest $testResult): float => $testResult->duration(), $slowTests));
/mpdf/mpdf/src/Mpdf.php
$ttl = array_sum($table['l']);
/mpdf/mpdf/src/Mpdf.php
$newhr[$i] = $extH - array_sum($newhr);
/mpdf/mpdf/src/Mpdf.php
$table['h'] = array_sum($heightrow);
/mpdf/mpdf/src/Mpdf.php
$startxref += array_sum($changes);
/zordius/lightncandy/src/Exporter.php
array_sum(array_map(function ($name) use (&$exports, $methods) {
$n = 0;
foreach ($methods[$name][1] as $child => $count) {
if (!in_array($child, $exports)) {
$exports[] = $child;
$n++;
}
}
return $n;
}, $exports)) == 0
/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php
$scale += array_sum(array_map(abs, $this->d));
/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php
$x_sum = array_sum($xValues);
/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php
$y_sum = array_sum($yValues);
/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php
$x_sum = array_sum($xValues);
/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php
$y_sum = array_sum($yValues);
/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php
return array_sum($sumArgs);
/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php
return array_sum($wrkArray);
/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php
$x_sum = array_sum($xValues);
/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php
$y_sum = array_sum($yValues);
/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php
return array_sum(
array_map(
fn ($value): float|int => $value ** 2,
$values
)
);
/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php
$sumValuesX = array_sum($xValues);
/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php
$sumValuesY = array_sum($yValues);
/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php
return array_sum($wrkArray);
/spomky-labs/pki-framework/src/X501/ASN1/Name.php
return array_sum(array_map(static fn (RDN $rdn): int => count($rdn->allOf($oid)), $this->rdns));
/laravel/nightwatch/src/Sensors/CommandSensor.php
array_sum($this->commandState->stageDurations),
/laravel/nightwatch/src/Sensors/RequestSensor.php
array_sum($this->requestState->stageDurations),
/laravel/prompts/src/TextareaPrompt.php
array_sum($currentLines) - $this->cursorPosition
/laravel/prompts/src/TextareaPrompt.php
$this->cursorPosition = array_sum($fullLines) + $newColumn;
/laravel/prompts/src/TextareaPrompt.php
array_sum($currentLines) - $this->cursorPosition
/laravel/prompts/src/TextareaPrompt.php
$this->cursorPosition = array_sum($currentLines) + $newColumn;
/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php
$hasPrimaryKey = array_sum(array_column($results, 'primary')) === 1;
/colinmollenhour/cache-backend-redis/stats.php
array_sum($tagSizes) / count($tagSizes),
/colinmollenhour/cache-backend-redis/stats.php
array_sum($tagSizes),
/league/flysystem-ftp/FtpAdapter.php
return array_sum(array_map(static function ($p) {
return (int) $p;
}, str_split($part)));
/mk-j/php_xlsxwriter/xlsxwriter.class.php
$days += array_sum( array_slice($mdays, 0, $month-1 ) );
/fzaninotto/faker/src/Faker/Provider/Barcode.php
11 - array_sum($digits) % 11
/fzaninotto/faker/src/Faker/Calculator/Luhn.php
$sum += array_sum(str_split($number[$i] * 2));
/kalnoy/nestedset/src/QueryBuilder.php
return array_sum($this->countErrors());
/azjezz/psl/src/Psl/Async/KeyedSemaphore.php
return array_sum($this->ingoing);
/felixfbecker/language-server-protocol/src/Position.php
return array_sum(array_map('strlen', $slice)) + count($slice) + $this->character;
/brick/money/src/Money.php
$total = array_sum($ratios);
/brick/money/src/Money.php
$total = array_sum($ratios);
/brick/money/src/Money.php
$total = array_sum($ratios);
/phploc/phploc/src/Analyser.php
!empty($values) ? array_sum($values) / count($values) : 0,
/jasny/twig-extensions/src/ArrayExtension.php
return isset($array) ? array_sum((array)$array) : null;
/jasny/twig-extensions/src/ArrayExtension.php
return isset($array) ? array_product((array)$array) : null;
/rector/rector/rules/Carbon/Rector/FuncCall/DateFuncCallToCarbonRector.php
return array_product($multipliers);
/cmgmyr/phploc/src/Publisher.php
return isset($this->counts[$key]) ? array_sum($this->counts[$key]) : 0;
/phenx/php-font-lib/src/FontLib/Table/DirectoryEntry.php
return array_sum($table);
/kreait/firebase-php/src/Firebase/DynamicLink/EventStatistics.php
return array_sum(array_column($this->events, 'count'));
/roots/wordpress-no-content/wp-includes/class-wp-text-diff-renderer-table.php
$this->difference_cache[ $difference_key ] = array_sum( array_map( array( $this, 'difference' ), $chars1, $chars2 ) );
/roots/wordpress-no-content/wp-includes/cron.php
return array_sum( $results );
/roots/wordpress-no-content/wp-includes/ID3/module.audio-video.matroska.php
$block_data['lace_frames_size'][] = $element['end'] - $this->current_offset - array_sum($block_data['lace_frames_size']);
/roots/wordpress-no-content/wp-includes/ID3/module.audio.mp3.php
array_sum($ActualFrameLengthValues) / count($ActualFrameLengthValues)
/roots/wordpress-no-content/wp-includes/ID3/module.audio.mp3.php
$info['mpeg']['audio']['frame_count'] = array_sum($Distribution['bitrate']);
/roots/wordpress-no-content/wp-includes/Requests/src/Requests.php
$first_file_start = array_sum(unpack('v2', substr($gz_data, 26, 4)));
/roots/wordpress-no-content/wp-admin/includes/class-wp-posts-list-table.php
$total_items = array_sum( $post_counts );
/roots/wordpress-no-content/wp-admin/includes/class-wp-posts-list-table.php
$total_posts = array_sum( (array) $num_posts );
/roots/wordpress-no-content/wp-admin/includes/plugin-install.php
empty( $api->ratings ) || 0 === array_sum( (array) $api->ratings )
/roots/wordpress-no-content/wp-admin/includes/plugin-install.php
! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0
/roots/wordpress-no-content/wp-admin/includes/class-wp-privacy-requests-table.php
array_sum( (array) $counts )
/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php
return array_sum($scores) / count($scores);
/phpspec/phpspec/src/PhpSpec/Formatter/TeamCityFormatter.php
array_sum(
array_map(
static function ($spec) {
return count($spec->getExamples());
},
$event->getSuite()->getSpecifications()
)
)
/phpspec/phpspec/src/PhpSpec/Formatter/ProgressFormatter.php
$targetWidth * $count / array_sum($counts)
/phpspec/phpspec/src/PhpSpec/Loader/Suite.php
return array_sum(array_map('count', $this->specs));
/phpspec/phpspec/src/PhpSpec/Listener/StatisticsCollector.php
return array_sum($this->getCountsHash());
/moneyphp/money/src/Money.php
$total = array_sum($ratios);
/omnipay/common/src/Common/Helper.php
return array_sum(str_split($str)) % 10 === 0;
/setasign/fpdf/tutorial/tuto5.php
array_sum($w),
/setasign/fpdf/tutorial/tuto5.php
array_sum($w),
/nunomaduro/collision/src/Adapters/Phpunit/Style.php
$timeElapsedInSlowTests = array_sum(array_map(fn (TestResult $testResult) => $testResult->duration / 1000, $slowTests));
/nunomaduro/phpinsights/src/Domain/Collector.php
return array_sum($array);
/nunomaduro/phpinsights/src/Domain/Insights/ClassMethodAverageCyclomaticComplexityIsHigh.php
$averageClassComplexity[$file] = array_sum($complexities) / count($complexities);
/imagine/imagine/src/Utils/Matrix.php
$divisor = array_sum($values);
/imagine/imagine/src/Gd/Effects.php
$divisor = array_sum(array_map('array_sum', $sharpenMatrix));
/behat/behat/src/Behat/Behat/Output/Node/Printer/JUnit/JUnitFeaturePrinter.php
$totalCount = 0 === count($stats) ? 0 : (int) array_sum($stats);
/behat/behat/src/Behat/Behat/Output/Node/Printer/CounterPrinter.php
$totalCount = 0 === count($stats) ? 0 : array_sum($stats);
/behat/behat/src/Behat/Behat/Output/Node/Printer/JSON/JSONExercisePrinter.php
$totalCount = 0 === count($stats) ? 0 : (int) array_sum($stats);
/behat/behat/src/Behat/Behat/Output/Node/Printer/JSON/JSONFeaturePrinter.php
$totalCount = 0 === count($stats) ? 0 : (int) array_sum($stats);
/behat/behat/src/Behat/Behat/Output/Node/Printer/JSON/JSONSuitePrinter.php
$totalCount = 0 === count($stats) ? 0 : (int) array_sum($stats);
/doctrine/doctrine-bundle/src/DataCollector/DoctrineDataCollector.php
return $this->invalidEntityCount ??= array_sum(array_map('count', $this->data['errors']));
/doctrine/doctrine-bundle/src/DataCollector/DoctrineDataCollector.php
$total += array_sum($entities);
/doctrine/orm/src/UnitOfWork.php
return array_sum(array_map('count', $this->identityMap));
/doctrine/orm/src/Cache/Logging/StatisticsCacheLogger.php
return array_sum($this->cachePutCountMap);
/doctrine/orm/src/Cache/Logging/StatisticsCacheLogger.php
return array_sum($this->cacheHitCountMap);
/doctrine/orm/src/Cache/Logging/StatisticsCacheLogger.php
return array_sum($this->cacheMissCountMap);
/doctrine/orm/src/Tools/Pagination/Paginator.php
$this->count = (int) array_sum(array_map('current', $this->getCountQuery()->getScalarResult()));
/jms/serializer-bundle/Debug/TraceableEventDispatcher.php
return array_sum(array_column($calls, 'duration')) * 1000;
/jms/serializer-bundle/Debug/DataCollector.php
return array_sum(array_map(function ($l){
return count($l);
}, $this->data['listeners'][$type]));
/jms/serializer-bundle/Debug/DataCollector.php
return array_sum(array_map(function ($l){
return count($l);
}, $this->data['handlers'][$type]));
/maximebf/debugbar/src/DebugBar/DataCollector/ObjectCountCollector.php
fn($a, $b) => array_sum($b) <=> array_sum($a)
/maximebf/debugbar/src/DebugBar/DataCollector/ObjectCountCollector.php
fn($a, $b) => array_sum($b) <=> array_sum($a)
/shopware/core/Framework/App/ShopId/FingerprintComparisonResult.php
$this->score = array_sum(array_map(fn (FingerprintMismatch $mismatch) => $mismatch->score, $mismatchingFingerprints));
/shopware/core/Framework/Demodata/Generator/CustomFieldGenerator.php
$sum = (int) array_sum($relations);
/shopware/core/Framework/Script/Debugging/ScriptTraces.php
$took += array_sum(array_column($scripts, 'took'));
/shopware/core/Profiling/Doctrine/ConnectionProfiler.php
return array_sum(array_map('count', $this->data['queries']));
/shopware/core/Profiling/Doctrine/ConnectionProfiler.php
return array_sum(
array_map(
static fn (array $connectionGroupedQueries) => \count($connectionGroupedQueries),
$this->getGroupedQueries()
)
);
/shopware/core/Profiling/Subscriber/CacheTagCollectorSubscriber.php
return array_sum(array_map('count', $this->getData()));
/shopware/core/Checkout/Cart/Tax/Struct/CalculatedTaxCollection.php
array_sum($amounts)
/shopware/core/Checkout/Cart/Delivery/Struct/DeliveryPositionCollection.php
return array_sum($weights);
/shopware/core/Checkout/Cart/Delivery/Struct/DeliveryPositionCollection.php
return array_sum($quantities);
/shopware/core/Checkout/Cart/Delivery/Struct/DeliveryPositionCollection.php
return array_sum($volumes);
/shopware/core/Checkout/Cart/Price/Struct/PriceCollection.php
array_sum($prices)
/shopware/core/Checkout/Cart/Price/Struct/PriceCollection.php
array_sum($prices)
/shopware/core/Checkout/Promotion/DataAbstractionLayer/PromotionRedemptionUpdater.php
(int) array_sum($totals),
/shipmonk/dead-code-detector/src/Debug/DebugUsagePrinter.php
$totalCount = array_sum(array_map('count', $mixedMemberUsages));
/johnpbloch/wordpress-core/wp-includes/class-wp-text-diff-renderer-table.php
$this->difference_cache[ $difference_key ] = array_sum( array_map( array( $this, 'difference' ), $chars1, $chars2 ) );
/johnpbloch/wordpress-core/wp-includes/cron.php
return array_sum( $results );
/johnpbloch/wordpress-core/wp-includes/ID3/module.audio-video.matroska.php
$block_data['lace_frames_size'][] = $element['end'] - $this->current_offset - array_sum($block_data['lace_frames_size']);
/johnpbloch/wordpress-core/wp-includes/ID3/module.audio.mp3.php
array_sum($ActualFrameLengthValues) / count($ActualFrameLengthValues)
/johnpbloch/wordpress-core/wp-includes/ID3/module.audio.mp3.php
$info['mpeg']['audio']['frame_count'] = array_sum($Distribution['bitrate']);
/johnpbloch/wordpress-core/wp-includes/Requests/src/Requests.php
$first_file_start = array_sum(unpack('v2', substr($gz_data, 26, 4)));
/johnpbloch/wordpress-core/wp-admin/includes/class-wp-posts-list-table.php
$total_items = array_sum( $post_counts );
/johnpbloch/wordpress-core/wp-admin/includes/class-wp-posts-list-table.php
$total_posts = array_sum( (array) $num_posts );
/johnpbloch/wordpress-core/wp-admin/includes/plugin-install.php
empty( $api->ratings ) || 0 === array_sum( (array) $api->ratings )
/johnpbloch/wordpress-core/wp-admin/includes/plugin-install.php
! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0
/johnpbloch/wordpress-core/wp-admin/includes/class-wp-privacy-requests-table.php
array_sum( (array) $counts )
/pear/archive_tar/Archive/Tar.php
$v_checksum += array_sum(array_map('ord', array_slice($v_binary_split, 0, 148)));
/pear/archive_tar/Archive/Tar.php
$v_checksum += array_sum(array_map('ord', array(' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',)));
/pear/archive_tar/Archive/Tar.php
$v_checksum += array_sum(array_map('ord', array_slice($v_binary_split, 156, 512)));
/drupal/core/modules/search/src/SearchQuery.php
$sum = array_sum($this->multiply);
/drupal/core/modules/dblog/tests/src/Functional/DbLogTest.php
array_sum($count),
/drupal/core/modules/dblog/tests/src/Functional/DbLogTest.php
array_sum($count),
/drupal/core/modules/locale/src/PoDatabaseReader.php
array_sum($options) == 0
/drupal/core/modules/locale/src/PoDatabaseWriter.php
array_sum($overwrite_options) || empty($locale_plurals[$langcode]['plurals'])
/swoole/ide-helper/src/swoole_library/src/core/ArrayObject.php
return array_sum($this->array);
/swoole/ide-helper/src/swoole_library/src/core/ArrayObject.php
return array_product($this->array);
/phpmetrics/phpmetrics/src/Hal/Metric/Consolidated.php
array_sum((array) $a) / count($a),
/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
array_sum($sc) / count($sc),
/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
array_sum($dc) / count($dc),
/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
array_sum($sy) / count($sy),
/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
array_sum($sc),
/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
array_sum($dc),
/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
array_sum($dc) + array_sum($sc),
/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
array_sum($dc) + array_sum($sc),
/phpmetrics/phpmetrics/src/Hal/Component/Tree/Operator/SizeOfTree.php
array_sum($ns) / max(1, count($ns)),
/phpmetrics/phpmetrics/templates/html_report/oop.php
array_sum($lcom) / count($lcom),
/symfony/monolog-bridge/Processor/DebugProcessor.php
return array_sum($this->errorCount);
/symfony/mercure/src/Debug/TraceablePublisher.php
return array_sum(array_map(function ($a) {
return $a['duration'];
}, $this->messages));
/symfony/mercure/src/Debug/TraceablePublisher.php
return (int) array_sum(array_map(function ($a) {
return $a['memory'];
}, $this->messages));
/symfony/mercure/src/Debug/TraceableHub.php
return array_sum(array_map(function ($a) {
return $a['duration'];
}, $this->messages));
/symfony/mercure/src/Debug/TraceableHub.php
return (int) array_sum(array_map(function ($a) {
return $a['memory'];
}, $this->messages));
/symfony/translation/Resources/bin/translation-status.php
$totalMissingTranslations += array_sum(array_map(fn ($translation) => count($translation['missingKeys']), array_values($translationStatus)));
/symfony/translation/Resources/bin/translation-status.php
$totalTranslationMismatches += array_sum(array_map(fn ($translation) => count($translation['mismatches']), array_values($translationStatus)));
/symfony/doctrine-bridge/DataCollector/DoctrineDataCollector.php
return array_sum(array_map('count', $this->data['queries']));
/symfony/serializer/DataCollector/SerializerDataCollector.php
return array_sum(array_map('count', $this->getData($name)));
/symfony/serializer/DataCollector/SerializerDataCollector.php
$totalTime += array_sum(array_map(fn (array $el): float => $el['time'], $handled));
/symfony/ux-twig-component/src/DataCollector/TwigComponentDataCollector.php
$this->data['render_time'] = array_sum(array_column($rootRenders, 'render_time'));
/symfony/asset-mapper/Command/ImportMapAuditCommand.php
return 0 < array_sum($json['summary']) ? self::FAILURE : self::SUCCESS;
/symfony/http-kernel/Log/Logger.php
return array_sum($this->errorCount);
/symfony/symfony/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php
return array_sum(array_map('count', $this->data['queries']));
/symfony/symfony/src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php
return array_sum($this->errorCount);
/symfony/symfony/src/Symfony/Component/Translation/Resources/bin/translation-status.php
$totalMissingTranslations += array_sum(array_map(fn ($translation) => count($translation['missingKeys']), array_values($translationStatus)));
/symfony/symfony/src/Symfony/Component/Translation/Resources/bin/translation-status.php
$totalTranslationMismatches += array_sum(array_map(fn ($translation) => count($translation['mismatches']), array_values($translationStatus)));
/symfony/symfony/src/Symfony/Component/HttpKernel/Log/Logger.php
return array_sum($this->errorCount);
/symfony/symfony/src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php
return array_sum(array_map('count', $this->getData($name)));
/symfony/symfony/src/Symfony/Component/Serializer/DataCollector/SerializerDataCollector.php
$totalTime += array_sum(array_map(fn (array $el): float => $el['time'], $handled));
/symfony/symfony/src/Symfony/Component/AssetMapper/Command/ImportMapAuditCommand.php
return 0 < array_sum($json['summary']) ? self::FAILURE : self::SUCCESS;
/symfony/amqp-messenger/Transport/Connection.php
return array_sum(array_map(fn ($queueName) => $this->queue($queueName)->declareQueue(), $this->getQueueNames()));
/cakephp/debug_kit/src/Command/BenchmarkCommand.php
$timeout - array_sum($times)
/cakephp/debug_kit/src/Command/BenchmarkCommand.php
$duration = array_sum($times);
/cakephp/cakephp/src/Collection/CollectionTrait.php
return array_sum($this->toList());
/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/ClassLevelAnalyzer.php
return array_sum($ccn);
/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/ClassLevelAnalyzer.php
return array_sum($this->calculateWmci($trait));
/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/InheritanceAnalyzer.php
$this->ahh = array_sum($this->rootClasses) / $count;
/typo3/cms-core/Classes/Routing/PageRouter.php
$product = array_product($multipliers);
/typo3/cms-core/Classes/Utility/String/StringFragmentCollection.php
$this->length = array_sum($lengths);
/typo3/cms-core/Classes/Security/ContentSecurityPolicy/ConsumableNonce.php
return array_sum($this->inlineCount->values());
/typo3/cms-core/Classes/Security/ContentSecurityPolicy/ConsumableNonce.php
return array_sum($this->staticCount->values());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment