Completed
Push — master ( f6f21a...97b7b4 )
by Oscar
05:30
created
src/Providers/Templates.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     public function getServices()
14 14
     {
15 15
         return [
16
-            'templates' => function (App $app): Engine {
16
+            'templates' => function(App $app): Engine {
17 17
                 $root = dirname(dirname(__DIR__));
18 18
 
19 19
                 $templates = new Engine($root.'/templates');
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
                 $templates->addData(['app' => $app]);
23 23
 
24
-                $templates->registerFunction('icon', function ($name) use ($icons) {
24
+                $templates->registerFunction('icon', function($name) use ($icons) {
25 25
                     return $icons->get($name);
26 26
                 });
27 27
 
Please login to merge, or discard this patch.
src/Admin.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * Use the app as a middleware component.
35 35
      *
36
-     * @param ServerRequestInterface $request
36
+     * @param \Psr\Http\Message\ServerRequestInterface $request
37 37
      * @param DelegateInterface      $delegate
38 38
      *
39
-     * @return ResponseInterface
39
+     * @return \Psr\Http\Message\ResponseInterface
40 40
      */
41 41
     public function process(ServerRequestInterface $request, DelegateInterface $delegate)
42 42
     {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     }
45 45
 
46 46
     /**
47
-     * @return ResponseInterface
47
+     * @return \Psr\Http\Message\ResponseInterface
48 48
      */
49 49
     public function __invoke(ServerRequestInterface $request): ResponseInterface
50 50
     {
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,12 +4,9 @@
 block discarded – undo
4 4
 
5 5
 use Fol\{App, NotFoundException};
6 6
 use Folk\Entities\EntityInterface;
7
-use Folk\Entities\SingleEntityInterface;
8 7
 use Psr\Http\Message\{ServerRequestInterface, ResponseInterface, UriInterface};
9 8
 use Interop\Http\ServerMiddleware\MiddlewareInterface;
10 9
 use Interop\Http\ServerMiddleware\DelegateInterface;
11
-use Zend\Diactoros\Response;
12
-use Relay\RelayBuilder;
13 10
 
14 11
 /**
15 12
  * Main manager.
Please login to merge, or discard this patch.
src/Entities/File.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Folk\Entities;
4 4
 
5 5
 use Folk\SearchQuery;
6
-use SimpleCrud\Row;
7 6
 use FilesystemIterator;
8 7
 use RecursiveDirectoryIterator;
9 8
 use Exception;
Please login to merge, or discard this patch.
src/Entities/Yaml.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
      */
30 30
     protected function parse(string $source): array
31 31
     {
32
-        return (array) SymfonyYaml::parse($source);
32
+        return (array)SymfonyYaml::parse($source);
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
src/SearchQuery.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function setPage($page): self
92 92
     {
93
-        $this->page = (int) $page;
93
+        $this->page = (int)$page;
94 94
 
95 95
         return $this;
96 96
     }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function setLimit(int $limit): self
116 116
     {
117
-        $this->limit = (int) $limit;
117
+        $this->limit = (int)$limit;
118 118
 
119 119
         return $this;
120 120
     }
Please login to merge, or discard this patch.
src/Providers/Middleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
     public function getServices()
14 14
     {
15 15
         return [
16
-            'middleware' => function (App $app): Dispatcher {
16
+            'middleware' => function(App $app): Dispatcher {
17 17
                 $middleware = [];
18 18
 
19 19
                 $middleware[] = new Middlewares\Expires();
20 20
                 $middleware[] = (new Middlewares\ErrorHandler())
21 21
                     ->catchExceptions(true)
22
-                    ->statusCode(function ($code) {
22
+                    ->statusCode(function($code) {
23 23
                         return $code > 400 && $code < 600;
24 24
                     })
25 25
                     ->arguments($app);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 $middleware[] = new Middlewares\ContentType();
30 30
                 $middleware[] = new Middlewares\ContentLanguage(['en', 'gl', 'es']);
31 31
 
32
-                $middleware[] = function ($request, $next) use ($app) {
32
+                $middleware[] = function($request, $next) use ($app) {
33 33
                     $language = $request->getHeaderLine('Accept-Language');
34 34
                     $translator = new Translator();
35 35
                     $translator->loadTranslations(Translations::fromPoFile(dirname(dirname(__DIR__)).'/locales/'.$language.'.po'));
Please login to merge, or discard this patch.
templates/nav.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 		<?php foreach ($app->getAllEntities() as list($e, $id)): ?>
16 16
 		<li>
17 17
 			<?php 
18
-			if ($id === null) {
19
-				$url = $app->getRoute('search', ['entity' => $e->getName()]);
20
-			} else {
21
-				$url = $app->getRoute('read', ['entity' => $e->getName(), 'id' => $id]);
22
-			}
23
-			?>
18
+            if ($id === null) {
19
+                $url = $app->getRoute('search', ['entity' => $e->getName()]);
20
+            } else {
21
+                $url = $app->getRoute('read', ['entity' => $e->getName(), 'id' => $id]);
22
+            }
23
+            ?>
24 24
 			<a href="<?= $url ?>" title="<?= $e->description ?>"<?= ($entityName === $e->getName()) ? ' class="is-active"' : '' ?>>
25 25
 				<?= $this->icon($e->icon ?: 'file/folder_open') ?>
26 26
 				<strong><?= $e->title ?></strong>
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 
38 38
 	<form action="<?= $app->getRoute('search', ['entity' => $entityName]) ?>" class="menu-secondary-search" data-module="search" method="get" tabindex="-1">
39 39
 		<?php 
40
-		if ($app->getEntityId($entityName) === null) {
41
-			$url = $app->getRoute('search', ['entity' => $entityName]);
42
-		} else {
43
-			$url = $app->getRoute('read', ['entity' => $entityName, 'id' => $id]);
44
-		}
45
-		?>
40
+        if ($app->getEntityId($entityName) === null) {
41
+            $url = $app->getRoute('search', ['entity' => $entityName]);
42
+        } else {
43
+            $url = $app->getRoute('read', ['entity' => $entityName, 'id' => $id]);
44
+        }
45
+        ?>
46 46
 
47 47
 		<a href="<?= $url ?>" title="<?= $entity->description ?>">
48 48
 			<?= $entity->title ?>
Please login to merge, or discard this patch.