cask 'phpstorm' do version '2018.1.1,181.4445.72' sha256 '296483540016042a3613c2400311d347e24b9db878e10134bfcda6b22c51b7b2' url "https://download.jetbrains.com/webide/PhpStorm-#{version.before_comma}.dmg" appcast 'https://data.services.jetbrains.com/products/releases?code=PS&latest=true&type=release', checkpoint: '9fc2af0b6630800b0c04c7a51c561fe564c3abbde8071edeb78671d704eb931e' name 'JetBrains PhpStorm' homepage 'https://www.jetbrains.com/phpstorm/' auto_updates true app 'PhpStorm.app' uninstall_postflight do ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'pstorm') }.each { |path| File.delete(path) if File.exist?(path) && File.readlines(path).grep(%r{# see com.intellij.idea.SocketLock for the server side of this interface}).any? } end zap trash: [ "~/Library/Application Support/PhpStorm#{version.major_minor}", "~/Library/Caches/PhpStorm#{version.major_minor}", "~/Library/Logs/PhpStorm#{version.major_minor}", "~/Library/Preferences/PhpStorm#{version.major_minor}", '~/Library/Preferences/jetbrains.phpstorm.*.plist', ] end