Skip to content

Instantly share code, notes, and snippets.

@uxweb
Last active July 5, 2018 11:37
Show Gist options
  • Save uxweb/8812c2a1debaa0a4669f146774fe6556 to your computer and use it in GitHub Desktop.
Save uxweb/8812c2a1debaa0a4669f146774fe6556 to your computer and use it in GitHub Desktop.
Sublime Text PHP Snippets
<snippet>
<content><![CDATA[
class ${1:MyClass}
{
${2}
}$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>class</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
<snippet>
<content><![CDATA[
public function __construct($1)
{
$2
}$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>_c</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
<snippet>
<content><![CDATA[
public function ${1}()
{
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>met</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
<snippet>
<content><![CDATA[
protected function ${1}()
{
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>pmet</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
<snippet>
<content><![CDATA[
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ${1:Example}Test extends TestCase
{
${0}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>testcase</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.php</scope> -->
</snippet>
<snippet>
<content><![CDATA[
/** @test */
function ${1:the_one_where}()
{
${0}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>test</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment