@@ -18,7 +18,6 @@ |
||
| 18 | 18 | |
| 19 | 19 | use Symfony\Component\Console\Input; |
| 20 | 20 | use Symfony\Component\Console\Output; |
| 21 | - |
|
| 22 | 21 | use IPub\Packages\DependencyResolver; |
| 23 | 22 | use IPub\Packages\Exceptions; |
| 24 | 23 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 19.07.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Commands; |
| 18 | 18 | |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | |
| 19 | 19 | use Nette; |
| 20 | 20 | use Nette\Utils; |
| 21 | - |
|
| 22 | 21 | use IPub\Packages\Exceptions; |
| 23 | 22 | |
| 24 | 23 | /** |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @date 27.09.14 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Entities; |
| 18 | 18 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $this->composerData = $composerData; |
| 50 | 50 | |
| 51 | 51 | if (!isset($composerData['name'])) { |
| 52 | - throw new Exceptions\UnexpectedValueException('Unknown package, has no name defined (' . json_encode($composerData) . ').'); |
|
| 52 | + throw new Exceptions\UnexpectedValueException('Unknown package, has no name defined ('.json_encode($composerData).').'); |
|
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
@@ -16,13 +16,10 @@ |
||
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Loaders; |
| 18 | 18 | |
| 19 | -use Composer; |
|
| 20 | 19 | use Composer\Semver; |
| 21 | - |
|
| 22 | 20 | use Nette; |
| 23 | 21 | use Nette\DI; |
| 24 | 22 | use Nette\Utils; |
| 25 | - |
|
| 26 | 23 | use IPub\Packages\Entities; |
| 27 | 24 | use IPub\Packages\Exceptions; |
| 28 | 25 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @date 30.05.15 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Loaders; |
| 18 | 18 | |
@@ -117,10 +117,10 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | foreach ($this->packageFiles as $packageFile) { |
| 120 | - if (is_file($path . DIRECTORY_SEPARATOR . $packageFile)) { |
|
| 121 | - $class = $this->getPackageClassByFile($path . DIRECTORY_SEPARATOR . $packageFile); |
|
| 120 | + if (is_file($path.DIRECTORY_SEPARATOR.$packageFile)) { |
|
| 121 | + $class = $this->getPackageClassByFile($path.DIRECTORY_SEPARATOR.$packageFile); |
|
| 122 | 122 | |
| 123 | - include_once $path . DIRECTORY_SEPARATOR . $packageFile; |
|
| 123 | + include_once $path.DIRECTORY_SEPARATOR.$packageFile; |
|
| 124 | 124 | |
| 125 | 125 | $package = $this->container->createInstance($class, [$data]); |
| 126 | 126 | |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | if (isset($tokens[$i][1])) { |
| 240 | - $namespace = $namespace ? $namespace . "\\" . $tokens[$i][1] : $tokens[$i][1]; |
|
| 240 | + $namespace = $namespace ? $namespace."\\".$tokens[$i][1] : $tokens[$i][1]; |
|
| 241 | 241 | $dlm = TRUE; |
| 242 | 242 | } |
| 243 | 243 | |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $class_name = $tokens[$i][1]; |
| 252 | 252 | |
| 253 | 253 | |
| 254 | - $classes[] = $namespace . '\\' . $class_name; |
|
| 254 | + $classes[] = $namespace.'\\'.$class_name; |
|
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | |
| 19 | 19 | use Nette; |
| 20 | 20 | use Nette\Utils; |
| 21 | - |
|
| 22 | 21 | use IPub\Packages\DependencyResolver; |
| 23 | 22 | use IPub\Packages\Entities; |
| 24 | 23 | use IPub\Packages\Exceptions; |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @date 30.05.15 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages; |
| 18 | 18 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | throw new \RuntimeException('Package path is missing.'); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - if (!file_exists($file = $path . DIRECTORY_SEPARATOR . 'composer.json')) { |
|
| 177 | + if (!file_exists($file = $path.DIRECTORY_SEPARATOR.'composer.json')) { |
|
| 178 | 178 | throw new \RuntimeException('\'composer.json\' is missing.'); |
| 179 | 179 | } |
| 180 | 180 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | return $packageData['version']; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | - if (file_exists($file = $this->vendorDir . DIRECTORY_SEPARATOR . 'composer' . DIRECTORY_SEPARATOR . 'installed.json')) { |
|
| 187 | + if (file_exists($file = $this->vendorDir.DIRECTORY_SEPARATOR.'composer'.DIRECTORY_SEPARATOR.'installed.json')) { |
|
| 188 | 188 | $installed = Utils\Json::decode(file_get_contents($file), Utils\Json::FORCE_ARRAY); |
| 189 | 189 | |
| 190 | 190 | foreach ($installed as $packageData) { |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | |
| 581 | 581 | // Check if package is registered |
| 582 | 582 | if (!$packagesConfig->offsetExists($package->getName())) { |
| 583 | - throw new Exceptions\InvalidStateException(sprintf('Package "%s" is not registered. Please call ' . get_called_class() . '::registerAvailable first.', $package->getName())); |
|
| 583 | + throw new Exceptions\InvalidStateException(sprintf('Package "%s" is not registered. Please call '.get_called_class().'::registerAvailable first.', $package->getName())); |
|
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | $packagesConfig[$package->getName()][self::PACKAGE_STATUS] = $status; |
@@ -666,6 +666,6 @@ discard block |
||
| 666 | 666 | */ |
| 667 | 667 | private function getPackageConfigPath() : string |
| 668 | 668 | { |
| 669 | - return $this->configDir . DIRECTORY_SEPARATOR . 'packages.php'; |
|
| 669 | + return $this->configDir.DIRECTORY_SEPARATOR.'packages.php'; |
|
| 670 | 670 | } |
| 671 | 671 | } |
@@ -19,7 +19,6 @@ |
||
| 19 | 19 | use Symfony\Component\Console\Helper\QuestionHelper; |
| 20 | 20 | use Symfony\Component\Console\Input; |
| 21 | 21 | use Symfony\Component\Console\Output; |
| 22 | - |
|
| 23 | 22 | use IPub\Packages\DependencyResolver; |
| 24 | 23 | use IPub\Packages\Exceptions; |
| 25 | 24 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 19.07.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Commands; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 27.06.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\DependencyResolver; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 30.09.14 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Loaders; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 12.07.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Exceptions; |
| 18 | 18 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 21.06.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages\Exceptions; |
| 18 | 18 | |