@@ -40,6 +40,9 @@ |
||
| 40 | 40 | return $fpath; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $classFqn |
|
| 45 | + */ |
|
| 43 | 46 | private function resolvePath($classFqn): array |
| 44 | 47 | { |
| 45 | 48 | $resolved = null; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Psi\Bundle\ObjectRender\Template; |
| 6 | 6 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if (0 === strpos($classFqn, $namespace)) { |
| 52 | - return [$namespace, $path]; |
|
| 52 | + return [ $namespace, $path ]; |
|
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use Symfony\Component\Debug\Debug; |
| 5 | 5 | use Symfony\Component\HttpFoundation\Request; |
| 6 | 6 | |
| 7 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
| 7 | +require __DIR__.'/../../vendor/autoload.php'; |
|
| 8 | 8 | |
| 9 | 9 | Debug::enable(); |
| 10 | 10 | require_once __DIR__.'/../app/AppKernel.php'; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | new \Twig_SimpleFunction('psi_render_object', null, [ |
| 21 | 21 | 'node_class' => RenderObjectNode::class, |
| 22 | 22 | ], [ |
| 23 | - 'is_safe' => ['html'], |
|
| 23 | + 'is_safe' => [ 'html' ], |
|
| 24 | 24 | ]), |
| 25 | 25 | ]; |
| 26 | 26 | } |
@@ -20,8 +20,8 @@ |
||
| 20 | 20 | $locator = $container->getDefinition('psi_object_render.template.locator'); |
| 21 | 21 | |
| 22 | 22 | // sort by namespace length |
| 23 | - $mapping = $config['mapping']; |
|
| 24 | - uksort($mapping, function ($one, $two) { |
|
| 23 | + $mapping = $config[ 'mapping' ]; |
|
| 24 | + uksort($mapping, function($one, $two) { |
|
| 25 | 25 | return strlen($two) - strlen($one); |
| 26 | 26 | }); |
| 27 | 27 | $locator->replaceArgument(0, $mapping); |