From 3cb8aea787549ca68d231b19ac2fec7bf78dae73 Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Fri, 29 Nov 2013 11:56:00 -0500 Subject: [PATCH] Fix DI typo --- _posts/06-02-01-Basic-Concept.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_posts/06-02-01-Basic-Concept.md b/_posts/06-02-01-Basic-Concept.md index 520415b..727ba7a 100644 --- a/_posts/06-02-01-Basic-Concept.md +++ b/_posts/06-02-01-Basic-Concept.md @@ -4,10 +4,10 @@ isChild: true ## Basic Concept {#basic_concept_title} -We can demonstrate the concept with a simple, yet naive. +We can demonstrate the concept with a simple, yet naive example. -Here we have a `Database` class that requires an adapter to speak to the database. We instantiate the -adapter in the constructor and create a hard dependency. This makes testing difficult and means the `Database` class is +Here we have a `Database` class that requires an adapter to speak to the database. We instantiate the +adapter in the constructor and create a hard dependency. This makes testing difficult and means the `Database` class is very tightly coupled to the adapter. {% highlight php %} @@ -46,6 +46,6 @@ class Database class MysqlAdapter {} {% endhighlight %} -Now we are giving the `Database` class it's dependency rather than it creating it itself. We could even create a method -that would accept an argument of the dependency and set it that way, or if the `$adapter` property was `public` we could +Now we are giving the `Database` class it's dependency rather than it creating it itself. We could even create a method +that would accept an argument of the dependency and set it that way, or if the `$adapter` property was `public` we could set it directly.