diff --git a/UltiSnips/php-phpspec.snippets b/UltiSnips/php-phpspec.snippets index 297b73d..08d84a0 100644 --- a/UltiSnips/php-phpspec.snippets +++ b/UltiSnips/php-phpspec.snippets @@ -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 diff --git a/snippets/php.snippets b/snippets/php.snippets index d382a8b..826b845 100644 --- a/snippets/php.snippets +++ b/snippets/php.snippets @@ -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}; }