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 | |
declare(strict_types = 1); | |
namespace /** @todo define namespace */; | |
/** @todo Define dependencies for the builder (e.g. DI). */ | |
use \Example\MyClass\User; | |
class UserBuilder |
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 | |
class UserBuilder { | |
/** | |
* Private variables, constructor, build function... | |
*/ | |
/** | |
* Set the value for first_name. | |
* |
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 \Example\MyClass; | |
class User { | |
/** @var int $id */ | |
public $id; | |
/** @var string $first_name */ |
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
func TestWithFunctions(t *testing.T) { | |
type setupFunc func(t *testing.T, <other options>) | |
type checkFunc func(t *testing.T, <other options>) | |
testCases := map[string]struct{ | |
setupFn setupFunc | |
checkFn checkFunc | |
wantResult interface{} | |
wantError error | |
}{ |