Skip to content

Commit

Permalink
Fix validation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosbth committed Aug 16, 2018
1 parent 0dddb24 commit 932e32f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions REVISION.md
Expand Up @@ -3,6 +3,13 @@ Revision history



v2.0.0-beta.3 (2018-08-16)
---------------------------------

* Fix validation errors.



v2.0.0-beta.2 (2018-08-15)
---------------------------------

Expand Down
2 changes: 2 additions & 0 deletions src/Controller/DevelopmentController.php
Expand Up @@ -23,6 +23,8 @@ class DevelopmentController implements ContainerInjectableInterface
* @throws Anax\Route\Exception\NotFoundException when route is not found.
* @return object as the response.
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function catchAll(...$args) : object
{
Expand Down
6 changes: 4 additions & 2 deletions src/Controller/FlatFileContentController.php
Expand Up @@ -21,13 +21,15 @@ class FlatFileContentController implements ContainerInjectableInterface
*
* @return mixed as null when flat file is not found and otherwise a
* complete response object with content to render.
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function catchAll(...$args)
{
// Get the current route and see if it matches a content/file
$path = $this->di->get("request")->getRoute();
$file1 = ANAX_INSTALL_PATH . "/content/${path}.md";
$file2 = ANAX_INSTALL_PATH . "/content/${path}/index.md";
$file1 = ANAX_INSTALL_PATH . "/content/{$path}.md";
$file2 = ANAX_INSTALL_PATH . "/content/{$path}/index.md";

$file = is_file($file1) ? $file1 : null;
$file = is_file($file2) ? $file2 : $file;
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/SampleController.php
Expand Up @@ -190,6 +190,8 @@ public function variadicActionGet(...$value) : string
* @param array $args as a variadic parameter.
*
* @return mixed
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function catchAll(...$args)
{
Expand Down

0 comments on commit 932e32f

Please sign in to comment.