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 requestcontext | |
type RequestLogger struct{} | |
type User struct{} | |
type RequestContextValues struct { | |
Logger RequestLogger | |
User User | |
} |
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 | |
$parentClass = 'Some\Class\Name'; | |
$anonObject = new class() extends $parentClass {}; |
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 | |
class CreativeMarket_Sniffs_Functions_FunctionLengthSniff implements PHP_CodeSniffer_Sniff | |
{ | |
const MAX_NUM_LINES = 30; | |
/** | |
* Returns an array of tokens this test wants to listen for. | |
* | |
* @return array |
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
<span translate>Hello</span> | |
<!-- This one works standard, normal, no issues --> | |
<span translate>{{ widget_title }}</span> | |
<!-- How about this case? --> |
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
/** | |
* This defines a simple widget | |
*/ | |
function simpleWidget(){}; | |
simpleWidget.$tags = [ | |
{name: 'widget', value: {width: 1, height: 1}} | |
]; | |
/** | |
* This defines a more complex one that depends on other services |
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
swiftmailer: | |
spool: { type: memory } | |
transport: smtp | |
host: mailtrap.io | |
username: xxxxxxxx | |
password: xxxxxxxx | |
encryption: ~ | |
auth_mode: plain | |
port: 2525 |
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
var SomeObject = { | |
views: { | |
firstPage: _.memoize(function(){ | |
return new FirstPageView(); | |
}) // Here all we have done is declare a function | |
// This function was never executed | |
}, | |
renderFirstPage: function() { | |
var v = this.views.firstPage(); // Either the function is executed |
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
function EasterEgg(egg, cb) { | |
this.egg = egg; | |
this.cb = cb; | |
this.start(); | |
} | |
EasterEgg.prototype.start = function() { | |
var egg = this.egg; | |
var buffer = []; | |
var cb = this.cb; |
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
describe(['class_to_be_tested'], function(my_class){ | |
// Jasmine code | |
}); |
NewerOlder