René's URL Explorer Experiment


Title: GitHub - congcongbebe/clean-code-php: :bathtub: PHP版的代码整洁之道 中文翻译 · GitHub

Open Graph Title: GitHub - congcongbebe/clean-code-php: :bathtub: PHP版的代码整洁之道 中文翻译

X Title: GitHub - congcongbebe/clean-code-php: :bathtub: PHP版的代码整洁之道 中文翻译

Description: :bathtub: PHP版的代码整洁之道 中文翻译. Contribute to congcongbebe/clean-code-php development by creating an account on GitHub.

Open Graph Description: :bathtub: PHP版的代码整洁之道 中文翻译. Contribute to congcongbebe/clean-code-php development by creating an account on GitHub.

X Description: :bathtub: PHP版的代码整洁之道 中文翻译. Contribute to congcongbebe/clean-code-php development by creating an account on GitHub.

Opengraph URL: https://github.com/congcongbebe/clean-code-php

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:89afdbeb-bf36-a5d2-91be-8ed2da6aeb74
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-idA222:1F0C16:AF886E:F6A88C:6B06E6AA
html-safe-noncee0fe7a7ab912b2650025a30ba1e36893eae7db566b72e349925dcbafb54f8945
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjIyOjFGMEMxNjpBRjg4NkU6RjZBODhDOjZCMDZFNkFBIiwidmlzaXRvcl9pZCI6IjQ0Mzg1NDM4Nzk3OTI2ODI2NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacabdb594d8edd264dd297d5b48cb6a600f024fa7fc5c47b76fe5f2a854bc84edf
hovercard-subject-tagrepository:140806166
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location//
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/congcongbebe/clean-code-php
twitter:imagehttps://opengraph.githubassets.com/b9f5cd83e201b7e745442e699fb34335e5febb377fe3d52bf9d242e242ace9d9/congcongbebe/clean-code-php
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b9f5cd83e201b7e745442e699fb34335e5febb377fe3d52bf9d242e242ace9d9/congcongbebe/clean-code-php
og:image:alt:bathtub: PHP版的代码整洁之道 中文翻译. Contribute to congcongbebe/clean-code-php development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b
turbo-cache-controlno-cache
go-importgithub.com/congcongbebe/clean-code-php git https://github.com/congcongbebe/clean-code-php.git
octolytics-dimension-user_id8869169
octolytics-dimension-user_logincongcongbebe
octolytics-dimension-repository_id140806166
octolytics-dimension-repository_nwocongcongbebe/clean-code-php
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id102061086
octolytics-dimension-repository_parent_nwophp-cpm/clean-code-php
octolytics-dimension-repository_network_root_id79111500
octolytics-dimension-repository_network_root_nwopiotrplenik/clean-code-php
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseaf8913cd0f2f77c41796be449ac66a9108825abc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/congcongbebe/clean-code-php#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcongcongbebe%2Fclean-code-php
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcongcongbebe%2Fclean-code-php
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=congcongbebe%2Fclean-code-php
Reloadhttps://github.com/congcongbebe/clean-code-php
Reloadhttps://github.com/congcongbebe/clean-code-php
Reloadhttps://github.com/congcongbebe/clean-code-php
congcongbebehttps://github.com/congcongbebe
clean-code-phphttps://github.com/congcongbebe/clean-code-php
Codehttps://github.com/congcongbebe/clean-code-php
Pull requestshttps://github.com/congcongbebe/clean-code-php/pulls
Actionshttps://github.com/congcongbebe/clean-code-php/actions
Projectshttps://github.com/congcongbebe/clean-code-php/projects
Wikihttps://github.com/congcongbebe/clean-code-php/wiki
Security and qualityhttps://github.com/congcongbebe/clean-code-php/security
Insightshttps://github.com/congcongbebe/clean-code-php/pulse
https://github.com/congcongbebe/clean-code-php
clean-code-phphttps://github.com/congcongbebe/clean-code-php
php-cpm/clean-code-phphttps://github.com/php-cpm/clean-code-php
Notificationshttps://github.com/login?return_to=%2Fcongcongbebe%2Fclean-code-php
Fork0 (0)https://github.com/login?return_to=%2Fcongcongbebe%2Fclean-code-php
Star0 (0)https://github.com/login?return_to=%2Fcongcongbebe%2Fclean-code-php
Readmehttps://github.com/congcongbebe/clean-code-php#readme-ov-file
MIT licensehttps://github.com/congcongbebe/clean-code-php#MIT-1-ov-file
Activityhttps://github.com/congcongbebe/clean-code-php/activity
0 forkshttps://github.com/congcongbebe/clean-code-php/forks
Report repositoryhttps://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fcongcongbebe%2Fclean-code-php&report=congcongbebe+%28user%29
Brancheshttps://github.com/congcongbebe/clean-code-php/branches
Tagshttps://github.com/congcongbebe/clean-code-php/tags
https://github.com/congcongbebe/clean-code-php/branches
https://github.com/congcongbebe/clean-code-php/tags
27 Commitshttps://github.com/congcongbebe/clean-code-php/commits/master/
https://github.com/congcongbebe/clean-code-php/commits/master/
.gitattributeshttps://github.com/congcongbebe/clean-code-php/blob/master/.gitattributes
.gitattributeshttps://github.com/congcongbebe/clean-code-php/blob/master/.gitattributes
.travis-build.phphttps://github.com/congcongbebe/clean-code-php/blob/master/.travis-build.php
.travis-build.phphttps://github.com/congcongbebe/clean-code-php/blob/master/.travis-build.php
.travis.ymlhttps://github.com/congcongbebe/clean-code-php/blob/master/.travis.yml
.travis.ymlhttps://github.com/congcongbebe/clean-code-php/blob/master/.travis.yml
LICENSEhttps://github.com/congcongbebe/clean-code-php/blob/master/LICENSE
LICENSEhttps://github.com/congcongbebe/clean-code-php/blob/master/LICENSE
README.mdhttps://github.com/congcongbebe/clean-code-php/blob/master/README.md
README.mdhttps://github.com/congcongbebe/clean-code-php/blob/master/README.md
READMEhttps://github.com/congcongbebe/clean-code-php
MIT licensehttps://github.com/congcongbebe/clean-code-php
https://github.com/congcongbebe/clean-code-php#clean-code-php
https://github.com/congcongbebe/clean-code-php#目录
介绍https://github.com/congcongbebe/clean-code-php#%E4%BB%8B%E7%BB%8D
变量https://github.com/congcongbebe/clean-code-php#%E5%8F%98%E9%87%8F
使用见字知意的变量名https://github.com/congcongbebe/clean-code-php#%E4%BD%BF%E7%94%A8%E8%A7%81%E5%AD%97%E7%9F%A5%E6%84%8F%E7%9A%84%E5%8F%98%E9%87%8F%E5%90%8D
同一个实体要用相同的变量名https://github.com/congcongbebe/clean-code-php#%E5%90%8C%E4%B8%80%E4%B8%AA%E5%AE%9E%E4%BD%93%E8%A6%81%E7%94%A8%E7%9B%B8%E5%90%8C%E7%9A%84%E5%8F%98%E9%87%8F%E5%90%8D
使用便于搜索的名称 (part 1)https://github.com/congcongbebe/clean-code-php#%E4%BD%BF%E7%94%A8%E4%BE%BF%E4%BA%8E%E6%90%9C%E7%B4%A2%E7%9A%84%E5%90%8D%E7%A7%B0-part-1
使用便于搜索的名称 (part 2)https://github.com/congcongbebe/clean-code-php#%E4%BD%BF%E7%94%A8%E4%BE%BF%E4%BA%8E%E6%90%9C%E7%B4%A2%E7%9A%84%E5%90%8D%E7%A7%B0-part-2
使用自解释型变量https://github.com/congcongbebe/clean-code-php#%E4%BD%BF%E7%94%A8%E8%87%AA%E8%A7%A3%E9%87%8A%E5%9E%8B%E5%8F%98%E9%87%8F
避免深层嵌套,尽早返回 (part 1)https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E6%B7%B1%E5%B1%82%E5%B5%8C%E5%A5%97%E5%B0%BD%E6%97%A9%E8%BF%94%E5%9B%9E-part-1
避免深层嵌套,尽早返回 (part 2)https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E6%B7%B1%E5%B1%82%E5%B5%8C%E5%A5%97%E5%B0%BD%E6%97%A9%E8%BF%94%E5%9B%9E-part-2
少用无意义的变量名https://github.com/congcongbebe/clean-code-php#%E5%B0%91%E7%94%A8%E6%97%A0%E6%84%8F%E4%B9%89%E7%9A%84%E5%8F%98%E9%87%8F%E5%90%8D
不要添加不必要上下文https://github.com/congcongbebe/clean-code-php#%E4%B8%8D%E8%A6%81%E6%B7%BB%E5%8A%A0%E4%B8%8D%E5%BF%85%E8%A6%81%E4%B8%8A%E4%B8%8B%E6%96%87
合理使用参数默认值,没必要在方法里再做默认值检测https://github.com/congcongbebe/clean-code-php#%E5%90%88%E7%90%86%E4%BD%BF%E7%94%A8%E5%8F%82%E6%95%B0%E9%BB%98%E8%AE%A4%E5%80%BC%E6%B2%A1%E5%BF%85%E8%A6%81%E5%9C%A8%E6%96%B9%E6%B3%95%E9%87%8C%E5%86%8D%E5%81%9A%E9%BB%98%E8%AE%A4%E5%80%BC%E6%A3%80%E6%B5%8B
表达式https://github.com/congcongbebe/clean-code-php#%E8%A1%A8%E8%BE%BE%E5%BC%8F
使用恒等式https://github.com/congcongbebe/clean-code-php#%E4%BD%BF%E7%94%A8%E6%81%92%E7%AD%89%E5%BC%8F
函数https://github.com/congcongbebe/clean-code-php#%E5%87%BD%E6%95%B0
函数参数(最好少于2个)https://github.com/congcongbebe/clean-code-php#%E5%87%BD%E6%95%B0%E5%8F%82%E6%95%B0-%E6%9C%80%E5%A5%BD%E5%B0%91%E4%BA%8E2%E4%B8%AA
函数应该只做一件事https://github.com/congcongbebe/clean-code-php#%E5%87%BD%E6%95%B0%E5%BA%94%E8%AF%A5%E5%8F%AA%E5%81%9A%E4%B8%80%E4%BB%B6%E4%BA%8B
函数名应该是有意义的动词(或表明具体做了什么事)https://github.com/congcongbebe/clean-code-php#%E5%87%BD%E6%95%B0%E5%90%8D%E5%BA%94%E8%AF%A5%E6%98%AF%E6%9C%89%E6%84%8F%E4%B9%89%E7%9A%84%E5%8A%A8%E8%AF%8D%E6%88%96%E8%A1%A8%E6%98%8E%E5%85%B7%E4%BD%93%E5%81%9A%E4%BA%86%E4%BB%80%E4%B9%88%E4%BA%8B
函数里应当只有一层抽象abstractionhttps://github.com/congcongbebe/clean-code-php#%E5%87%BD%E6%95%B0%E9%87%8C%E5%BA%94%E5%BD%93%E5%8F%AA%E6%9C%89%E4%B8%80%E5%B1%82%E6%8A%BD%E8%B1%A1abstraction
不要用flag作为函数的参数https://github.com/congcongbebe/clean-code-php#%E4%B8%8D%E8%A6%81%E7%94%A8flag%E4%BD%9C%E4%B8%BA%E5%87%BD%E6%95%B0%E7%9A%84%E5%8F%82%E6%95%B0
避免副作用https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E5%89%AF%E4%BD%9C%E7%94%A8
不要写全局函数https://github.com/congcongbebe/clean-code-php#%E4%B8%8D%E8%A6%81%E5%86%99%E5%85%A8%E5%B1%80%E5%87%BD%E6%95%B0
不要使用单例模式https://github.com/congcongbebe/clean-code-php#%E4%B8%8D%E8%A6%81%E4%BD%BF%E7%94%A8%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F
封装条件语句https://github.com/congcongbebe/clean-code-php#%E5%B0%81%E8%A3%85%E6%9D%A1%E4%BB%B6%E8%AF%AD%E5%8F%A5
避免用反义条件判断https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E7%94%A8%E5%8F%8D%E4%B9%89%E6%9D%A1%E4%BB%B6%E5%88%A4%E6%96%AD
避免条件判断https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E6%9D%A1%E4%BB%B6%E5%88%A4%E6%96%AD
避免类型检查 (part 1)https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E7%B1%BB%E5%9E%8B%E6%A3%80%E6%9F%A5-part-1
避免类型检查 (part 2)https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E7%B1%BB%E5%9E%8B%E6%A3%80%E6%9F%A5-part-2
移除僵尸代码https://github.com/congcongbebe/clean-code-php#%E7%A7%BB%E9%99%A4%E5%83%B5%E5%B0%B8%E4%BB%A3%E7%A0%81
对象和数据结构 Objects and Data Structureshttps://github.com/congcongbebe/clean-code-php#%E5%AF%B9%E8%B1%A1%E5%92%8C%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84
使用 getters 和 setters Use object encapsulationhttps://github.com/congcongbebe/clean-code-php#%E4%BD%BF%E7%94%A8-getters-%E5%92%8C-setters
对象属性多使用private/protected限定https://github.com/congcongbebe/clean-code-php#%E5%AF%B9%E8%B1%A1%E5%B1%9E%E6%80%A7%E5%A4%9A%E4%BD%BF%E7%94%A8privateprotected%E9%99%90%E5%AE%9A
类https://github.com/congcongbebe/clean-code-php#%E7%B1%BB
组合优于继承https://github.com/congcongbebe/clean-code-php#%E7%BB%84%E5%90%88%E4%BC%98%E4%BA%8E%E7%BB%A7%E6%89%BF
避免连贯接口https://github.com/congcongbebe/clean-code-php#%E9%81%BF%E5%85%8D%E8%BF%9E%E8%B4%AF%E6%8E%A5%E5%8F%A3
推荐使用 final 类https://github.com/congcongbebe/clean-code-php#%E6%8E%A8%E8%8D%90%E4%BD%BF%E7%94%A8-final-%E7%B1%BB
类的SOLID原则 SOLIDhttps://github.com/congcongbebe/clean-code-php#solid
S: 职责单一原则 Single Responsibility Principle (SRP)https://github.com/congcongbebe/clean-code-php#%E8%81%8C%E8%B4%A3%E5%8D%95%E4%B8%80%E5%8E%9F%E5%88%99-single-responsibility-principle-srp
O: 开闭原则 Open/Closed Principle (OCP)https://github.com/congcongbebe/clean-code-php#%E5%BC%80%E9%97%AD%E5%8E%9F%E5%88%99-openclosed-principle-ocp
L: 里氏替换原则 Liskov Substitution Principle (LSP)https://github.com/congcongbebe/clean-code-php#%E9%87%8C%E6%B0%8F%E6%9B%BF%E6%8D%A2%E5%8E%9F%E5%88%99-liskov-substitution-principle-lsp
I: 接口隔离原则 Interface Segregation Principle (ISP)https://github.com/congcongbebe/clean-code-php#%E6%8E%A5%E5%8F%A3%E9%9A%94%E7%A6%BB%E5%8E%9F%E5%88%99-interface-segregation-principle-isp
D: 依赖反转原则 Dependency Inversion Principle (DIP)https://github.com/congcongbebe/clean-code-php#%E4%BE%9D%E8%B5%96%E5%8F%8D%E8%BD%AC%E5%8E%9F%E5%88%99-dependency-inversion-principle-dip
别写重复代码 (DRY)https://github.com/congcongbebe/clean-code-php#%E5%88%AB%E5%86%99%E9%87%8D%E5%A4%8D%E4%BB%A3%E7%A0%81-dry
翻译https://github.com/congcongbebe/clean-code-php#%E7%BF%BB%E8%AF%91
https://github.com/congcongbebe/clean-code-php#介绍
Clean Codehttps://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882
clean-code-javascripthttps://github.com/ryanmcdermott/clean-code-javascript
https://github.com/congcongbebe/clean-code-php#翻译说明
yangweijie版本https://github.com/yangweijie/clean-code-php
clean-code-phphttps://github.com/jupeter/clean-code-php
https://github.com/congcongbebe/clean-code-php#变量
https://github.com/congcongbebe/clean-code-php#使用见字知意的变量名
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#同一个实体要用相同的变量名
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#使用便于搜索的名称-part-1
https://github.com/congcongbebe/clean-code-php#使用便于搜索的名称-part-2
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#使用自解释型变量
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免深层嵌套尽早返回-part-1
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免深层嵌套尽早返回-part-2
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#少用无意义的变量名
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#不要添加不必要上下文
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#合理使用参数默认值没必要在方法里再做默认值检测
type hintinghttp://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#表达式
使用恒等式http://php.net/manual/en/language.operators.comparison.php
https://github.com/congcongbebe/clean-code-php#使用恒等式
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#函数
https://github.com/congcongbebe/clean-code-php#函数参数最好少于2个
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#函数应该只做一件事
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#函数名应该是有意义的动词或表明具体做了什么事
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#函数里应当只有一层抽象abstraction
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#不要用flag作为函数的参数
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免副作用
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#不要写全局函数
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#不要使用单例模式
反模式https://en.wikipedia.org/wiki/Singleton_pattern
code smellhttps://en.wikipedia.org/wiki/Code_smell
单一响应原则https://github.com/congcongbebe/clean-code-php/blob/master
single responsibility principlehttps://github.com/congcongbebe/clean-code-php#single-responsibility-principle-srp
coupledhttps://en.wikipedia.org/wiki/Coupling_%28computer_programming%29
http://misko.hevery.com/2008/08/25/root-cause-of-singletons/)的文章,是http://misko.hevery.com/2008/08/25/root-cause-of-singletons/)的文章,是
Misko Heveryhttp://misko.hevery.com/about/
DSNhttp://php.net/manual/en/pdo.construct.php#refsect1-pdo.construct-parameters
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#封装条件语句
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免用反义条件判断
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免条件判断
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免类型检查-part-1
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免类型检查-part-2
类型声明http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#移除僵尸代码
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#对象和数据结构
https://github.com/congcongbebe/clean-code-php#使用-getters-和-setters
开闭原则https://github.com/congcongbebe/clean-code-php#openclosed-principle-ocp
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#对象属性多使用privateprotected限定
Jenga effecthttp://www.urbandictionary.com/define.php?term=Jengaphobia&defid=2494196
博客文章http://fabien.potencier.org/pragmatism-over-theory-protected-vs-private.html
Fabien Potencierhttps://github.com/fabpot
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#类
https://github.com/congcongbebe/clean-code-php#组合优于继承
设计模式https://en.wikipedia.org/wiki/Design_Patterns
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#避免连贯接口
连贯接口Fluent interfacehttps://en.wikipedia.org/wiki/Fluent_interface
方法链Method chaininghttps://en.wikipedia.org/wiki/Method_chaining
PHPUnit Mock Builderhttps://phpunit.de/manual/current/en/test-doubles.html
Doctrine Query Builderhttp://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/query-builder.html
PHPUnit Mock Builderhttps://phpunit.de/manual/current/en/test-doubles.html
Doctrine Query Builderhttp://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/query-builder.html
对象封装https://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29
装饰器模式https://en.wikipedia.org/wiki/Decorator_pattern
mockhttps://en.wikipedia.org/wiki/Mock_object
连贯接口为什么不好https://ocramius.github.io/blog/fluent-interfaces-are-evil/
Marco Pivettahttps://github.com/Ocramius
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#推荐使用-final-类
组合https://github.com/congcongbebe/clean-code-php#prefer-composition-over-inheritance
单一职责模式https://github.com/congcongbebe/clean-code-php#single-responsibility-principle-srp
the blog posthttps://ocramius.github.io/blog/when-to-declare-classes-final/
Marco Pivetta (Ocramius)https://ocramius.github.io/
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#solid
S: 职责单一原则 (SRP)https://github.com/congcongbebe/clean-code-php#%E8%81%8C%E8%B4%A3%E5%8D%95%E4%B8%80%E5%8E%9F%E5%88%99-single-responsibility-principle-srp
O: 开闭原则 (OCP)https://github.com/congcongbebe/clean-code-php#%E5%BC%80%E9%97%AD%E5%8E%9F%E5%88%99-openclosed-principle-ocp
L: 里氏替换原则 (LSP)https://github.com/congcongbebe/clean-code-php#%E9%87%8C%E6%B0%8F%E6%9B%BF%E6%8D%A2%E5%8E%9F%E5%88%99-liskov-substitution-principle-lsp
I: 接口隔离原则 (ISP)https://github.com/congcongbebe/clean-code-php#%E6%8E%A5%E5%8F%A3%E9%9A%94%E7%A6%BB%E5%8E%9F%E5%88%99-interface-segregation-principle-isp
D: 依赖反转原则 (DIP)https://github.com/congcongbebe/clean-code-php#%E4%BE%9D%E8%B5%96%E5%8F%8D%E8%BD%AC%E5%8E%9F%E5%88%99-dependency-inversion-principle-dip
https://github.com/congcongbebe/clean-code-php#职责单一原则-single-responsibility-principle-srp
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#开闭原则-openclosed-principle-ocp
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#里氏替换原则-liskov-substitution-principle-lsp
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#接口隔离原则-interface-segregation-principle-isp
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#依赖反转原则-dependency-inversion-principle-dip
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#别写重复代码-dry
DRYhttps://en.wikipedia.org/wiki/Don%27t_repeat_yourself
Classeshttps://github.com/congcongbebe/clean-code-php#classes
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
https://github.com/congcongbebe/clean-code-php#翻译
php-cpm/clean-code-phphttps://github.com/php-cpm/clean-code-php
peter-gribanov/clean-code-phphttps://github.com/peter-gribanov/clean-code-php
fikoborquez/clean-code-phphttps://github.com/fikoborquez/clean-code-php
fabioars/clean-code-phphttps://github.com/fabioars/clean-code-php
jeanjar/clean-code-phphttps://github.com/jeanjar/clean-code-php/tree/pt-br
panuwizzle/clean-code-phphttps://github.com/panuwizzle/clean-code-php
errorname/clean-code-phphttps://github.com/errorname/clean-code-php
viethuongdev/clean-code-phphttps://github.com/viethuongdev/clean-code-php
yujineeee/clean-code-phphttps://github.com/yujineeee/clean-code-php
⬆ 返回顶部https://github.com/congcongbebe/clean-code-php#%E7%9B%AE%E5%BD%95
Readmehttps://github.com/congcongbebe/clean-code-php#readme-ov-file
MIT licensehttps://github.com/congcongbebe/clean-code-php#MIT-1-ov-file
Activityhttps://github.com/congcongbebe/clean-code-php/activity
0 forkshttps://github.com/congcongbebe/clean-code-php/forks
Report repositoryhttps://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fcongcongbebe%2Fclean-code-php&report=congcongbebe+%28user%29
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.