@@ -12,38 +12,38 @@ discard block |
||
| 12 | 12 | * @date 19.07.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | $rootDir = getcwd(); |
| 18 | -$libsDir = $rootDir . DIRECTORY_SEPARATOR . 'vendor'; |
|
| 19 | -$wwwDir = $rootDir . DIRECTORY_SEPARATOR . 'www'; |
|
| 20 | -$appDir = $rootDir . DIRECTORY_SEPARATOR . 'app'; |
|
| 21 | -$packagesDir = $appDir . DIRECTORY_SEPARATOR . 'config'; |
|
| 18 | +$libsDir = $rootDir.DIRECTORY_SEPARATOR.'vendor'; |
|
| 19 | +$wwwDir = $rootDir.DIRECTORY_SEPARATOR.'www'; |
|
| 20 | +$appDir = $rootDir.DIRECTORY_SEPARATOR.'app'; |
|
| 21 | +$packagesDir = $appDir.DIRECTORY_SEPARATOR.'config'; |
|
| 22 | 22 | |
| 23 | 23 | if (!file_exists($packagesDir)) { |
| 24 | 24 | if (is_writable(dirname($packagesDir))) { |
| 25 | 25 | mkdir($packagesDir); |
| 26 | 26 | |
| 27 | 27 | } else { |
| 28 | - die('Path "' . $packagesDir . '" does not exists.'); |
|
| 28 | + die('Path "'.$packagesDir.'" does not exists.'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | if (!is_writable($packagesDir)) { |
| 33 | - die('Path "' . $packagesDir . '" it not writable.'); |
|
| 33 | + die('Path "'.$packagesDir.'" it not writable.'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | foreach (['log', 'temp'] as $dir) { |
| 37 | - if (!is_dir($rootDir . DIRECTORY_SEPARATOR . $dir)) { |
|
| 38 | - mkdir($rootDir . DIRECTORY_SEPARATOR . $dir); |
|
| 37 | + if (!is_dir($rootDir.DIRECTORY_SEPARATOR.$dir)) { |
|
| 38 | + mkdir($rootDir.DIRECTORY_SEPARATOR.$dir); |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | -if (!file_exists($libsDir . DIRECTORY_SEPARATOR . 'autoload.php')) { |
|
| 42 | +if (!file_exists($libsDir.DIRECTORY_SEPARATOR.'autoload.php')) { |
|
| 43 | 43 | die('autoload.php file can not be found.'); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | -require_once $libsDir . DIRECTORY_SEPARATOR . 'autoload.php'; |
|
| 46 | +require_once $libsDir.DIRECTORY_SEPARATOR.'autoload.php'; |
|
| 47 | 47 | |
| 48 | 48 | $configurator = new Nette\Configurator; |
| 49 | 49 | $configurator->addParameters([ |
@@ -52,10 +52,10 @@ discard block |
||
| 52 | 52 | ]); |
| 53 | 53 | |
| 54 | 54 | //$configurator->setDebugMode(TRUE); // Debug mode HAVE TO BE enabled on production server |
| 55 | -$configurator->enableDebugger($packagesDir . DIRECTORY_SEPARATOR . 'log'); |
|
| 55 | +$configurator->enableDebugger($packagesDir.DIRECTORY_SEPARATOR.'log'); |
|
| 56 | 56 | |
| 57 | -$configurator->setTempDirectory($packagesDir . DIRECTORY_SEPARATOR . 'temp'); |
|
| 58 | -$configurator->addConfig(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.neon'); |
|
| 57 | +$configurator->setTempDirectory($packagesDir.DIRECTORY_SEPARATOR.'temp'); |
|
| 58 | +$configurator->addConfig(dirname(__DIR__).DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.neon'); |
|
| 59 | 59 | |
| 60 | 60 | $container = $configurator->createContainer(); |
| 61 | 61 | |
@@ -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 @@ 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 | |
@@ -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 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * @date 27.03.15 |
| 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 13.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 13.03.16 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -declare(strict_types = 1); |
|
| 15 | +declare(strict_types=1); |
|
| 16 | 16 | |
| 17 | 17 | namespace IPub\Packages; |
| 18 | 18 | |