From 44af023029b7e56644343e604d95863104c6d312 Mon Sep 17 00:00:00 2001 From: tfrommen Date: Sat, 26 Mar 2016 20:39:09 +0100 Subject: [PATCH] Wrap static method. --- .../src/calling-static-methods.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/php/1-bad-practices/src/calling-static-methods.php b/php/1-bad-practices/src/calling-static-methods.php index eac75e7..87e1976 100644 --- a/php/1-bad-practices/src/calling-static-methods.php +++ b/php/1-bad-practices/src/calling-static-methods.php @@ -1,10 +1,25 @@ checker = $checker; + } + public function render_if_okay( $data ) { - if ( ThirdPartyChecker::is_okay( $data ) ) { + if ( $this->checker->is_okay( $data ) ) { echo $data; } }