1
0
mirror of https://github.com/jupeter/clean-code-php.git synced 2025-09-26 22:18:59 +02:00
Commit Graph

90 Commits

Author SHA1 Message Date
Alexis Lefebvre
0368f8004a Restrict Method chaining to setters
Remove "I say" that adds no value
2017-09-05 12:24:02 +02:00
Tomáš Votruba
fd878a33f8 Merge pull request #58 from peter-gribanov/lsp
Liskov Substitution Principle (LSP)
2017-09-04 15:28:53 +02:00
Peter Gribanov
a71ad82a79 forgot ; 2017-09-04 13:06:19 +03:00
Peter Gribanov
32344ead21 correct access to $width and $height 2017-09-04 13:03:17 +03:00
Peter Gribanov
35e673e0ca Merge pull request #4 from jupeter/master
Update master
2017-09-04 12:58:46 +03:00
Tomáš Votruba
67e68e5cf1 Merge pull request #54 from EDDYMENS/master
fix typo
2017-09-04 11:01:17 +02:00
Tomáš Votruba
95f9f68d83 Merge pull request #56 from Zayon/patch-1
LSP good example correction
2017-09-04 11:00:39 +02:00
Pablo Godinez
6e01046113 LSP good example correction
See #55
2017-09-04 10:57:27 +02:00
eddymens
656e7ff6e6 fix typo 2017-09-04 08:21:53 +00:00
Tomáš Votruba
4be1dee2de Merge pull request #53 from emnsen/master
Fix variable spelling and syntax
2017-09-04 09:42:04 +02:00
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
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
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