Add html indent bundle

This commit is contained in:
Anton Vakhrushev 2018-07-18 21:40:17 +03:00
parent 218a911dfd
commit 8451c8abd0
12 changed files with 820 additions and 5 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@ output_*
node_modules/ node_modules/
var/ var/
vendor/ vendor/
.php_cs.cache

22
.php_cs Normal file
View File

@ -0,0 +1,22 @@
<?php
/* vim: set ft=php: */
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/app')
->in(__DIR__.'/bundle')
;
return PhpCsFixer\Config::create()
->setFinder($finder)
->setRules([
'@Symfony' => true,
'@PHP71Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => true,
'phpdoc_order' => true,
'no_useless_return' => true,
'semicolon_after_instruction' => false,
'yoda_style' => false,
])
;

View File

@ -24,6 +24,9 @@ format:
./tools/npm run format-style ./tools/npm run format-style
./tools/npm run format-md ./tools/npm run format-md
format-php:
./tools/php-cs-fixer fix
watch: build-assets watch: build-assets
./tools/sculpin generate \ ./tools/sculpin generate \
--env=dev \ --env=dev \

View File

@ -1,5 +1,6 @@
<?php <?php
use Homepage\HtmlPrettierBundle\HtmlPrettierBundle;
use Nickpeirson\Sculpin\Bundle\SitemapBundle\SculpinSitemapBundle; use Nickpeirson\Sculpin\Bundle\SitemapBundle\SculpinSitemapBundle;
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel; use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
@ -9,6 +10,7 @@ class SculpinKernel extends AbstractKernel
{ {
return [ return [
SculpinSitemapBundle::class, SculpinSitemapBundle::class,
HtmlPrettierBundle::class,
]; ];
} }
} }

View File

@ -0,0 +1,20 @@
<?php
namespace Homepage\HtmlPrettierBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
class HtmlPrettierExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}
}

View File

@ -0,0 +1,56 @@
<?php
namespace Homepage\HtmlPrettierBundle;
use Gajus\Dindent\Indenter;
use Sculpin\Core\Event\SourceSetEvent;
use Sculpin\Core\Sculpin;
use Sculpin\Core\Source\SourceSet;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class HtmlPrettier implements EventSubscriberInterface
{
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents(): array
{
return [
Sculpin::EVENT_AFTER_FORMAT => ['formatHtml', -100],
];
}
public function formatHtml(SourceSetEvent $event): void
{
$indenter = new Indenter([
'indentation_character' => ' ',
]);
$sources = $this->filterSource($event->sourceSet());
/** @var \Sculpin\Core\Source\SourceInterface $source */
foreach ($sources as $source) {
$html = $source->formattedContent();
$formatted = $indenter->indent($html);
$source->setFormattedContent($formatted);
}
}
private function filterSource(SourceSet $sourceSet): \Generator
{
/** @var \Sculpin\Core\Source\SourceInterface $source */
foreach ($sourceSet->allSources() as $source) {
$filename = $source->filename();
if ($this->endsWith($filename, '.md') || $this->endsWith($filename, '.html.twig')) {
yield $source;
}
}
}
private function endsWith($haystack, $needle): bool
{
$length = \strlen($needle);
return $length === 0 || (substr($haystack, -$length) === $needle);
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace Homepage\HtmlPrettierBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class HtmlPrettierBundle extends Bundle
{
public const class_name = __CLASS__;
}

View File

@ -0,0 +1,6 @@
services:
homepage.html_prettier:
class: \Homepage\HtmlPrettierBundle\HtmlPrettier
tags:
- { name: kernel.event_subscriber }

View File

@ -12,7 +12,9 @@
}, },
"require-dev": { "require-dev": {
"nickpeirson/sculpin-sitemap-bundle": "^0.1.1", "nickpeirson/sculpin-sitemap-bundle": "^0.1.1",
"sculpin/sculpin": "dev-develop" "sculpin/sculpin": "dev-develop",
"gajus/dindent": "^2.0",
"friendsofphp/php-cs-fixer": "^2.12"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

683
composer.lock generated
View File

@ -4,9 +4,115 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "31eb14ed998dc43cbde508a24f85ebfa", "content-hash": "aa37430d9fd1737d8ae7c225dce68609",
"packages": [], "packages": [],
"packages-dev": [ "packages-dev": [
{
"name": "composer/semver",
"version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "c7cb9a2095a074d131b65a8a0cd294479d785573"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573",
"reference": "c7cb9a2095a074d131b65a8a0cd294479d785573",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5 || ^5.0.5",
"phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"time": "2016-08-30T16:08:34+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08",
"reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0",
"psr/log": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Composer\\XdebugHandler\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "John Stevenson",
"email": "john-stevenson@blueyonder.co.uk"
}
],
"description": "Restarts a process without xdebug.",
"keywords": [
"Xdebug",
"performance"
],
"time": "2018-04-11T15:42:36+00:00"
},
{ {
"name": "dflydev/ant-path-matcher", "name": "dflydev/ant-path-matcher",
"version": "v1.0.3", "version": "v1.0.3",
@ -337,6 +443,74 @@
], ],
"time": "2012-10-28T21:08:28+00:00" "time": "2012-10-28T21:08:28+00:00"
}, },
{
"name": "doctrine/annotations",
"version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5",
"reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
"php": "^7.1"
},
"require-dev": {
"doctrine/cache": "1.*",
"phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Docblock Annotations Parser",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"annotations",
"docblock",
"parser"
],
"time": "2017-12-06T07:11:42+00:00"
},
{ {
"name": "doctrine/inflector", "name": "doctrine/inflector",
"version": "v1.3.0", "version": "v1.3.0",
@ -404,6 +578,60 @@
], ],
"time": "2018-01-09T20:05:19+00:00" "time": "2018-01-09T20:05:19+00:00"
}, },
{
"name": "doctrine/lexer",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\Lexer\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"lexer",
"parser"
],
"time": "2014-09-09T13:34:57+00:00"
},
{ {
"name": "evenement/evenement", "name": "evenement/evenement",
"version": "v2.1.0", "version": "v2.1.0",
@ -452,6 +680,142 @@
], ],
"time": "2017-07-17T17:39:19+00:00" "time": "2017-07-17T17:39:19+00:00"
}, },
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.12.2",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/dcc87d5414e9d0bd316fce81a5bedb9ce720b183",
"reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183",
"shasum": ""
},
"require": {
"composer/semver": "^1.4",
"composer/xdebug-handler": "^1.0",
"doctrine/annotations": "^1.2",
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^5.6 || >=7.0 <7.3",
"php-cs-fixer/diff": "^1.3",
"symfony/console": "^3.2 || ^4.0",
"symfony/event-dispatcher": "^3.0 || ^4.0",
"symfony/filesystem": "^3.0 || ^4.0",
"symfony/finder": "^3.0 || ^4.0",
"symfony/options-resolver": "^3.0 || ^4.0",
"symfony/polyfill-php70": "^1.0",
"symfony/polyfill-php72": "^1.4",
"symfony/process": "^3.0 || ^4.0",
"symfony/stopwatch": "^3.0 || ^4.0"
},
"conflict": {
"hhvm": "*"
},
"require-dev": {
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
"justinrainbow/json-schema": "^5.0",
"keradus/cli-executor": "^1.1",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.1",
"php-cs-fixer/accessible-object": "^1.0",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1",
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1",
"phpunitgoodpractices/traits": "^1.5.1",
"symfony/phpunit-bridge": "^4.0"
},
"suggest": {
"ext-mbstring": "For handling non-UTF8 characters in cache signature.",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
},
"bin": [
"php-cs-fixer"
],
"type": "application",
"autoload": {
"psr-4": {
"PhpCsFixer\\": "src/"
},
"classmap": [
"tests/Test/AbstractFixerTestCase.php",
"tests/Test/AbstractIntegrationCaseFactory.php",
"tests/Test/AbstractIntegrationTestCase.php",
"tests/Test/Assert/AssertTokensTrait.php",
"tests/Test/IntegrationCase.php",
"tests/Test/IntegrationCaseFactory.php",
"tests/Test/IntegrationCaseFactoryInterface.php",
"tests/Test/InternalIntegrationCaseFactory.php",
"tests/TestCase.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Dariusz Rumiński",
"email": "dariusz.ruminski@gmail.com"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "A tool to automatically fix PHP code style",
"time": "2018-07-06T10:37:40+00:00"
},
{
"name": "gajus/dindent",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/gajus/dindent.git",
"reference": "d81c3a6f78fbe1ab26f5e753098bbbef6b6a9f3c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/gajus/dindent/zipball/d81c3a6f78fbe1ab26f5e753098bbbef6b6a9f3c",
"reference": "d81c3a6f78fbe1ab26f5e753098bbbef6b6a9f3c",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
"satooshi/php-coveralls": "dev-master"
},
"type": "library",
"autoload": {
"psr-4": {
"Gajus\\Dindent\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Gajus Kuizinas",
"email": "gk@anuary.com"
}
],
"description": "HTML indentation library for development and testing.",
"homepage": "https://github.com/gajus/dindent",
"keywords": [
"format",
"html",
"indent"
],
"time": "2014-10-08T10:03:04+00:00"
},
{ {
"name": "michelf/php-markdown", "name": "michelf/php-markdown",
"version": "1.8.0", "version": "1.8.0",
@ -594,6 +958,106 @@
], ],
"time": "2016-10-07T17:18:47+00:00" "time": "2016-10-07T17:18:47+00:00"
}, },
{
"name": "paragonie/random_compat",
"version": "v2.0.17",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d",
"reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
},
"require-dev": {
"phpunit/phpunit": "4.*|5.*"
},
"suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
},
"type": "library",
"autoload": {
"files": [
"lib/random.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paragon Initiative Enterprises",
"email": "security@paragonie.com",
"homepage": "https://paragonie.com"
}
],
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"keywords": [
"csprng",
"polyfill",
"pseudorandom",
"random"
],
"time": "2018-07-04T16:31:37+00:00"
},
{
"name": "php-cs-fixer/diff",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/diff.git",
"reference": "78bb099e9c16361126c86ce82ec4405ebab8e756"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756",
"reference": "78bb099e9c16361126c86ce82ec4405ebab8e756",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7.23 || ^6.4.3",
"symfony/process": "^3.3"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "SpacePossum"
}
],
"description": "sebastian/diff v2 backport support for PHP5.6",
"homepage": "https://github.com/PHP-CS-Fixer",
"keywords": [
"diff"
],
"time": "2018-02-15T16:58:55+00:00"
},
{ {
"name": "psr/container", "name": "psr/container",
"version": "1.0.0", "version": "1.0.0",
@ -1722,6 +2186,60 @@
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-06-25T12:29:19+00:00" "time": "2018-06-25T12:29:19+00:00"
}, },
{
"name": "symfony/options-resolver",
"version": "v4.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "45cdcc8a96ef92b43a50723e6d1f5f83096e8cef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/45cdcc8a96ef92b43a50723e6d1f5f83096e8cef",
"reference": "45cdcc8a96ef92b43a50723e6d1f5f83096e8cef",
"shasum": ""
},
"require": {
"php": "^7.1.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\OptionsResolver\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony OptionsResolver Component",
"homepage": "https://symfony.com",
"keywords": [
"config",
"configuration",
"options"
],
"time": "2018-05-31T10:17:53+00:00"
},
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.8.0", "version": "v1.8.0",
@ -1836,6 +2354,120 @@
], ],
"time": "2018-04-26T10:06:28+00:00" "time": "2018-04-26T10:06:28+00:00"
}, },
{
"name": "symfony/polyfill-php70",
"version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "77454693d8f10dd23bb24955cffd2d82db1007a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6",
"reference": "77454693d8f10dd23bb24955cffd2d82db1007a6",
"shasum": ""
},
"require": {
"paragonie/random_compat": "~1.0|~2.0",
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php70\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2018-04-26T10:06:28+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46",
"reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2018-04-26T10:06:28+00:00"
},
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v3.4.12", "version": "v3.4.12",
@ -1885,6 +2517,55 @@
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-05-30T04:24:30+00:00" "time": "2018-05-30T04:24:30+00:00"
}, },
{
"name": "symfony/stopwatch",
"version": "v4.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "07463bbbbbfe119045a24c4a516f92ebd2752784"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/07463bbbbbfe119045a24c4a516f92ebd2752784",
"reference": "07463bbbbbfe119045a24c4a516f92ebd2752784",
"shasum": ""
},
"require": {
"php": "^7.1.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Stopwatch\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
"time": "2018-02-19T16:51:42+00:00"
},
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v3.4.12", "version": "v3.4.12",

View File

@ -1,9 +1,7 @@
<nav class="navigation"> <nav class="navigation">
<ul class="navigation__actions"> <ul class="navigation__actions">
<li class="navigation__action"> <li class="navigation__action">
<a class="navigation__link" href="/"> <a class="navigation__link" href="/">Главная</a>
Главная
</a>
</li> </li>
</ul> </ul>
</nav> </nav>

13
tools/php-cs-fixer Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
source .env
docker run \
--rm \
--interactive \
--tty \
--init \
--user "$UID:$(id -g)" \
--volume="$PWD:/srv/app" \
${PHP_IMAGE} \
./vendor/bin/php-cs-fixer "$@"