Skip to content

Instantly share code, notes, and snippets.

@alihammad-gist
alihammad-gist / Comment.php
Last active August 29, 2015 14:01
doctrine Mapping.. mappedBy .. inversedBy ... relation tables updates not uncluded
<?php namespace Forum\Entity;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Comment
<?php
namespace Staff\Entity;
class Member
{
const IMAGE_BASE_PATH = '/img/staff';
protected $id;
protected $name;
<?php
/**
* @package Staff
* @subpackage Form
* @author Ali Hammad
* @version 0.0.1
*
*/
@alihammad-gist
alihammad-gist / formatted.php
Last active August 29, 2015 14:09
Formatting errors chained methods #1
<?php
namespace Appointment\InputFilter;
use Appointment\Entity\Appointment as AppointmentEntity;
use Zend\InputFilter\Factory as InputFilterFactory;
use Zend\ServiceManager\FactoryInterface;
class AppointmentFactory implements FactoryInterface
{
@alihammad-gist
alihammad-gist / LoginUserTest.php
Created February 1, 2015 14:56
Line 181 of LoginUserTest.php produces an error for phpunit
<?php
namespace PostitTest\Interactor;
use Postit\Request\LoginUser as Request;
use Postit\Response\LoginUser as Response;
use Postit\Interactor\LoginUser;
use Postit\Entity\User as UserEntity;
use Postit\Error;
use Postit\Exception\UserNotFound;
<?php
// ./src/DbUtil/Seed.php
namespace DbUtil;
class Seed
{
private $data;
private $pdo;
<?php
/**
* @expectedException \Postit\Db\Exception
*/
function testInsertPost_throwsException()
{
$pdoMock = $this->getMockBuilder('PDO')
->disableOriginalConstructor()
->getMock();
cat main.cjsx | cjsx -sbp | browserify -t coffee-reactify --extension=".cjsx" -
var Actions = {
ADD_ITEM: 1,
DEL_ITEM: 2,
MOVE_ITEM: 3,
};
var Flux = new McFly();
var ItemStore = (function (Flux, Actions) {
var _items = [
@alihammad-gist
alihammad-gist / package.json
Created June 7, 2015 10:04
typescrit react
{
"name": "ts-react",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "tsc",
"browserify": "browserify build/main.js -o public/js/main.js",
"test": "echo \"Error: no test specified\" && exit 1"
},