Fixed PHP snippets for sbscalar and snbscalar, refactored gs

This commit is contained in:
Mathew Attlee 2016-06-16 19:27:02 +01:00
parent e840b91a4e
commit 09068dc107
2 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ class `!p
snip.rv = re.match(r'.*(?=\.)', fn).group()
` extends ObjectBehavior
{
function it${1}()
function it_${1}()
{
$0
}
@ -31,7 +31,7 @@ snip.rv = re.match(r'.*(?=\.)', fn).group()
endsnippet
snippet it "function it_does_something() { ... }"
function it${1}()
function it_${1}()
{
${0:${VISUAL}}
}
@ -163,11 +163,11 @@ endsnippet
# Scalar type matchers
snippet sbscalar "$this->XYZ()->shouldBeString|Array|Bool()"
$this->${1:method}()->shouldBe(${2:'String|Array|Bool'});
$this->${1:method}()->shouldBe${2:String|Array|Bool}();
endsnippet
snippet snbscalar "$this->XYZ()->shouldNotBeString|Array|Bool()"
$this->${1:method}()->shouldNotBe(${2:'String|Array|Bool'});
$this->${1:method}()->shouldNotBe${2:String|Array|Bool}();
endsnippet
# Contain matcher

View File

@ -391,13 +391,13 @@ snippet ve "Dumb debug helper in HTML"
snippet pc "Dumb debug helper in cli"
var_export($1);$0
# Getters & Setters
snippet gs
snippet gs "PHP Class Getter Setter"
/**
* 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};
}