This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
/** | |
* Даны два разных механизма расширения обработки Http-сообщений: | |
* один в стиле PSR-7, другой — в стиле Symfony HttpFoundation. | |
* | |
* Нужно написать класс, который позволит интегрировать | |
* PSR Middleware в Symfony. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Дано: последовательность натуральных чисел (потенциально бесконечная). | |
* | |
* Требуется: | |
* 1. Написать функцию, которая принимает на вход эту последовательность | |
* и после обработки n элементов выдаёт не более m наибольших чисел | |
* среди уже обработанных отсортированных в порядке возрастания или убывания. | |
* 2. Оценить временную сложность алгоритма как O(f(n, m)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Typhoon\Exporter\Exporter; | |
require_once 'vendor/autoload.php'; | |
final class City | |
{ | |
public function __construct( | |
public string $name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace HardcorePhpCourse2\Infrastructure\MessageBus; | |
use Symfony\Component\DependencyInjection\ChildDefinition; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | |
use VUdaltsov\SymfonyCourse\Infrastructure\MessageBus\Handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App; | |
use Psr\Log\AbstractLogger; | |
final class LoggerStub extends AbstractLogger | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace ExtendedTypeSystem\Reflection\ClassLocator; | |
use Composer\Autoload\ClassLoader; | |
use ExtendedTypeSystem\Reflection\ClassLocator; | |
use ExtendedTypeSystem\Reflection\Source; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vendor: composer.json composer.lock | |
composer install | |
touch vendor | |
db: vendor | |
php bin/console wait $(DB_HOST):$(DB_PORT) | |
php bin/console doctrine:database:create --if-not-exists | |
php bin/console doctrine:migrations:migrate --no-interaction | |
.PHONY: db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @psalm-immutable | |
* @template TResult | |
*/ | |
interface Message | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
use HappyInc\Tool\Rector\ReadOnlyPublicPropertyRector; | |
use HappyInc\Tool\Rector\UuidTRector; | |
use Rector\Config\RectorConfig; | |
use Rector\Core\Configuration\Option; | |
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; | |
use Rector\Php71\Rector\FuncCall\CountOnNullRector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace HappyInc\Infrastructure; | |
/** | |
* @psalm-pure | |
*/ | |
function mb_ucfirst(string $string): string |
NewerOlder