René's URL Explorer Experiment


Title: GitHub - gbcr/clean-code-php: :bathtub: Clean Code concepts adapted for PHP

Open Graph Title: GitHub - gbcr/clean-code-php: :bathtub: Clean Code concepts adapted for PHP

X Title: GitHub - gbcr/clean-code-php: :bathtub: Clean Code concepts adapted for PHP

Description: :bathtub: Clean Code concepts adapted for PHP. Contribute to gbcr/clean-code-php development by creating an account on GitHub.

Open Graph Description: :bathtub: Clean Code concepts adapted for PHP. Contribute to gbcr/clean-code-php development by creating an account on GitHub.

X Description: :bathtub: Clean Code concepts adapted for PHP. Contribute to gbcr/clean-code-php development by creating an account on GitHub.

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

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:5c5eff4b-aad0-6554-69bd-a236cf04e646
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-id8D9C:20A736:16B5402:1D153A2:69926573
html-safe-noncee25d78ff223208095f5652c73eadbec93189ce4c2b9a5570f62ba22a07255ed5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDlDOjIwQTczNjoxNkI1NDAyOjFEMTUzQTI6Njk5MjY1NzMiLCJ2aXNpdG9yX2lkIjoiNDk1ODI5NjU4OTcyNDcwNjE2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccb8b8e07b40187316548775e52eeba4ae89fe8e6fd4cc7525fd4f761ee66c720
hovercard-subject-tagrepository:103510906
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/gbcr/clean-code-php
twitter:imagehttps://opengraph.githubassets.com/17be4ae976376762509ab8ff2a08a1ec2e209b08d8985b78cd5b537c0b30521d/gbcr/clean-code-php
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/17be4ae976376762509ab8ff2a08a1ec2e209b08d8985b78cd5b537c0b30521d/gbcr/clean-code-php
og:image:alt:bathtub: Clean Code concepts adapted for PHP. Contribute to gbcr/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
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
go-importgithub.com/gbcr/clean-code-php git https://github.com/gbcr/clean-code-php.git
octolytics-dimension-user_id9191767
octolytics-dimension-user_logingbcr
octolytics-dimension-repository_id103510906
octolytics-dimension-repository_nwogbcr/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
release848bc6032dcc93a9a7301dcc3f379a72ba13b96e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgbcr%2Fclean-code-php
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgbcr%2Fclean-code-php
Sign up https://patch-diff.githubusercontent.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=gbcr%2Fclean-code-php
Reloadhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php
Reloadhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php
Reloadhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php
gbcr https://patch-diff.githubusercontent.com/gbcr
clean-code-phphttps://patch-diff.githubusercontent.com/gbcr/clean-code-php
php-cpm/clean-code-phphttps://patch-diff.githubusercontent.com/php-cpm/clean-code-php
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fgbcr%2Fclean-code-php
Fork 0 https://patch-diff.githubusercontent.com/login?return_to=%2Fgbcr%2Fclean-code-php
Star 0 https://patch-diff.githubusercontent.com/login?return_to=%2Fgbcr%2Fclean-code-php
MIT license https://patch-diff.githubusercontent.com/gbcr/clean-code-php/blob/master/LICENSE
0 stars https://patch-diff.githubusercontent.com/gbcr/clean-code-php/stargazers
2.3k forks https://patch-diff.githubusercontent.com/gbcr/clean-code-php/forks
Branches https://patch-diff.githubusercontent.com/gbcr/clean-code-php/branches
Tags https://patch-diff.githubusercontent.com/gbcr/clean-code-php/tags
Activity https://patch-diff.githubusercontent.com/gbcr/clean-code-php/activity
Star https://patch-diff.githubusercontent.com/login?return_to=%2Fgbcr%2Fclean-code-php
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fgbcr%2Fclean-code-php
Code https://patch-diff.githubusercontent.com/gbcr/clean-code-php
Pull requests 0 https://patch-diff.githubusercontent.com/gbcr/clean-code-php/pulls
Actions https://patch-diff.githubusercontent.com/gbcr/clean-code-php/actions
Projects 0 https://patch-diff.githubusercontent.com/gbcr/clean-code-php/projects
Wiki https://patch-diff.githubusercontent.com/gbcr/clean-code-php/wiki
Security 0 https://patch-diff.githubusercontent.com/gbcr/clean-code-php/security
Insights https://patch-diff.githubusercontent.com/gbcr/clean-code-php/pulse
Code https://patch-diff.githubusercontent.com/gbcr/clean-code-php
Pull requests https://patch-diff.githubusercontent.com/gbcr/clean-code-php/pulls
Actions https://patch-diff.githubusercontent.com/gbcr/clean-code-php/actions
Projects https://patch-diff.githubusercontent.com/gbcr/clean-code-php/projects
Wiki https://patch-diff.githubusercontent.com/gbcr/clean-code-php/wiki
Security https://patch-diff.githubusercontent.com/gbcr/clean-code-php/security
Insights https://patch-diff.githubusercontent.com/gbcr/clean-code-php/pulse
Brancheshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/branches
Tagshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/tags
https://patch-diff.githubusercontent.com/gbcr/clean-code-php/branches
https://patch-diff.githubusercontent.com/gbcr/clean-code-php/tags
14 Commitshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/commits/master/
https://patch-diff.githubusercontent.com/gbcr/clean-code-php/commits/master/
.gitattributeshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/blob/master/.gitattributes
.gitattributeshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/blob/master/.gitattributes
LICENSEhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/blob/master/LICENSE
LICENSEhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/blob/master/LICENSE
README.mdhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/blob/master/README.md
README.mdhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/blob/master/README.md
READMEhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php
MIT licensehttps://patch-diff.githubusercontent.com/gbcr/clean-code-php
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#clean-code-php
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#目录
介绍https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E4%BB%8B%E7%BB%8D
变量https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E5%8F%98%E9%87%8F
使用见字知意的变量名https://patch-diff.githubusercontent.com/gbcr/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://patch-diff.githubusercontent.com/gbcr/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://patch-diff.githubusercontent.com/gbcr/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%B0part-1
使用便于搜索的名称 (part 2)https://patch-diff.githubusercontent.com/gbcr/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%B0part-2
使用自解释型变量https://patch-diff.githubusercontent.com/gbcr/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
少用无意义的变量名https://patch-diff.githubusercontent.com/gbcr/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
Don't add unneeded contexthttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#dont-add-unneeded-context
合理使用参数默认值,没必要在方法里再做默认值检测https://patch-diff.githubusercontent.com/gbcr/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%EF%BC%8C%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://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E5%87%BD%E6%95%B0
Function arguments (2 or fewer ideally)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#function-arguments-2-or-fewer-ideally
Functions should do one thinghttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#functions-should-do-one-thing
Function names should say what they dohttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#function-names-should-say-what-they-do
Functions should only be one level of abstractionhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#functions-should-only-be-one-level-of-abstraction
Don't use flags as function parametershttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#dont-use-flags-as-function-parameters
Avoid Side Effectshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#avoid-side-effects
Don't write to global functionshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#dont-write-to-global-functions
Don't use a Singleton patternhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#dont-use-a-singleton-pattern
Encapsulate conditionalshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#encapsulate-conditionals
Avoid negative conditionalshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#avoid-negative-conditionals
Avoid conditionalshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#avoid-conditionals
Avoid type-checking (part 1)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#avoid-type-checking-part-1
Avoid type-checking (part 2)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#avoid-type-checking-part-2
Remove dead codehttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#remove-dead-code
对象和数据结构 Objects and Data Structureshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#objects-and-data-structures
Use getters and settershttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#use-getters-and-setters
Make objects have private/protected membershttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#make-objects-have-privateprotected-members
Classeshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#classes
Use method chaininghttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#use-method-chaining
Prefer composition over inheritancehttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#prefer-composition-over-inheritance
类的SOLID原则 SOLIDhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#solid
S: 单一功能 Single Responsibility Principle (SRP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#single-responsibility-principle-srp
O: 开闭原则 Open/Closed Principle (OCP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#openclosed-principle-ocp
L: 里氏替换 Liskov Substitution Principle (LSP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#liskov-substitution-principle-lsp
I: 接口隔离 Interface Segregation Principle (ISP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#interface-segregation-principle-isp
D: 依赖反转 Dependency Inversion Principle (DIP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#dependency-inversion-principle-dip
Don’t repeat yourself (DRY)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#dont-repeat-yourself-dry
Translationshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#translations
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#介绍
clen php codehttps://github.com/jupeter/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://patch-diff.githubusercontent.com/gbcr/clean-code-php#变量
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#使用见字知意的变量名
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#同一个实体要用相同的变量名
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#使用便于搜索的名称-part-1
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#使用便于搜索的名称-part-2
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#使用自解释型变量
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#避免深层潜逃尽早返回
⬆ back to tophttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#table-of-contents
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#少用无意义的变量名
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#不要添加不必要上下文
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#合理使用参数默认值没必要在方法里再做默认值检测
type hintinghttp://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#函数
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#函数参数最好少于2个
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#函数应该只做一件事
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#函数名应该是有意义的动词或表明具体做了什么事
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#函数应当只有一层抽象abstraction
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#不要用flag作为函数的参数
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#避免副作用
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#不要写全局函数
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#不要使用单例模式
anti-patternhttps://en.wikipedia.org/wiki/Singleton_pattern
DSNhttp://php.net/manual/en/pdo.construct.php#refsect1-pdo.construct-parameters
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#封装条件语句
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#避免用反义条件判断
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#避免条件声明
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#避免类型检查-part-1
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#避免类型检查-part-2
类型声明http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#移除僵尸代码
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#对象和数据结构
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#使用-getters-和-setters
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#make-objects-have-privateprotected-members
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#类
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#使用方法链
⬆ back to tophttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#table-of-contents
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#组合优于继承
Design Patternshttps://en.wikipedia.org/wiki/Design_Patterns
⬆ back to tophttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#table-of-contents
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#solid
S: 指责单一原则 (SRP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#single-responsibility-principle-srp
O: 开闭原则原则 (OCP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#openclosed-principle-ocp
L: 里氏替换原则 (LSP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#liskov-substitution-principle-lsp
I: 接口隔离原则 (ISP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#interface-segregation-principle-isp
D: 依赖反转原则 (DIP)https://patch-diff.githubusercontent.com/gbcr/clean-code-php#dependency-inversion-principle-dip
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#single-responsibility-principle-srp
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#开闭原则-ocp
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#里氏替换原则-lsp
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#接口隔离原则-isp
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#依赖倒置原则-dip
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#别写重复代码-dry
DRYhttps://en.wikipedia.org/wiki/Don%27t_repeat_yourself
Classeshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#classes
⬆ 返回顶部https://patch-diff.githubusercontent.com/gbcr/clean-code-php#%E7%9B%AE%E5%BD%95
https://patch-diff.githubusercontent.com/gbcr/clean-code-php#translations
https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/China.png
yangweijie/clean-code-phphttps://github.com/yangweijie/clean-code-php
php-cpm/clean-code-phphttps://github.com/php-cpm/clean-code-php
⬆ back to tophttps://patch-diff.githubusercontent.com/gbcr/clean-code-php#table-of-contents
Readme https://patch-diff.githubusercontent.com/gbcr/clean-code-php#readme-ov-file
MIT license https://patch-diff.githubusercontent.com/gbcr/clean-code-php#MIT-1-ov-file
Please reload this pagehttps://patch-diff.githubusercontent.com/gbcr/clean-code-php
Activityhttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/activity
0 starshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/stargazers
1 watchinghttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/watchers
0 forkshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/forks
Report repository https://patch-diff.githubusercontent.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fgbcr%2Fclean-code-php&report=gbcr+%28user%29
Releaseshttps://patch-diff.githubusercontent.com/gbcr/clean-code-php/releases
Packages 0https://patch-diff.githubusercontent.com/users/gbcr/packages?repo_name=clean-code-php
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

Viewport: width=device-width


URLs of crawlers that visited me.