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/bash | |
| # Extract the ticket number from the branch name and prepend it in the commit message. | |
| # This script will run in the git hook prepare-commit-msg. | |
| BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
| MESSAGE_FILE=$1 | |
| MESSAGE=$(cat $MESSAGE_FILE) | |
| TICKET=$(echo $BRANCH | grep -Eo '^(\w+/)?(\w+[-_])?[0-9]+' | grep -Eo '(\w+[-])?[0-9]+' | tr "[:lower:]" "[:upper:]") |
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
| { | |
| "openapi": "3.0.0", | |
| "info": { | |
| "title": "Underwriting API", | |
| "version": "1.0" | |
| }, | |
| "servers": [ | |
| { | |
| "url": "http://localhost:3000" | |
| } |
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 | |
| echo \Foo\Bar\Apple::hello(); // hello Apple | |
| echo \Foo\Bar\hello(); // hello world | |
| echo \Foo\Bar\HELLO; // WORLD |
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 | |
| namespace Foo\Bar; | |
| class Apple() { | |
| public static function hello() { | |
| return 'hello Apple'; | |
| } | |
| } |
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 | |
| use App\Buah\Jambu; | |
| use App\Makanan\Jambu; | |
| echo App\Buah\Jambu::biji(); // 7 | |
| echo App\Makanan\Jambu::biji(); // 10 |
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 | |
| namespace App\Makanan; | |
| class Jambu { | |
| public static function biji() { | |
| return 10; | |
| } | |
| } |
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 | |
| namespace App\Buah; | |
| class Jambu { | |
| public static function biji() { | |
| return 7; | |
| } | |
| } |
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
| module ObserverInterface | |
| def update(observable) | |
| raise ImplementationError # Class ZBC not implemented method xyz | |
| end | |
| end | |
| class Risk | |
| include ObserverInterface | |
| include RiskInterface | |
| end |
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
| class MidwifeRegistrationService | |
| def initialize(options = {}) | |
| @params = options[:params] | |
| end | |
| def call | |
| create_user | |
| send_sms | |
| 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
| class RegistrationEndpoint < Grape::API | |
| params do | |
| optional :name | |
| optional :phone | |
| optional :email | |
| optional :password | |
| optional :password_confirmation | |
| end | |
| post :register do |
NewerOlder