@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function register(Fol $app) |
| 14 | 14 | { |
| 15 | - $app['templates'] = function ($app) { |
|
| 15 | + $app['templates'] = function($app) { |
|
| 16 | 16 | $root = dirname(dirname(__DIR__)); |
| 17 | 17 | |
| 18 | 18 | $templates = new Engine($root.'/templates'); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | $templates->addData(['app' => $app]); |
| 22 | 22 | |
| 23 | - $templates->registerFunction('icon', function ($name) use ($icons) { |
|
| 23 | + $templates->registerFunction('icon', function($name) use ($icons) { |
|
| 24 | 24 | return $icons->get($name); |
| 25 | 25 | }); |
| 26 | 26 | |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Psr\Http\Message\ServerRequestInterface as Request; |
| 6 | 6 | use Psr\Http\Message\ResponseInterface as Response; |
| 7 | 7 | use Folk\Admin; |
| 8 | -use Folk\Entities\EntityInterface; |
|
| 9 | 8 | use Zend\Diactoros\Response\RedirectResponse; |
| 10 | 9 | |
| 11 | 10 | class UpdateEntity extends Entity |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Psr\Http\Message\ServerRequestInterface as Request; |
| 6 | 6 | use Psr\Http\Message\ResponseInterface as Response; |
| 7 | 7 | use Folk\Admin; |
| 8 | -use Folk\Entities\EntityInterface; |
|
| 9 | 8 | use Zend\Diactoros\Response\RedirectResponse; |
| 10 | 9 | |
| 11 | 10 | class UpdateEntity extends Entity |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Psr\Http\Message\ServerRequestInterface as Request; |
| 6 | 6 | use Psr\Http\Message\ResponseInterface as Response; |
| 7 | 7 | use Folk\Admin; |
| 8 | -use Folk\Entities\EntityInterface; |
|
| 9 | 8 | use Zend\Diactoros\Response\RedirectResponse; |
| 10 | 9 | |
| 11 | 10 | class UpdateEntity extends Entity |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Psr\Http\Message\ServerRequestInterface as Request; |
| 6 | 6 | use Psr\Http\Message\ResponseInterface as Response; |
| 7 | 7 | use Folk\Admin; |
| 8 | -use Folk\Entities\EntityInterface; |
|
| 9 | 8 | use Zend\Diactoros\Response\RedirectResponse; |
| 10 | 9 | |
| 11 | 10 | class UpdateEntity extends Entity |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function register(Fol $app) |
| 14 | 14 | { |
| 15 | - $app['middlewares'] = function ($app) { |
|
| 15 | + $app['middlewares'] = function($app) { |
|
| 16 | 16 | return [ |
| 17 | - Middleware::create(function () use ($app) { |
|
| 17 | + Middleware::create(function() use ($app) { |
|
| 18 | 18 | if ($app->has('users')) { |
| 19 | 19 | return Middleware::DigestAuthentication($app['users']); |
| 20 | 20 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | ->arguments($app) |
| 27 | 27 | ->catchExceptions(), |
| 28 | 28 | |
| 29 | - Middleware::create(function () { |
|
| 29 | + Middleware::create(function() { |
|
| 30 | 30 | return class_exists('Whoops\\Run') ? Middleware::whoops() : false; |
| 31 | 31 | }), |
| 32 | 32 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | Middleware::languageNegotiator(['en', 'gl', 'es']), |
| 42 | 42 | |
| 43 | - function ($request, $response, $next) { |
|
| 43 | + function($request, $response, $next) { |
|
| 44 | 44 | $language = Middleware\LanguageNegotiator::getLanguage($request); |
| 45 | 45 | $translator = new Translator(); |
| 46 | 46 | $translator->loadTranslations(Translations::fromPoFile(dirname(dirname(__DIR__)).'/locales/'.$language.'.po')); |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | /** |
| 102 | 102 | * Returns the page number. |
| 103 | 103 | * |
| 104 | - * @return null|int |
|
| 104 | + * @return integer |
|
| 105 | 105 | */ |
| 106 | 106 | public function getPage() |
| 107 | 107 | { |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | public function setPage($page) |
| 119 | 119 | { |
| 120 | - $this->page = (int) $page; |
|
| 120 | + $this->page = (int)$page; |
|
| 121 | 121 | |
| 122 | 122 | return $this; |
| 123 | 123 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function setLimit($limit) |
| 143 | 143 | { |
| 144 | - $this->limit = (int) $limit; |
|
| 144 | + $this->limit = (int)$limit; |
|
| 145 | 145 | |
| 146 | 146 | return $this; |
| 147 | 147 | } |