PHP´s magic ::class
-constant will not canonical the casing of your imports.
This can lead to hard to debug errors when you a using a case sensitive service PSR-11
-locator like Zend\ServiceManager
.
namespace FirstNamespace;
class TestClass {}
<?php | |
abstract class Command | |
{ | |
// Self-validating command | |
public static function loadValidatorMetadata(ClassMetadata $metadata): void | |
{ | |
$metadata->addConstraint( | |
new Callback(function(Command $command, ExecutionContextInterface $context) { | |
$reflClass = new \ReflectionClass($command); |
<?php | |
// -- types are a compile-time propagated concept | |
// https://psalm.dev/r/338f74a96c | |
class TheType | |
{ | |
/** @var string */ | |
public $foo = 'bar'; | |
} |
<?php | |
declare(strict_types=1); | |
namespace Test\Feature; | |
use Shared\Domain\DomainEvent; | |
use Shared\Domain\EventSourcedAggregateRoot; | |
use Webmozart\Assert\Assert; | |
use function array_shift; |
// ==UserScript== | |
// @name BitMex USD Converter | |
// @namespace https://bitmex.com/ | |
// @version 0.11 | |
// @description Get some sanity into your gambling. | |
// @author koinkraft | |
// @grant none | |
// @include https://bitmex.com/* | |
// @include https://www.bitmex.com/* | |
// @require https://code.jquery.com/jquery-2.1.4.min.js |
PHP´s magic ::class
-constant will not canonical the casing of your imports.
This can lead to hard to debug errors when you a using a case sensitive service PSR-11
-locator like Zend\ServiceManager
.
namespace FirstNamespace;
class TestClass {}
<?php | |
namespace AppBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Psr\Log\LoggerInterface; | |
/** | |
* This class is now a service, so you can use normal __construct DI if you want! | |
*/ |
package de.espend.idea.php.annotation.reference; | |
import com.intellij.openapi.util.TextRange; | |
import com.intellij.patterns.PlatformPatterns; | |
import com.intellij.psi.*; | |
import com.intellij.util.ArrayUtil; | |
import com.intellij.util.IncorrectOperationException; | |
import com.intellij.util.ProcessingContext; | |
import com.jetbrains.php.PhpIndex; | |
import com.jetbrains.php.lang.documentation.phpdoc.lexer.PhpDocTokenTypes; |
git rebase -i HEAD~2 (squash) letzten 2 Commits | |
git rebase -i master alle Commits die im aktuellen Branch mehr enthalten sind als im master | |
git rebase --continue (nach gelösten Konflikten weiter machen) | |
git rebase --abort (rebase abrechen) | |
git push --force-with-lease http://movingfast.io/articles/git-force-pushing/ | |
git pull --rebase origin develop (rebasing) | |
git branch -d bugfix/fix (lokalen branch löschen) |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |