8000 Merge branch 'master' of https://github.com/flyingalex/design-pattern… · sockstack/design-patterns-by-php@9aea560 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9aea560

Browse files
author
Hu Lin
committed
2 parents 06306e0 + 167c5c5 commit 9aea560

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