@@ -31,9 +31,10 @@ class Factory
3131 // type
3232 // alias => fqcn
3333 'adapter ' => [
34- 'array ' => '\\phpbu \\App \\Adapter \\PHPArray ' ,
35- 'dotenv ' => '\\phpbu \\App \\Adapter \\Dotenv ' ,
36- 'env ' => '\\phpbu \\App \\Adapter \\Env ' ,
34+ 'array ' => '\\phpbu \\App \\Adapter \\PHPArray ' ,
35+ 'constants ' => '\\phpbu \\App \\Adapter \\PHPConstant ' ,
36+ 'dotenv ' => '\\phpbu \\App \\Adapter \\Dotenv ' ,
37+ 'env ' => '\\phpbu \\App \\Adapter \\Env ' ,
3738 ],
3839 'logger ' => [
3940 'json ' => '\\phpbu \\App \\Log \\Json ' ,
@@ -94,8 +95,8 @@ class Factory
9495 *
9596 * @param string $type
9697 * @param string $alias
97- * @throws \phpbu\App\Exception
9898 * @return mixed
99+ *@throws Exception
99100 */
100101 protected function create ($ type , $ alias )
101102 {
@@ -114,12 +115,12 @@ protected function create($type, $alias)
114115 *
115116 * @param string $alias
116117 * @param array $conf
117- * @throws \phpbu\App\Exception
118- * @return \phpbu\App\Adapter
118+ * @return Adapter
119+ *@throws Exception
119120 */
120121 public function createAdapter ($ alias , $ conf = []) : Adapter
121122 {
122- /** @var \phpbu\App\ Adapter $adapter */
123+ /** @var Adapter $adapter */
123124 $ adapter = $ this ->create ('adapter ' , $ alias );
124125 if (!($ adapter instanceof Adapter)) {
125126 throw new Exception (sprintf ('adapter \'%s \' has to implement the \'Adapter \' interfaces ' , $ alias ));
@@ -133,12 +134,12 @@ public function createAdapter($alias, $conf = []) : Adapter
133134 *
134135 * @param string $alias
135136 * @param array $conf
136- * @throws \phpbu\App\Exception
137- * @return \phpbu\App\Log\Logger
137+ * @return Logger
138+ *@throws Exception
138139 */
139140 public function createLogger ($ alias , $ conf = []) : Logger
140141 {
141- /** @var \phpbu\App\Log\ Logger $logger */
142+ /** @var Logger $logger */
142143 $ logger = $ this ->create ('logger ' , $ alias );
143144 if (!($ logger instanceof Logger)) {
144145 throw new Exception (sprintf ('logger \'%s \' has to implement the \'Logger \' interfaces ' , $ alias ));
@@ -153,9 +154,9 @@ public function createLogger($alias, $conf = []) : Logger
153154 /**
154155 * Create a backup target
155156 *
156- * @param \phpbu\App\ Configuration\Backup\Target $conf
157- * @return \phpbu\App\Backup\ Target
158- * @throws \phpbu\App\ Exception
157+ * @param Configuration\Backup\Target $conf
158+ * @return Target
159+ * @throws Exception
159160 */
160161 public function createTarget (Configuration \Backup \Target $ conf ) : Target
161162 {
@@ -174,12 +175,12 @@ public function createTarget(Configuration\Backup\Target $conf) : Target
174175 *
175176 * @param string $alias
176177 * @param array $conf
177- * @throws \phpbu\App\Exception
178- * @return \phpbu\App\Backup\Source
178+ * @return Source
179+ *@throws Exception
179180 */
180181 public function createSource ($ alias , $ conf = []) : Source
181182 {
182- /** @var \phpbu\App\Backup\ Source $source */
183+ /** @var Source $source */
183184 $ source = $ this ->create ('source ' , $ alias );
184185 if (!($ source instanceof Source)) {
185186 throw new Exception (sprintf ('source \'%s \' has to implement the \'Source \' interface ' , $ alias ));
@@ -192,12 +193,12 @@ public function createSource($alias, $conf = []) : Source
192193 * Check Factory
193194 *
194195 * @param string $alias
195- * @throws \phpbu\App\Exception
196- * @return \phpbu\App\Backup\Check
196+ * @return Check
197+ *@throws Exception
197198 */
198199 public function createCheck ($ alias ) : Check
199200 {
200- /** @var \phpbu\App\Backup\ Check $check */
201+ /** @var Check $check */
201202 $ check = $ this ->create ('check ' , $ alias );
202203 if (!($ check instanceof Check)) {
203204 throw new Exception (sprintf ('Check \'%s \' has to implement the \'Check \' interface ' , $ alias ));
@@ -210,12 +211,12 @@ public function createCheck($alias) : Check
210211 *
211212 * @param string $alias
212213 * @param array $conf
213- * @throws \phpbu\App\Exception
214- * @return \phpbu\App\Backup\Crypter
214+ * @return Crypter
215+ *@throws Exception
215216 */
216217 public function createCrypter ($ alias , $ conf = []) : Crypter
217218 {
218- /** @var \phpbu\App\Backup\ Crypter $crypter */
219+ /** @var Crypter $crypter */
219220 $ crypter = $ this ->create ('crypter ' , $ alias );
220221 if (!($ crypter instanceof Crypter)) {
221222 throw new Exception (sprintf ('Crypter \'%s \' has to implement the \'Crypter \' interface ' , $ alias ));
@@ -229,12 +230,12 @@ public function createCrypter($alias, $conf = []) : Crypter
229230 *
230231 * @param string $alias
231232 * @param array $conf
232- * @throws \phpbu\App\Exception
233- * @return \phpbu\App\Backup\Sync
233+ * @return Sync
234+ *@throws Exception
234235 */
235236 public function createSync ($ alias , $ conf = []) : Sync
236237 {
237- /** @var \phpbu\App\Backup\ Sync $sync */
238+ /** @var Sync $sync */
238239 $ sync = $ this ->create ('sync ' , $ alias );
239240 if (!($ sync instanceof Sync)) {
240241 throw new Exception (sprintf ('sync \'%s \' has to implement the \'Sync \' interface ' , $ alias ));
@@ -248,12 +249,12 @@ public function createSync($alias, $conf = []) : Sync
248249 *
249250 * @param string $alias
250251 * @param array $conf
251- * @throws \phpbu\App\Exception
252- * @return \phpbu\App\Backup\Cleaner
252+ * @return Cleaner
253+ *@throws Exception
253254 */
254255 public function createCleaner ($ alias , $ conf = []) : Cleaner
255256 {
256- /** @var \phpbu\App\Backup\ Cleaner $cleaner */
257+ /** @var Cleaner $cleaner */
257258 $ cleaner = $ this ->create ('cleaner ' , $ alias );
258259 if (!($ cleaner instanceof Cleaner)) {
259260 throw new Exception (sprintf ('cleaner \'%s \' has to implement the \'Cleaner \' interface ' , $ alias ));
@@ -269,7 +270,7 @@ public function createCleaner($alias, $conf = []) : Cleaner
269270 * @param string $alias Name the class is registered at
270271 * @param string $fqcn Full Qualified Class Name
271272 * @param boolean $force Overwrite already registered class
272- * @throws \phpbu\App\ Exception
273+ * @throws Exception
273274 */
274275 public static function register ($ type , $ alias , $ fqcn , $ force = false )
275276 {
@@ -286,7 +287,7 @@ public static function register($type, $alias, $fqcn, $force = false)
286287 * Throws an exception if type is invalid
287288 *
288289 * @param string $type
289- * @throws \phpbu\App\ Exception
290+ * @throws Exception
290291 */
291292 private static function checkType ($ type )
292293 {
0 commit comments