Skip to content

Instantly share code, notes, and snippets.

Deprecating Legacy

Tomáš Votruba TomasVotruba

Deprecating Legacy
Block or report user

Report or block TomasVotruba

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
TomasVotruba / ecs.yaml
Last active Oct 17, 2019
Co bychom udělali jinak? - Spaceflow & Rector talk at Péhápkaři 2019/10, LMC
View ecs.yaml
# install: composer require symplify/easy-coding-standard --dev
# dry-run: vendor/bin/ecs check src
# run: vendor/bin/ecs check src --fix
# ----------------------------- Step 1 -----------------------------
# use ::class
Symplify\CodingStandard\Fixer\Php\ClassStringToClassConstantFixer: ~
View balls.diff
-/** @var DateTime $dateTime */
+assert($dateTime instanceof DateTime);
$dateTime = ...;
-/** @var int $vacationDays */
$vacationDays = ...;
TomasVotruba / PHPStanRule.php
Created Aug 22, 2019
[PHPStan] Don't use *X suffixed services in *Y suffixed class (here don't use *Repository outside *Facade) - do it generic next time
View PHPStanRule.php
<?php declare(strict_types=1);
namespace Spaceflow\PHPStan\Rector\Rule;
use Nette\Utils\Strings;
use PEAR_PackageFileManager_Fileset;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
View git-alias
f = fetch
# updates your branch with upstream (if fast-forward is possible)
ff = !git merge --ff-only `git rev-parse --symbolic-full-name --abbrev-ref=strict HEAD@{u}`
fp = fetch --prune
st = status
cm = commit
cma = commit --amend
br = branch
co = checkout
cp = cherry-pick
TomasVotruba /
Created Oct 8, 2017
Pass all types services in Symfony YAML config
You can’t perform that action at this time.