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 | |
/* rest of the code here */ | |
/** | |
* @dataProvider providerUseInString | |
*/ | |
public function testUseInString($expected, $input) | |
{ | |
$fixer = new UnusedUseStatementsFixer(); |
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 "log" | |
const ( | |
KEY_1 = iota | |
KEY_2 | |
KEY_3 | |
KEY_4 | |
KEY_5 |
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 "testing" | |
var keys = randomKeys() | |
func BenchmarkDeferRecoverPanicMap(b *testing.B) { | |
for n := 0; n < b.N; n++ { | |
deferRecoverPanicMap() | |
} |
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 "math/rand" | |
var amount = 1000 | |
func main() { | |
deferRecoverPanicMap() | |
deferRecoverPanicSliceExpandable() | |
deferRecoverPanicSliceFixedSize() |
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 ( | |
"io" | |
"math/rand" | |
"strings" | |
) | |
var amount = 1000 |
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
# -*- coding: utf-8 -*- | |
""" | |
Gist embedding plugin for Pelican | |
================================= | |
This plugin allows you to embed `Gists`_ into your posts. | |
.. _Gists: https://gist.github.com/ | |
""" |
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 Domain; | |
use Symfony\Component\Validator\Constraints\Null as Null; | |
class CodeSnifferShellCommand implements ShellCommand { | |
private $bin; | |
private $codePath; | |
private $handleStdOutCallback; |
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 User implements JsonSerializable { | |
private $name; | |
private $email; | |
private $facebookId; | |
public function __construct($name, $email, $facebookId) { | |
$this->name = $name; | |
$this->email = $email; | |
$this->facebookId = $facebookId; |
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 User { | |
private $name; | |
private $email; | |
private $facebookId; | |
public function __construct($name, $email, $facebookId) { | |
$this->name = $name; | |
$this->email = $email; | |
$this->facebookId = $facebookId; |
OlderNewer