@@ -73,8 +73,7 @@ discard block |
||
| 73 | 73 | if ($this->isStaticMethod($instance, $method)) |
| 74 | 74 | { |
| 75 | 75 | $output = $instance::{$method}( $this->prepareParams($params) ); |
| 76 | - } |
|
| 77 | - else |
|
| 76 | + } else |
|
| 78 | 77 | { |
| 79 | 78 | $output = $instance->{$method}($this->prepareParams($params)); |
| 80 | 79 | } |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | $found = true; |
| 131 | 130 | } |
| 132 | 131 | } |
| 133 | - } |
|
| 134 | - else |
|
| 132 | + } else |
|
| 135 | 133 | { |
| 136 | 134 | $found = true; |
| 137 | 135 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | //-------------------------------------------------------------------- |
| 25 | 25 | |
| 26 | - public function __construct(LibraryFinderInterface $finder=null, CacheInterface $cache=null) |
|
| 26 | + public function __construct(LibraryFinderInterface $finder = null, CacheInterface $cache = null) |
|
| 27 | 27 | { |
| 28 | 28 | if (is_object($finder)) |
| 29 | 29 | { |
@@ -50,14 +50,14 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @return null|string |
| 52 | 52 | */ |
| 53 | - public function display($library, $params=null, $cache_name=null, $cache_ttl=0) |
|
| 53 | + public function display($library, $params = null, $cache_name = null, $cache_ttl = 0) |
|
| 54 | 54 | { |
| 55 | 55 | list($class, $method) = $this->determineClass($library); |
| 56 | 56 | |
| 57 | 57 | // Is it cached? |
| 58 | - $cache_name = ! empty($cache_name) ? $cache_name : $class . $method . md5(serialize($params)); |
|
| 58 | + $cache_name = !empty($cache_name) ? $cache_name : $class.$method.md5(serialize($params)); |
|
| 59 | 59 | |
| 60 | - if (! empty($this->cache) && $output = $this->cache->get($cache_name)) |
|
| 60 | + if (!empty($this->cache) && $output = $this->cache->get($cache_name)) |
|
| 61 | 61 | { |
| 62 | 62 | return $output; |
| 63 | 63 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | if ($this->isStaticMethod($instance, $method)) |
| 74 | 74 | { |
| 75 | - $output = $instance::{$method}( $this->prepareParams($params) ); |
|
| 75 | + $output = $instance::{$method}($this->prepareParams($params)); |
|
| 76 | 76 | } |
| 77 | 77 | else |
| 78 | 78 | { |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // Can we cache it? |
| 83 | - if (! empty($this->cache) && $cache_ttl !== 0) |
|
| 83 | + if (!empty($this->cache) && $cache_ttl !== 0) |
|
| 84 | 84 | { |
| 85 | 85 | $this->cache->set($cache_name, $output, $cache_ttl); |
| 86 | 86 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | public function __construct() |
| 10 | 10 | { |
| 11 | - $this->ci =& get_instance(); |
|
| 11 | + $this->ci = & get_instance(); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | //-------------------------------------------------------------------- |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function get($key) |
| 28 | 28 | { |
| 29 | 29 | // Does CI even have a cache engine loaded? |
| 30 | - if (! is_object($this->ci->cache)) |
|
| 30 | + if (!is_object($this->ci->cache)) |
|
| 31 | 31 | { |
| 32 | 32 | return false; |
| 33 | 33 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | public function set($key, $content, $ttl) |
| 49 | 49 | { |
| 50 | 50 | // Does CI even have a cache engine loaded? |
| 51 | - if (! is_object($this->ci->cache)) |
|
| 51 | + if (!is_object($this->ci->cache)) |
|
| 52 | 52 | { |
| 53 | 53 | return true; |
| 54 | 54 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function find($class) |
| 16 | 16 | { |
| 17 | - $ci =& get_instance(); |
|
| 17 | + $ci =& get_instance(); |
|
| 18 | 18 | |
| 19 | 19 | $ci->load->library($class); |
| 20 | 20 | |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function find($class) |
| 16 | 16 | { |
| 17 | - $ci =& get_instance(); |
|
| 17 | + $ci = & get_instance(); |
|
| 18 | 18 | |
| 19 | 19 | $ci->load->library($class); |
| 20 | 20 | |