Skip to content

Instantly share code, notes, and snippets.

View recca0120's full-sized avatar
💭
Looking for a job

Recca Tsai recca0120

💭
Looking for a job
View GitHub Profile
@recca0120
recca0120 / .php_cs
Created March 27, 2017 12:15
laravel php-cs-fixer 2.1
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => [
'syntax' => 'short',
],
'binary_operator_spaces' => [
<?php
/**
* JSMin.php - modified PHP implementation of Douglas Crockford's JSMin.
*
* <code>
* $minifiedJs = JSMin::minify($js);
* </code>
*
* This is a modified port of jsmin.c. Improvements:
*
@recca0120
recca0120 / JSON.php
Created December 14, 2016 04:25
javascript json decode
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Converts to and from JSON format.
*
* JSON (JavaScript Object Notation) is a lightweight data-interchange
* format. It is easy for humans to read and write. It is easy for machines
* to parse and generate. It is based on a subset of the JavaScript
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
* This feature can also be found in Python. JSON is a text format that is
<?php
class PrivateTester
{
public $object;
public function __construct($object)
{
$this->object = $object;
}
<?php
use Mockery as m;
use PayumTW\Allpay\Api;
class ApiTest extends PHPUnit_Framework_TestCase
{
public function tearDown()
{
m::close();
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class GetFileName
{
private $keyWord;
# 5ad638e9477a4de1845f (not found)