Merge pull request #753 from codeinabox/php-sbscalar-and-gs
Fixed PHP snippets for sbscalar and snbscalar, refactored gs
This commit is contained in:
commit
72683ae5da
@ -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
|
||||
|
@ -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};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user