- Core namespace:
Cake
- Namespace will follow the directories, ie.
Cake\Cache\Engine\ApcEngine
,Cake\Controller\Controller
- View files don't need namespaces
- Basic functions will not be namespaced as well
- Use the class loader defined by the PHP Standard Group, see https://gist.github.com/562509
- Suffixes will not be removed (ie.
HtmlHelper
will beCake\View\Helper\HtmlHelper
instead ofCake\View\Helper\Html
) - Remove App::uses()
- Remove filemap
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
// app/config/databases.php | |
class DATABASE_CONFIG { | |
var $default = array(...); | |
var $soap = array('datasource' => 'Datasources.Soap', ...); | |
var $test = array(...); | |
} | |
// app/models/servico.php |
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 | |
// Fake methods | |
function pluginSplit() {} | |
function env() {} | |
class ValidateAPI { | |
protected $_cakePath; | |
protected $_files = array(); |
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
#!/bin/sh | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
echo "Checking PHP Lint..." | |
FILES="" | |
for FILE in `git diff --cached --name-only --diff-filter=ACMR HEAD | egrep \\\\.\(php\|ctp\)\$` | |
do | |
php -l -d display_errors=0 $PROJECT/$FILE | |
if [ $? != 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 | |
$dir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__)); | |
while ($dir->valid()) { | |
$filename = $dir->key(); | |
if (substr($filename, -4) !== '.php' || strpos($filename, '.git')) { | |
$dir->next(); | |
continue; | |
} |
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
diff --git a/CodeSniffer/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.inc b/CodeSniffer/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.inc | |
index 848fc56..0d0e224 100644 | |
--- a/CodeSniffer/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.inc | |
+++ b/CodeSniffer/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.inc | |
@@ -37,6 +37,16 @@ class Test | |
} | |
} | |
+ function hello4() | |
+ { |
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 | |
namespace Cake\Bin; | |
class Push { | |
const DEFAULT_TYPE = 'text'; | |
const CAKEBIN_URL = 'http://bin.cakephp.org'; | |
protected $allowedTypes = array( |
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
diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php | |
index cadbbbd..dfa1d3e 100644 | |
--- a/lib/Cake/Network/CakeRequest.php | |
+++ b/lib/Cake/Network/CakeRequest.php | |
@@ -694,26 +694,7 @@ class CakeRequest implements ArrayAccess { | |
* @return array An array of prefValue => array(content/types) | |
*/ | |
public function parseAccept() { | |
- $accept = array(); | |
- $header = explode(',', $this->header('accept')); |
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
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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 AllAppTest extends CakeTestSuite { | |
protected $coverageSetup = false; | |
public static function suite() { | |
$suite = new self('All Application Tests'); | |
$suite->addTestDirectoryRecursive(dirname(__FILE__)); | |
return $suite; |
OlderNewer