Fixed PHP snippets for sbscalar and snbscalar, refactored gs
This commit is contained in:
parent
e840b91a4e
commit
09068dc107
@ -23,7 +23,7 @@ class `!p
|
|||||||
snip.rv = re.match(r'.*(?=\.)', fn).group()
|
snip.rv = re.match(r'.*(?=\.)', fn).group()
|
||||||
` extends ObjectBehavior
|
` extends ObjectBehavior
|
||||||
{
|
{
|
||||||
function it${1}()
|
function it_${1}()
|
||||||
{
|
{
|
||||||
$0
|
$0
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ snip.rv = re.match(r'.*(?=\.)', fn).group()
|
|||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet it "function it_does_something() { ... }"
|
snippet it "function it_does_something() { ... }"
|
||||||
function it${1}()
|
function it_${1}()
|
||||||
{
|
{
|
||||||
${0:${VISUAL}}
|
${0:${VISUAL}}
|
||||||
}
|
}
|
||||||
@ -163,11 +163,11 @@ endsnippet
|
|||||||
|
|
||||||
# Scalar type matchers
|
# Scalar type matchers
|
||||||
snippet sbscalar "$this->XYZ()->shouldBeString|Array|Bool()"
|
snippet sbscalar "$this->XYZ()->shouldBeString|Array|Bool()"
|
||||||
$this->${1:method}()->shouldBe(${2:'String|Array|Bool'});
|
$this->${1:method}()->shouldBe${2:String|Array|Bool}();
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet snbscalar "$this->XYZ()->shouldNotBeString|Array|Bool()"
|
snippet snbscalar "$this->XYZ()->shouldNotBeString|Array|Bool()"
|
||||||
$this->${1:method}()->shouldNotBe(${2:'String|Array|Bool'});
|
$this->${1:method}()->shouldNotBe${2:String|Array|Bool}();
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
# Contain matcher
|
# Contain matcher
|
||||||
|
@ -391,13 +391,13 @@ snippet ve "Dumb debug helper in HTML"
|
|||||||
snippet pc "Dumb debug helper in cli"
|
snippet pc "Dumb debug helper in cli"
|
||||||
var_export($1);$0
|
var_export($1);$0
|
||||||
# Getters & Setters
|
# Getters & Setters
|
||||||
snippet gs
|
snippet gs "PHP Class Getter Setter"
|
||||||
/**
|
/**
|
||||||
* Gets the value of ${1:foo}
|
* Gets the value of ${1:foo}
|
||||||
*
|
*
|
||||||
* @return ${2:$1}
|
* @return ${2:string}
|
||||||
*/
|
*/
|
||||||
public function get${3:$2}()
|
public function get${3:$1}()
|
||||||
{
|
{
|
||||||
return $this->${4:$1};
|
return $this->${4:$1};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user