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

243 Commits

Author SHA1 Message Date
Emin Şen
820a6a1d9e Fix variable spelling and syntax
Functions don't start with "new".
"$req" variable incorrect variable name, "$request" good.
Class construct syntax.
2017-09-04 04:58:47 +03:00
Tomáš Votruba
69222649e9 Merge pull request #52 from guilhermeportela/patch-1
Fix variable type in PHPDoc
2017-09-04 00:47:21 +02:00
Tomáš Votruba
9e8f2fd73e Merge pull request #49 from mstruebing/fix/matchersToMatches
Correct spelling
2017-09-04 00:46:54 +02:00
Tomáš Votruba
a64ad7fb87 Merge pull request #50 from emnsen/master
Duplicated fixes.
2017-09-04 00:46:07 +02:00
Guilherme Portela
0c89c48adb Fix variable type in PHPDoc 2017-09-03 10:20:14 -03:00
Emin Şen
c058329bff foreach loop syntax fixed.
does not use "in" syntax, it uses "as"
2017-09-02 16:08:24 +03:00
Emin Şen
cc9896241a Duplicated fixes.
Duplicate variables removed.
Variable names updated.
2017-09-02 15:57:43 +03:00
Max Strübing
1a0c0c0f56 Correct spelling 2017-09-02 11:31:49 +02:00
Tomáš Votruba
1db3e5301b Merge pull request #48 from litvinchuk/patch-2
Pass $name and $email to parent constructor in EmployeeTaxData
2017-09-01 22:09:20 +02:00
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
Peter Gribanov
2992a4f3fd remove Manager in ISP 2017-09-01 17:34:44 +03:00
Sergiy Litvinchuk
a77a62d7ce Pass $name and $email to parent constructor in EmployeeTaxData 2017-09-01 12:32:09 +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
e31b5b86ce add comment 2017-08-31 18:33:00 +03:00
Peter Gribanov
80bd47f9fa Manager manage workers 2017-08-31 18:27:33 +03:00
Peter Gribanov
4c2133dbaf change example for Function names should say what they do 2017-08-31 17:39:13 +03:00
Peter Gribanov
9c1f626a0e сhange dependencies without changing manager code 2017-08-31 17:31:41 +03:00
Peter Gribanov
2a04e3d6ac correct CS 2017-08-31 17:28:47 +03:00
Peter Gribanov
a64e611fa6 correct word "employee" 2017-08-31 17:25:11 +03:00
Peter Gribanov
e24c70fe7c manager is also an employe. his work is to manage others 2017-08-31 17:16:51 +03:00
Peter Gribanov
84ca341bfa manager can manage several employees 2017-08-31 17:13:13 +03:00
Peter Gribanov
d2d59eae49 rename method Manager::setWorker() to Manager::subdue() 2017-08-31 17:11:03 +03:00
Peter Gribanov
83eef477e9 rename Worker to Employe 2017-08-31 17:06:55 +03:00
Peter Gribanov
e15b99fb59 correct CS 2017-08-31 16:59:29 +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