Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorkmaz committed Jun 21, 2017
1 parent 44239a2 commit b37b35e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions config/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

$container->setFactory(
TwigEnvironment::class, function () use ($config) {
$loader = new Twig\Loader\FilesystemLoader($config['app']['templates_dir']);
return new TwigEnvironment($loader, $config['app']);
}
$loader = new Twig\Loader\FilesystemLoader($config['app']['templates_dir']);
return new TwigEnvironment($loader, $config['app']);
}
);


Expand Down
2 changes: 1 addition & 1 deletion public/mobile/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
declare(strict_types=1);
require_once dirname(__DIR__,2) . '/src/apps/www/bootstrap.mobile.php';
require_once dirname(__DIR__, 2) . '/src/apps/www/bootstrap.mobile.php';
2 changes: 1 addition & 1 deletion public/site1/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
declare(strict_types=1);
require_once dirname(__DIR__,2) . '/src/apps/www/bootstrap.site1.php';
require_once dirname(__DIR__, 2) . '/src/apps/www/bootstrap.site1.php';
4 changes: 2 additions & 2 deletions src/apps/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
define('SYS_DIR', dirname(__DIR__, 2));
chdir(SYS_DIR);
require SYS_DIR . '/vendor/autoload.php';
$routes = require APP_DIR . '/routes.php';
$container = include SYS_DIR . '/config/sites/container.'.RUNTIME_PLATFORM.'.php';
$routes = include APP_DIR . '/routes.php';
$container = include SYS_DIR . '/config/sites/container.' . RUNTIME_PLATFORM . '.php';
$myApp = Selami\Foundation\App::selamiApplicationFactory($container);
$myApp->sendResponse();
4 changes: 2 additions & 2 deletions src/apps/www/bootstrap.mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if (strpos($_SERVER['REQUEST_URI'], '/en') === 0) {
$_appLang = 'en';
}
define('RUNTIME_PLATFORM','mobile');
define('RUNTIME_PLATFORM', 'mobile');
define('RUNTIME_LANG', $_appLang);
define('APP_DIR', __DIR__);
require dirname(__DIR__). '/bootstrap.php';
require dirname(__DIR__) . '/bootstrap.php';
4 changes: 2 additions & 2 deletions src/apps/www/bootstrap.site1.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if (strpos($_SERVER['REQUEST_URI'], '/en') === 0) {
$_appLang = 'en';
}
define('RUNTIME_PLATFORM','site1');
define('RUNTIME_PLATFORM', 'site1');
define('RUNTIME_LANG', $_appLang);
define('APP_DIR', __DIR__);
require dirname(__DIR__). '/bootstrap.php';
require dirname(__DIR__) . '/bootstrap.php';
2 changes: 1 addition & 1 deletion src/base/RuntimeApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class RuntimeApp
private $language;
private $type;

public function __construct(string $type, string $language = 'en')
public function __construct(string $type, string $language = 'en')
{
$this->language = $language;
$this->type = $type;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Cache/ClearConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ protected function execute(InputInterface $input, OutputInterface $output) : voi
$cachedConfigFiles = glob('./cache/*app_config.php');
foreach ($cachedConfigFiles as $cachedConfigFile){
$unlinkResult = file_exists($cachedConfigFile)
? (unlink($cachedConfigFile) === True) ? 'deleted.':'could\'t deleted'
? (unlink($cachedConfigFile) === true) ? 'deleted.':'could\'t deleted'
:' file does not exist';
$output->writeln($cachedConfigFile . ' ' . $unlinkResult );
$output->writeln($cachedConfigFile . ' ' . $unlinkResult);
}
}
}
4 changes: 2 additions & 2 deletions src/commands/Cache/ClearRouteDispatcherData.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ protected function execute(InputInterface $input, OutputInterface $output) : voi
{
$config = $this->container->get(Config::class);
$routeCacheFile = $config->app->get('cache_file', '');
$unlinkResult = file_exists($routeCacheFile)
$unlinkResult = file_exists((string) $routeCacheFile)
? unlink($routeCacheFile) ? 'deleted.' : 'could\'t deleted'
: 'does not exist!';
$output->writeln($routeCacheFile . ' ' . $unlinkResult );
$output->writeln('Route cache file ' .$routeCacheFile . ' ' . $unlinkResult);
}
}
4 changes: 2 additions & 2 deletions src/commands/Server/ServerRun.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ protected function configure() : void
{
$this
->setName('server:run')
->addOption('host',null, InputOption::VALUE_OPTIONAL, 'Hostname of the site', '127.0.0.1')
->addOption('public',null, InputOption::VALUE_OPTIONAL, 'Public web root.', './public')
->addOption('host', null, InputOption::VALUE_OPTIONAL, 'Hostname of the site', '127.0.0.1')
->addOption('public', null, InputOption::VALUE_OPTIONAL, 'Public web root.', './public')
->setDescription('Run web server locally');
}

Expand Down

0 comments on commit b37b35e

Please sign in to comment.