@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function __construct() |
17 | 17 | { |
18 | - Logger::log(get_class($this) . ' constructor invoked'); |
|
18 | + Logger::log(get_class($this).' constructor invoked'); |
|
19 | 19 | $this->init(); |
20 | 20 | } |
21 | 21 | |
@@ -68,14 +68,14 @@ discard block |
||
68 | 68 | $calledClass = get_called_class(); |
69 | 69 | try { |
70 | 70 | $instance = InjectorHelper::constructInyectableInstance($variable, $singleton, $classNameSpace, $calledClass); |
71 | - $setter = "set" . ucfirst($variable); |
|
71 | + $setter = "set".ucfirst($variable); |
|
72 | 72 | if (method_exists($calledClass, $setter)) { |
73 | 73 | $this->$setter($instance); |
74 | - } else { |
|
74 | + }else { |
|
75 | 75 | $this->$variable = $instance; |
76 | 76 | } |
77 | - } catch (\Exception $e) { |
|
78 | - Logger::log($e->getMessage() . ': ' . $e->getFile() . ' [' . $e->getLine() . ']', LOG_ERR); |
|
77 | + }catch (\Exception $e) { |
|
78 | + Logger::log($e->getMessage().': '.$e->getFile().' ['.$e->getLine().']', LOG_ERR); |
|
79 | 79 | throw $e; |
80 | 80 | } |
81 | 81 | return $this; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | { |
89 | 89 | if (!$this->isLoaded()) { |
90 | 90 | $filename = sha1(get_class($this)); |
91 | - $cacheFilename = "reflections" . DIRECTORY_SEPARATOR . substr($filename, 0, 2) . DIRECTORY_SEPARATOR . substr($filename, 2, 2) . DIRECTORY_SEPARATOR . $filename . ".json"; |
|
91 | + $cacheFilename = "reflections".DIRECTORY_SEPARATOR.substr($filename, 0, 2).DIRECTORY_SEPARATOR.substr($filename, 2, 2).DIRECTORY_SEPARATOR.$filename.".json"; |
|
92 | 92 | /** @var \PSFS\base\Cache $cacheService */ |
93 | 93 | $cacheService = Cache::getInstance(); |
94 | 94 | /** @var \PSFS\base\config\Config $configService */ |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | $this->load($property, true, $class); |
105 | 105 | } |
106 | 106 | $this->setLoaded(); |
107 | - } else { |
|
108 | - Logger::log(get_class($this) . ' already loaded', LOG_INFO); |
|
107 | + }else { |
|
108 | + Logger::log(get_class($this).' already loaded', LOG_INFO); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | } |