View GetCustomerJourneyCatalogResponse.php
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\CustomerJourney\UI\Response; | |
use App\Common\App\ResponseInterface; | |
use App\Common\AssetManager; | |
use App\CustomerJourney\Domain\CustomerJourney; |
View Do-only-once
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 | |
//... | |
private function ensureTransactionStarted() | |
{ | |
if (!$this->transactionStarted) { | |
$this->em->beginTransaction(); | |
$this->transactionStarted = true; | |
} | |
} |
View golang_string_length
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
str := "Hello, ⌘" | |
// Print length of string variable "str" |
View golang-memory-cache
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
package memory_cache | |
type DataCache struct { | |
data map[string]string | |
} | |
func (s dataCache) Get(key string) (string, bool) { | |
if val, ok := s.data[key]; ok { | |
return val, true | |
} |
View PHP 3 Solid UserManager
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 | |
namespace App\Manager; | |
use App\Service\Joke\ProviderInterface; | |
use App\Entity\User; | |
use Psr\Container\Container; | |
class UserManager { | |
public $em; |