Skip to content

Commit

Permalink
phpcs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
n0nag0n committed Mar 15, 2024
1 parent ebe0613 commit 4f52e1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function testUrlParametersWithJapaneseAndParam()
$this->router->map('/わたしはひとです/@name', function ($name) {
echo $name;
});
$this->request->url = '/'.urlencode('わたしはひとです').'/'.urlencode('ええ');
$this->request->url = '/' . urlencode('わたしはひとです') . '/' . urlencode('ええ');

$this->check('ええ');
}
Expand All @@ -244,7 +244,7 @@ public function testRegExParametersCyrillic()
$this->router->map('/категория/@name:[абвгдеёжзийклмнопрстуфхцчшщъыьэюя]+', function ($name) {
echo $name;
});
$this->request->url = '/'.urlencode('категория').'/'.urlencode('цветя');
$this->request->url = '/' . urlencode('категория') . '/' . urlencode('цветя');

$this->check('цветя');
}
Expand Down
4 changes: 2 additions & 2 deletions tests/server/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@

// Test 16: UTF8 Chars in url with utf8 params
Flight::route('/わたしはひとです/@name', function ($name) {
echo '<span id="infotext">Route text:</span> This route status is that it <span style="color:'.($name === 'ええ' ? 'green' : 'red').'; font-weight: bold;">'.($name === 'ええ' ? 'succeeded' : 'failed').' URL Param: '.$name.'</span>';
echo '<span id="infotext">Route text:</span> This route status is that it <span style="color:' . ($name === 'ええ' ? 'green' : 'red') . '; font-weight: bold;">' . ($name === 'ええ' ? 'succeeded' : 'failed') . ' URL Param: ' . $name . '</span>';
});

// Test 17: Slash in param
Flight::route('/redirect/@id', function ($id) {
echo '<span id="infotext">Route text:</span> This route status is that it <span style="color:'.($id === 'before/after' ? 'green' : 'red').'; font-weight: bold;">'.($id === 'before/after' ? 'succeeded' : 'failed').' URL Param: '.$id.'</span>';
echo '<span id="infotext">Route text:</span> This route status is that it <span style="color:' . ($id === 'before/after' ? 'green' : 'red') . '; font-weight: bold;">' . ($id === 'before/after' ? 'succeeded' : 'failed') . ' URL Param: ' . $id . '</span>';
});
}, [ new LayoutMiddleware() ]);

Expand Down

0 comments on commit 4f52e1a

Please sign in to comment.