<commit_before>require File.join(File.dirname(__FILE__), 'homebrew-php-requirement')

class PhpMetaRequirement < HomebrewPhpRequirement
  def satisfied?
    %w{php53 php54 php55 php56 php70}.any? do |php|
        f = Formula[php]
        f.rack.directory? && f.rack.children.length > 0
    end
  end

  def message
    "Missing PHP53, PHP54, PHP55, PHP56, PHP70 from homebrew-php. Please install one of them before continuing"
  end
end<commit_msg>php-meta-requirement: install php56 if no other version is linked<commit_after>require File.join(File.dirname(__FILE__), 'homebrew-php-requirement')

class PhpMetaRequirement < HomebrewPhpRequirement
  default_formula "php56"

  def satisfied?
    %w{php53 php54 php55 php56 php70}.any? do |php|
        f = Formula[php]
        f.linked_keg.exist?
    end
  end

  def message
    "Missing a core php install from homebrew-php. Please run: brew install php56"
  end
end
{'fraction_non_alphanumeric': 0.08932461873638345, 'fraction_numerical': 0.04030501089324619, 'mean_word_length': 3.7371134020618557, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '2253481', 'n_tokens_mistral': 332, 'n_tokens_neox': 295, 'n_words': 86}