This file contains hidden or 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
#!/bin/sh | |
# This hook enforces the following commit message format "[PROJ-123] some message" | |
RED='\033[0;31m' | |
CYAN='\033[0;36m' | |
NC='\033[0m' # No Color | |
INPUT_FILE=$1 |
This file contains hidden or 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 | |
interface Maybe | |
{ | |
public function ifSome(callable $f): self; | |
} |
This file contains hidden or 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 com.myproject.myfeature | |
// Configuration of My Feature | |
interface Configuration { | |
// Returns whether the feature is enabled or not | |
public bool isFeatureEnabled(); | |
} |
This file contains hidden or 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
final case class Card(private val rank: Rank, private val suit: Suit) |
This file contains hidden or 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
final class Card { | |
private Rank rank; | |
private Suit suit; | |
public Card(Rank rank, Suit suit) { | |
this.rank = rank; | |
this.suit = suit; | |
} | |
public boolean sameAs(Card anotherCard) { |
This file contains hidden or 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 com.mywonderfulbnb.bnb.definition | |
final class Service { | |
private Bnbs Bnbs; | |
private ActivatedOwners activatedOwners; | |
private Publisher publisher; | |
private Logger logger; | |
public Service(Bnbs bnbs, ActivatedOwners activatedOwners, Publisher publisher, Logger logger) { | |
this.bnbs = bnbs; |
This file contains hidden or 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
final class Aborted extends Failure { | |
public Result<T> ✅(Consumer<T> f) { | |
return this; | |
} | |
public Result<T> ❌(Consumer<ExceptionStack> f) { | |
return this; | |
} | |
} |
This file contains hidden or 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 com.mywonderfulbnb.bnb.definition | |
final class Bnb implements ReadOnlyBnb { | |
private BnbId bnbId; | |
private OwnerId ownerId; | |
private Name name; | |
private Rooms rooms; | |
public Bnb(BnbId bnbId, OwnerId ownerId, Name name, Rooms rooms) { | |
this.bnbId = bnbId; |
This file contains hidden or 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 com.mywonderfulbnb.bnb.definition | |
interface Bnbs { | |
Optional<Bnb> load(BnbId); | |
void save(Bnb); | |
} |
This file contains hidden or 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 com.mywonderfulbnb.bnb.definition | |
final class Bnb { | |
private BnbId bnbId; | |
private OwnerId ownerId; | |
private Name name; | |
public Bnb(BnbId bnbId, OwnerId ownerId, Name name) { | |
this.bnbId = bnbId; | |
this.ownerId = ownerId; |
NewerOlder