Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PhpStormで重複コードを一瞬で見つける
Search
Yuichi Sugiyama
PRO
November 27, 2019
Technology
940
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PhpStormで重複コードを一瞬で見つける
第144回PHP勉強会の発表内容です
Yuichi Sugiyama
PRO
November 27, 2019
More Decks by Yuichi Sugiyama
See All by Yuichi Sugiyama
20年以上続く PHP 大規模プロダクトを Kubernetes へ ── クラウド基盤刷新プロジェクトの4年間
oogfranz
PRO
0
540
サイボウズ と Garoon と The PHP Foundation と 私 / Cybozu and Garoon and The PHP Foundation and me
oogfranz
PRO
1
630
可能な限り確実にmkdirを成功させるには / Make mkdir
oogfranz
PRO
0
770
サイボウズ #Garoon 開発チームの 「 完成度低いの歓迎LT大会 」 PHPerKaigi出張版 / Low quality LT in PHPerKaigi 2023
oogfranz
PRO
0
790
20年ものの巨大プロダクトをKubernetesに移行している話 後日談/Garoon on Kubernetes after talk
oogfranz
PRO
0
660
20年ものの巨大プロダクトをKubernetesに移行している話/Garoon on Kubernetes
oogfranz
PRO
0
590
PHPアプリケーションだってモニタリングしたい / Monitoring PHP application
oogfranz
PRO
1
690
効果的な静的解析の CI導入パターンを求めて / Great static analysis with CI
oogfranz
PRO
3
4.1k
Dev-meets-Ops
oogfranz
PRO
1
1.1k
Other Decks in Technology
See All in Technology
OR学会2026年秋期大会_機械学習と数理最適化の融合による、配合レシピ最適化システム開発事例
brainpadpr
0
120
今さら理解するウェブフォントver.2026
takanorip
3
660
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
200
自主式軟體工廠
philipz
0
250
継続的なAIコスト最適化
bgpat
1
280
AI時代のPRレビューにどう向き合うか?
kairim0
1
170
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
5.7k
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.4k
hackers_champloo_2026_tidb
makocchi
0
100
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
940
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.3k
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
430
New Earth Scene 8
popppiees
4
2.7k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
870
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Raft: Consensus for Rubyists
vanstee
142
7.7k
エンジニアに許された特別な時間の終わり
watany
109
250k
Music & Morning Musume
bryan
48
7.4k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
Transcript
PhpStormͰ ॏෳίʔυΛ ҰॠͰݟ͚ͭΔ Cybozu ਿࢁ༞Ұ @oogFranz
Who am I • ਿࢁ ༞Ұ @oogFranz • αΠϘζ5ΤϯδχΞ •
େاۀ͚άϧʔϓΣΞGaroon࡞ͬͯΔʢPHP 7) • ෳۀδϟζϛϡʔδγϟϯ@MASHݭָஂ
PHP ConferenceͰ·͢ʂ
ॏෳίʔυ͋Γ·ͤΜ͔ʁ • ಈ͘ίʔυ͕ίϐϖ͞Ε͍ͯΔ • ෆ۩߹͕͋ͬͨΒॏෳίʔυશͯमਖ਼͕ඞཁ • ػೳՃ͕͋ͬͨΒॏෳίʔυશͯରԠ͕ඞཁ • ίϐϖίʔυΛݟ͚ͭͯॏෳΛऔΓআ͖͍ͨ
ॏෳίʔυ͋Γ·ͤΜ͔ʁ • ಈ͘ίʔυ͕ίϐϖ͞Ε͍ͯΔ • ෆ۩߹͕͋ͬͨΒॏෳίʔυશͯमਖ਼͕ඞཁ • ػೳՃ͕͋ͬͨΒॏෳίʔυશͯରԠ͕ඞཁ • ίϐϖίʔυΛݟ͚ͭͯॏෳΛऔΓআ͖͍ͨ PhpStormͰ؆୯ʹݟ͚ͭΑ͏ʂ
Γ͔ͨ 1. ·ͣPhpStorm 2019.2ΛΠϯετʔϧ͠·͢
Γ͔ͨ 1. ·ͣPhpStorm 2019.2ΛΠϯετʔϧ͠·͢ Ҏ্Ͱ͢
DEMO https://github.com/oogFranz/duplicate-code-test
ॏෳ͕Weak WarningͰ
Diff viewerͰॏෳ۩߹Λ֬ೝ
ม໊ͷҧ͍ݕग़
໊ؔϦςϥϧͷҧ͍ݕग़ • Editor > Duplicates ͔Βཁઃఆมߋ
ΑΓෳࡶͳॏෳɺ୯७ͳॏෳΛݟ͚ͭΔ • unit ͱ͍͏୯ҐΛಈ͔͢͜ͱͰॏෳͷݟ͔ͭΔ۩߹Λมߋ • units = 2 * number
of statements + number of expressions • σϑΥϧτ45ɻׂͱదͳͳͷͰ߹Θͳ͔ͬͨΒมߋ͢Δɻ • ݴޠ͝ͱʹઃఆՄೳ
ॏෳίʔυΛશ෦ݟ͚ͭΔ • Run Inspection By NameΛ࣮ߦ • Mac ͳΒ ”⌃⌥⇧I”
ɺWinͳΒ ”Ctrl+Shift+Alt+I” • “Duplicated code fragment” Λೖྗ࣮ͯ͠ߦ