<commit_before><?php
/**
 * Humbug
 *
 * @category   Humbug
 * @package    Humbug
 * @copyright  Copyright (c) 2015 <NAME> (http://blog.astrumfutura.com)
 * @license    https://github.com/padraic/humbug/blob/master/LICENSE New BSD License
 */

namespace Humbug\PhpSpec\Loader\Filter\Specification;

use PhpSpec\Loader\Node\SpecificationNode;

class FastestFirstFilter extends AbstractFilter
{

    private $log;

    public function filter(array $array)
    {
        $times = $this->loadTimes();
        asort($times['specifications'], SORT_NUMERIC);
        @usort($array, function (SpecificationNode $a, SpecificationNode $b) use (&$times) {
            if ($times['specifications'][$a->getTitle()] == $times['specifications'][$b->getTitle()]) {
                return 0;
            }
            if ($times['specifications'][$a->getTitle()] < $times['specifications'][$b->getTitle()]) {
                return -1;
            }
            return 1;<commit_msg>Remove a smidgen of dead code<commit_after><?php
/**
 * Humbug
 *
 * @category   Humbug
 * @package    Humbug
 * @copyright  Copyright (c) 2015 <NAME> (http://blog.astrumfutura.com)
 * @license    https://github.com/padraic/humbug/blob/master/LICENSE New BSD License
 */

namespace Humbug\PhpSpec\Loader\Filter\Specification;

use PhpSpec\Loader\Node\SpecificationNode;

class FastestFirstFilter extends AbstractFilter
{

    private $log;

    public function filter(array $array)
    {
        $times = $this->loadTimes();
        @usort($array, function (SpecificationNode $a, SpecificationNode $b) use ($times) {
            if ($times['specifications'][$a->getTitle()] == $times['specifications'][$b->getTitle()]) {
                return 0;
            }
            if ($times['specifications'][$a->getTitle()] < $times['specifications'][$b->getTitle()]) {
                return -1;
            }
            return 1;
{'fraction_non_alphanumeric': 0.15327695560253699, 'fraction_numerical': 0.007399577167019027, 'mean_word_length': 2.847560975609756, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2277587', 'n_tokens_mistral': 591, 'n_tokens_neox': 576, 'n_words': 112}