@@ -59,8 +59,7 @@ |
||
| 59 | 59 | if ($input->getOption('config')) |
| 60 | 60 | { |
| 61 | 61 | $config = $reader->getConfiguration($input->getOption('config')); |
| 62 | - } |
|
| 63 | - elseif (is_file('archivr.json')) |
|
| 62 | + } elseif (is_file('archivr.json')) |
|
| 64 | 63 | { |
| 65 | 64 | $config = $reader->getConfiguration('archivr.json'); |
| 66 | 65 | } |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | { |
| 42 | 42 | $vaultConfiguration->setConflictHandler('preferLocal'); |
| 43 | 43 | } |
| 44 | - } |
|
| 45 | - elseif ($preferRemote) |
|
| 44 | + } elseif ($preferRemote) |
|
| 46 | 45 | { |
| 47 | 46 | foreach ($configuration->getVaultConfigurations() as $vaultConfiguration) |
| 48 | 47 | { |
@@ -53,16 +53,13 @@ discard block |
||
| 53 | 53 | if (is_string($factory)) |
| 54 | 54 | { |
| 55 | 55 | $instance = new $factory(...$params); |
| 56 | - } |
|
| 57 | - elseif ($factory instanceof \Closure) |
|
| 56 | + } elseif ($factory instanceof \Closure) |
|
| 58 | 57 | { |
| 59 | 58 | $instance = $factory(...$params); |
| 60 | - } |
|
| 61 | - elseif (is_object($factory)) |
|
| 59 | + } elseif (is_object($factory)) |
|
| 62 | 60 | { |
| 63 | 61 | $instance = $factory; |
| 64 | - } |
|
| 65 | - else |
|
| 62 | + } else |
|
| 66 | 63 | { |
| 67 | 64 | throw new \LogicException(); |
| 68 | 65 | } |
@@ -101,12 +98,10 @@ discard block |
||
| 101 | 98 | { |
| 102 | 99 | throw new \RuntimeException(sprintf('Trying to register factory named "%s" to "%s" as class name "%s" which does not exist.', $name, static::class, $factory)); |
| 103 | 100 | } |
| 104 | - } |
|
| 105 | - elseif ($factory instanceof \Closure) |
|
| 101 | + } elseif ($factory instanceof \Closure) |
|
| 106 | 102 | { |
| 107 | 103 | // cannot really validate |
| 108 | - } |
|
| 109 | - elseif (is_object($factory)) |
|
| 104 | + } elseif (is_object($factory)) |
|
| 110 | 105 | { |
| 111 | 106 | if ($type = static::requiresInstanceOf()) |
| 112 | 107 | { |
@@ -115,8 +110,7 @@ discard block |
||
| 115 | 110 | throw new \RuntimeException(sprintf('Trying to register service instance named "%s" to "%s" as which is not an instance of "%s".', $name, static::class, $type)); |
| 116 | 111 | } |
| 117 | 112 | } |
| 118 | - } |
|
| 119 | - else |
|
| 113 | + } else |
|
| 120 | 114 | { |
| 121 | 115 | throw new \InvalidArgumentException(sprintf('Invalid factory of type "%s" named "%s" given to "%s".', gettype($factory), $name, static::class)); |
| 122 | 116 | } |