8000 Merge pull request #1 from fising/master · webphper/design-patterns-by-php@167c5c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 167c5c5

Browse files
authored
Merge pull request hulin32#1 from fising/master
bug fixed
2 parents 8d86639 + a2bcb85 commit 167c5c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

files/chapter1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class OperationDiv extends Operation
6666
{
6767
public function getResult()
6868
{
69-
$this->a / $this->b;
69+
return $this->a / $this->b;
7070
}
7171
}
7272

files/chapter2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ConcreteStrategyB extends Strategy
3737
}
3838

3939
/**
40-
* 算法a
40+
* 算法c
4141
*/
4242
class ConcreteStrategyC extends Strategy
4343
{
@@ -92,10 +92,10 @@ class Context
9292
case 'a':
9393
$this->strategy = new ConcreteStrategyA();
9494
break;
95-
case 'a':
95+
case 'b':
9696
$this->strategy = new ConcreteStrategyB();
9797
break;
98-
case 'a':
98+
case 'c':
9999
$this->strategy = new ConcreteStrategyC();
100100
break;
101101
}

0 commit comments

Comments
 (0)
0