Skip to content
Permalink
Browse files

cs & strict code fixes

  • Loading branch information...
dg committed Jul 27, 2017
1 parent 6e2bb39 commit a73c16c6248883929e712e2f6c71c192330b7dbb
@@ -27,7 +27,7 @@
$container = $configurator->createContainer();
// Setup router using mod_rewrite detection
if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) {
if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules(), true)) {
$router = $container->getByType(Nette\Application\IRouter::class);
$router[] = new Route('index.php', 'Dashboard:default', Route::ONE_WAY);
$router[] = new Route('<presenter>/<action>[/<id>]', 'Dashboard:default');
@@ -30,7 +30,7 @@ public function __construct(Nette\Database\Context $database)
*/
public function authenticate(array $credentials): Security\IIdentity
{
list($username, $password) = $credentials;
[$username, $password] = $credentials;
$row = $this->database->table('users')->where('username', $username)->fetch();
if (!$row) {
@@ -106,7 +106,7 @@ private function move($x, $y)
private function searchEmpty()
{
return array_search(0, $this->order);
return array_search(0, $this->order, true);
}
@@ -125,7 +125,7 @@ public function render()
public function loadState(array $params): void
{
if (isset($params['order'])) {
$params['order'] = explode('.', (string) $params['order']);
$params['order'] = array_map('intval', explode('.', (string) $params['order']));
// validate
$copy = $params['order'];
@@ -28,7 +28,7 @@
$container = $configurator->createContainer();
// Setup router using mod_rewrite detection
if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) {
if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules(), true)) {
$router = $container->getByType(Nette\Application\IRouter::class);
$router[] = new Route('index.php', 'Front:Default:default', Route::ONE_WAY);

0 comments on commit a73c16c

Please sign in to comment.
You can’t perform that action at this time.