<commit_before>class Phpstan < Formula
  desc "PHP Static Analysis Tool"
  homepage "https://github.com/phpstan/phpstan"
  url "https://github.com/phpstan/phpstan/releases/download/1.6.9/phpstan.phar"
  sha256 "4f2e8618102b149ae2f3eb48591439d0c75036b2aeeb66364451531c97afc1e0"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "f6ac942c75b318aa9bf932b749459c219f2e6631a3072152b77bae60081971d3"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "f6ac942c75b318aa9bf932b749459c219f2e6631a3072152b77bae60081971d3"
    sha256 cellar: :any_skip_relocation, monterey:       "6d4f8fb6963f010ae937ee33c9b65adfea33b205ea9484449e911bad6cfcd17e"
    sha256 cellar: :any_skip_relocation, big_sur:        "6d4f8fb6963f010ae937ee33c9b65adfea33b205ea9484449e911bad6cfcd17e"
    sha256 cellar: :any_skip_relocation, catalina:       "6d4f8fb6963f010ae937ee33c9b65adfea33b205ea9484449e911bad6cfcd17e"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f6ac942c75b318aa9bf932b749459c219f2e6631a3072152b77bae60081971d3"
  end

  depends_on "php" => :test

  # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix
  on_macos do
    pour_bottle? only_if: :default_prefix if Hardware::CPU.intel?
  end

  def install
    bin.install "phpstan.phar" => "phpstan"
  end

  test do<commit_msg>phpstan 1.7.0<commit_after>class Phpstan < Formula
  desc "PHP Static Analysis Tool"
  homepage "https://github.com/phpstan/phpstan"
  url "https://github.com/phpstan/phpstan/releases/download/1.7.0/phpstan.phar"
  sha256 "8893c241e8dd412f54bb2adc860bb5b8706ef34b9d4122d40d2aac4773b70108"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "f6ac942c75b318aa9bf932b749459c219f2e6631a3072152b77bae60081971d3"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "f6ac942c75b318aa9bf932b749459c219f2e6631a3072152b77bae60081971d3"
    sha256 cellar: :any_skip_relocation, monterey:       "6d4f8fb6963f010ae937ee33c9b65adfea33b205ea9484449e911bad6cfcd17e"
    sha256 cellar: :any_skip_relocation, big_sur:        "6d4f8fb6963f010ae937ee33c9b65adfea33b205ea9484449e911bad6cfcd17e"
    sha256 cellar: :any_skip_relocation, catalina:       "6d4f8fb6963f010ae937ee33c9b65adfea33b205ea9484449e911bad6cfcd17e"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f6ac942c75b318aa9bf932b749459c219f2e6631a3072152b77bae60081971d3"
  end

  depends_on "php" => :test

  # Keg-relocation breaks the formula when it replaces `/usr/local` with a non-default prefix
  on_macos do
    pour_bottle? only_if: :default_prefix if Hardware::CPU.intel?
  end

  def install
    bin.install "phpstan.phar" => "phpstan"
  end

  test do
{'fraction_non_alphanumeric': 0.07169253510716925, 'fraction_numerical': 0.23577235772357724, 'mean_word_length': 5.905612244897959, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3172164', 'n_tokens_mistral': 1521, 'n_tokens_neox': 1188, 'n_words': 160}