1
0
mirror of https://github.com/jupeter/clean-code-php.git synced 2025-09-25 21:49:04 +02:00
Commit Graph

70 Commits

Author SHA1 Message Date
Tomáš Votruba
bfce179c28 Merge pull request #47 from ConnorVG/patch-1
Fix Invalid Code
2017-09-01 22:01:10 +02:00
Tomáš Votruba
cf1598f2b4 Merge pull request #39 from peter-gribanov/dry
Don't repeat yourself [DRY]
2017-09-01 17:16:41 +02:00
Peter Gribanov
08c8cc7b07 missing a second "e" at the end of employee 2017-09-01 18:02:30 +03:00
Connor S. Parks
00358108d0 Fix Invalid Code
The "Avoid Side Effects" section's "Bad" code block is actually invalid code, `splitIntoFirstAndLastName()` will throw a notice of `Undefined variable`. We need a `$global` here.

I'm all for competing against code that people may have but there is no point comparing code that doesn't work in the first place, it's out of the bounds of this document.
2017-09-01 10:32:00 +01:00
Tomáš Votruba
80097dd168 Merge pull request #44 from peter-gribanov/addMonthToDate
Function names should say what they do
2017-08-31 20:09:42 +02:00
Tomáš Votruba
dcae9bca5d Merge pull request #25 from peter-gribanov/global_functions
Drop singleton
2017-08-31 20:07:46 +02:00
Tomáš Votruba
5520fef4a7 Merge pull request #41 from peter-gribanov/ocp
Open/Closed Principle (OCP)
2017-08-31 19:59:13 +02:00
Tomáš Votruba
3388621c59 Merge pull request #40 from peter-gribanov/one_level_abstraction
Move out dependencies  in one level abstraction
2017-08-31 19:55:01 +02:00
Tomáš Votruba
aa8a017520 Merge pull request #35 from peter-gribanov/avoid_type_checking1
Avoid type-checking (part 1)
2017-08-31 19:51:07 +02:00
Tomáš Votruba
399e3aa67b Merge pull request #33 from peter-gribanov/encapsulate_conditionals2
Encapsulate conditionals
2017-08-31 19:49:18 +02:00
Peter Gribanov
4c2133dbaf change example for Function names should say what they do 2017-08-31 17:39:13 +03:00
Peter Gribanov
b17ca6eeca remove not used methods 2017-08-31 16:49:56 +03:00
Peter Gribanov
14d4efba20 not use abstract class as interface 2017-08-31 16:49:16 +03:00
Peter Gribanov
c1e704ce69 correct CS 2017-08-31 16:46:29 +03:00
Peter Gribanov
a0d6ea9770 move out dependencies 2017-08-31 14:40:42 +03:00
Peter Gribanov
3c9845324f fix errors and correct CS 2017-08-31 14:10:18 +03:00
Peter Gribanov
465ca94b43 add DRY principle 2017-08-31 13:54:33 +03:00
Peter Gribanov
961e0061d7 Merge pull request #3 from jupeter/master
Update master
2017-08-31 13:24:38 +03:00
Tomáš Votruba
af83d6c05e Merge pull request #24 from peter-gribanov/showList
Optimize showList() function
2017-08-31 00:12:47 +02:00
Peter Gribanov
eccde56b6b use compact version of code 2017-08-30 21:54:23 +03:00
Tomáš Votruba
0c435d56d9 Merge pull request #34 from peter-gribanov/unneeded_context
Don't add unneeded context
2017-08-30 19:50:44 +02:00
Tomáš Votruba
b8ce6ca016 Merge pull request #36 from peter-gribanov/avoid_type_checking2
Avoid type-checking (part 2) require PHP 7+
2017-08-30 18:51:31 +02:00
Peter Gribanov
783fe13451 Avoid type-checking (part 2) require PHP 7+ 2017-08-30 19:40:07 +03:00
Peter Gribanov
825836b201 optimize example of avoid type-checking 1 2017-08-30 19:25:01 +03:00
Peter Gribanov
03a82e35c2 correct examples of don't add unneeded context 2017-08-30 19:18:03 +03:00
Peter Gribanov
dd259f3135 correct example of encapsulate conditionals 2017-08-30 19:14:00 +03:00
Peter Gribanov
02febd765b Merge pull request #2 from jupeter/master
Update master
2017-08-30 19:09:37 +03:00
Tomáš Votruba
3743661c54 Merge pull request #28 from litvinchuk/patch-1
Make verifyCredentials public after SRP splitting
2017-08-30 17:52:04 +02:00
Peter Gribanov
19b95ac77d add section: Don't use a Singleton pattern 2017-08-30 18:47:04 +03:00
Tomáš Votruba
68a02db2b0 Merge pull request #29 from PaVeL-Ekt/master
Correction of typos
2017-08-30 17:18:58 +02:00
Pavel
1ddff50a9b Correction of typos 2017-08-30 14:44:26 +05:00
Sergiy Litvinchuk
413895b25c make verifyCredentials public after SRP splitting 2017-08-30 11:08:51 +03:00
Peter Gribanov
3c0c05e032 add bad singleton example and remove YAML config 2017-08-30 10:45:54 +03:00
Piotr Plenik
c56681e39f Merge pull request #19 from peter-gribanov/explanatory_variables
[Enhancement] Decrease dependence on regex
2017-08-29 22:47:54 +02:00
Piotr Plenik
ce41bd300a Merge pull request #21 from peter-gribanov/menuConfig
[Bugfix] Correct declaration MenuConfig class
2017-08-29 22:11:52 +02:00
Piotr Plenik
3ac0c666ef Merge pull request #20 from peter-gribanov/mental_mapping
[Bugfix] Correct use foreach
2017-08-29 22:11:19 +02:00
Piotr Plenik
5311cc4f13 Merge pull request #12 from solival/patch-1
Update README.md
2017-08-29 21:52:02 +02:00
Piotr Plenik
f7d8907da3 Merge pull request #10 from naffiq/patch-1
Fixed array key=>value assign
2017-08-29 21:51:42 +02:00
Piotr Plenik
805e9e91f8 Merge pull request #9 from Vlassiuk/master
no need for minus before variable
2017-08-29 21:51:26 +02:00
Peter Gribanov
f6e0fe38bc Singleton is a anti-pattern 2017-08-29 19:41:38 +03:00
Peter Gribanov
ee26d57559 Optimize showList function 2017-08-29 19:23:58 +03:00
Peter Gribanov
e14421cf1a Correct declaration MenuConfig class 2017-08-29 18:25:37 +03:00
Peter Gribanov
08d73d655e correct use foreach 2017-08-29 18:18:18 +03:00
Peter Gribanov
c806ccd373 decrease dependence on regex 2017-08-29 18:04:53 +03:00
vlassiuk
78803ded9b arrays syntax 2017-08-29 11:26:26 +03:00
vlassiuk
b4c9b75b21 function, of course 2017-08-29 11:22:13 +03:00
vlassiuk
8739c9f0a8 function, of course 2017-08-29 11:21:12 +03:00
Valerii Kuznetsov
bfe98f0d26 Update README.md
Looks like a bug in good practice.
2017-08-29 08:10:09 +12:00
Galymzhan Abdugalimov
6987a2eb73 Fixed array key=>value assign 2017-08-28 22:16:17 +06:00
vlassiuk
d89d27ad8c no need for minus before variable 2017-08-28 16:11:02 +03:00