This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch('./(.*).php') { |m| code_changed(m[0]) } | |
def code_changed(file) | |
run "phpunit" | |
end | |
def run(cmd) | |
result = `cd Test && #{cmd}` | |
growl result rescue nil | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* {{{ proto int SplFileObject::count() | |
Get total number of lines */ | |
SPL_METHOD(SplFileObject, count) | |
{ | |
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); | |
long current_pos = intern->u.file.current_line_num; | |
long lines_number = 0; | |
if (zend_parse_parameters_none() == FAILURE) { | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
echo "\nRunning php linter...\n"; | |
$params = explode(' ', file_get_contents('php://stdin')); | |
$ref = trim($params[1]); | |
$diff = array(); | |
$return = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class myClass | |
{ | |
public function __toString() | |
{ | |
return "mememe"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "phpunit", | |
"description": "PHPUnit", | |
"require": { | |
"phpunit/phpunit": "*" | |
}, | |
"minimum-stability": "dev", | |
"config": { | |
"bin-dir": "/tmp/bin/" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include_recipe "php::#{node['php']['install_method']}" | |
channels = %w{pear.phpunit.de components.ez.no pear.symfony-project.com pear.symfony.com pear.pdepend.org pear.phpmd.org} | |
channels.each do |chan| | |
php_pear_channel chan do | |
action [:discover, :update] | |
end | |
end | |
packages = %w{PHP_CodeSniffer phpunit/PHPUnit pdepend/pdepend phpmd/PHP_PMD} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Name relate field | |
* * link point at the link field defined below | |
* * make sure the field name matches the pattern <bean_name>_name | |
*/ | |
$dictionary['Demo_SupplierContactDetails']['fields']['demo_suppliers_name'] = array( | |
'required' => true, | |
'source' => 'non-db', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Relationship link | |
* * see the link defined on the name field above | |
* * relationship name matches the relationship defined below | |
*/ | |
$dictionary['Demo_SupplierContactDetails']['fields']['demo_suppliers'] = array( | |
'name' => 'demo_suppliers', | |
'type' => 'link', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dictionary['Demo_Suppliers']['fields']['demo_suppliercontactdetails'] = array( | |
'name' => 'demo_suppliercontactdetails', | |
'type' => 'link', | |
'relationship' => 'demo_suppliers_emis_suppliercontactdetails', | |
'module' => 'Demo_SupplierContactDetails', | |
'bean_name' => 'Demo_SupplierContactDetails', | |
'source' => 'non-db', | |
'vname' => 'LBL_SUPPLIER_CONTACTDETAILS', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Table : demo_suppliercontactdetails */ | |
/*COLUMNS*/ | |
/*MISSING IN DATABASE - demo_suppliers_id - ROW*/ | |
/* INDEXES */ | |
ALTER TABLE demo_suppliercontactdetails add COLUMN demo_suppliers_id char(36) NULL ; |
OlderNewer