<commit_before>class Psalm < Formula
  desc "PHP Static Analysis Tool"
  homepage "https://psalm.dev"
  url "https://github.com/vimeo/psalm/releases/download/4.18.1/psalm.phar"
  sha256 "5e97cdbb11fb1e87fe1a37a77af5a2406993253c18ee91972769763bae0fcd97"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "94ce09284ab80f8ce16f621eee9f3cc4df625bddefe75589c6eefac068c29340"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "94ce09284ab80f8ce16f621eee9f3cc4df625bddefe75589c6eefac068c29340"
    sha256 cellar: :any_skip_relocation, monterey:       "1241010174f8091282f06880bd2196047354eec194e008ef68565120331b09cf"
    sha256 cellar: :any_skip_relocation, big_sur:        "d2b0fd3d0c46e8cedf6dca91fe43f6b942d3a344ccbc6ffd212fa91c5879c99d"
    sha256 cellar: :any_skip_relocation, catalina:       "1241010174f8091282f06880bd2196047354eec194e008ef68565120331b09cf"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "94ce09284ab80f8ce16f621eee9f3cc4df625bddefe75589c6eefac068c29340"
  end

  depends_on "composer" => :test
  depends_on "php"

  # 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 "psalm.phar" => "psalm"
  end

  test do
    (testpath/"composer.json").write <<~EOS
      {
        "name": "homebrew/psalm-test",
        "description": "Testing if Psalm has been installed properly.",
        "type": "project",<commit_msg>psalm: update 4.18.1 bottle.<commit_after>class Psalm < Formula
  desc "PHP Static Analysis Tool"
  homepage "https://psalm.dev"
  url "https://github.com/vimeo/psalm/releases/download/4.18.1/psalm.phar"
  sha256 "5e97cdbb11fb1e87fe1a37a77af5a2406993253c18ee91972769763bae0fcd97"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "c94185b0cd0f25b64b419bbbea2dfa3f3cdccb14659f345c7de508ad24f8fc33"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "c94185b0cd0f25b64b419bbbea2dfa3f3cdccb14659f345c7de508ad24f8fc33"
    sha256 cellar: :any_skip_relocation, monterey:       "fb9351ba89edbe0bb5138b7fc2642b92d71d44d0e15faa037c2336fcdc512146"
    sha256 cellar: :any_skip_relocation, big_sur:        "fb9351ba89edbe0bb5138b7fc2642b92d71d44d0e15faa037c2336fcdc512146"
    sha256 cellar: :any_skip_relocation, catalina:       "fb9351ba89edbe0bb5138b7fc2642b92d71d44d0e15faa037c2336fcdc512146"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "c94185b0cd0f25b64b419bbbea2dfa3f3cdccb14659f345c7de508ad24f8fc33"
  end

  depends_on "composer" => :test
  depends_on "php"

  # 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 "psalm.phar" => "psalm"
  end

  test do
    (testpath/"composer.json").write <<~EOS
      {
        "name": "homebrew/psalm-test",
        "description": "Testing if Psalm has been installed properly.",
        "type": "project",
{'fraction_non_alphanumeric': 0.08406078241189784, 'fraction_numerical': 0.19560297445845456, 'mean_word_length': 5.078585461689587, 'pattern_counts': {'":': 6, '<': 9, '<?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': '6766026', 'n_tokens_mistral': 1642, 'n_tokens_neox': 1296, 'n_words': 194}