Skip to content

Commit

Permalink
whitespace normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Jul 26, 2009
1 parent 76927b3 commit fd0aaef
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 43 deletions.
2 changes: 1 addition & 1 deletion cake/libs/cake_session.php
Expand Up @@ -746,7 +746,7 @@ function __read($id) {
return false;
}

return $row[$model->alias]['data'];
return $row[$model->alias]['data'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/controller/components/request_handler.php
Expand Up @@ -581,7 +581,7 @@ function prefers($type = null) {
} elseif (count($types) === 1) {
return ($types[0] === $accepts[0]);
} elseif (count($accepts) === 1) {
return $accepts[0];
return $accepts[0];
}

$acceptedTypes = array();
Expand Down
1 change: 0 additions & 1 deletion cake/libs/debugger.php
Expand Up @@ -165,7 +165,6 @@ function __construct() {
$this->_templates['js']['code'] = '<div id="{:id}-code" class="cake-code-dump" ';
$this->_templates['js']['code'] .= 'style="display: none;"><pre>{:code}</pre></div>';


$e = '<pre class="cake-debug"><b>{:error}</b> ({:code}) : {:description} ';
$e .= '[<b>{:path}</b>, line <b>{:line}]</b></pre>';
$this->_templates['html']['error'] = $e;
Expand Down
1 change: 0 additions & 1 deletion cake/libs/model/cake_schema.php
Expand Up @@ -366,7 +366,6 @@ function write($object, $options = array()) {
}
$out .="}\n";


$File =& new File($path . DS . $file, true);
$header = '$Id';
$content = "<?php \n/* SVN FILE: {$header}$ */\n/* {$name} schema generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>";
Expand Down
27 changes: 14 additions & 13 deletions cake/libs/model/datasources/dbo/dbo_oracle.php
Expand Up @@ -204,10 +204,11 @@ function connect() {
}
return $this->connected;
}
/**
* Keeps track of the most recent Oracle error
*
*/

/**
* Keeps track of the most recent Oracle error
*
*/
function _setError($source = null, $clear = false) {
if ($source) {
$e = ocierror($source);
Expand Down Expand Up @@ -1069,7 +1070,6 @@ function queryAssociation(&$model, &$linkModel, $type, $association, $assocData,
$q = str_replace('= (', 'IN (', $q);
$q = str_replace(' WHERE 1 = 1', '', $q);


$q = $this->insertQueryData($q, null, $association, $assocData, $model, $linkModel, $stack);
if ($q != false) {
$res = $this->fetchAll($q, $model->cacheQueries, $model->alias);
Expand Down Expand Up @@ -1139,14 +1139,15 @@ function queryAssociation(&$model, &$linkModel, $type, $association, $assocData,
}
}
}
/**
* Generate a "drop table" statement for the given Schema object
*
* @param object $schema An instance of a subclass of CakeSchema
* @param string $table Optional. If specified only the table name given will be generated.
* Otherwise, all tables defined in the schema are generated.
* @return string
*/

/**
* Generate a "drop table" statement for the given Schema object
*
* @param object $schema An instance of a subclass of CakeSchema
* @param string $table Optional. If specified only the table name given will be generated.
* Otherwise, all tables defined in the schema are generated.
* @return string
*/
function dropSchema($schema, $table = null) {
if (!is_a($schema, 'CakeSchema')) {
trigger_error(__('Invalid schema object', true), E_USER_WARNING);
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/multibyte.php
Expand Up @@ -1063,7 +1063,7 @@ function mimeEncode($string, $charset = null, $newline = "\r\n") {
* @return string
* @access private
*/
function __codepoint ($decimal) {
function __codepoint($decimal) {
if ($decimal > 128 && $decimal < 256) {
$return = '0080_00ff'; // Latin-1 Supplement
} elseif ($decimal < 384) {
Expand Down
36 changes: 18 additions & 18 deletions cake/libs/security.php
Expand Up @@ -45,12 +45,12 @@ class Security extends Object {
var $hashType = null;

/**
* Singleton implementation to get object instance.
*
* @return object
* @access public
* @static
*/
* Singleton implementation to get object instance.
*
* @return object
* @access public
* @static
*/
function &getInstance() {
static $instance = array();
if (!$instance) {
Expand All @@ -60,12 +60,12 @@ function &getInstance() {
}

/**
* Get allowed minutes of inactivity based on security level.
*
* @return integer Allowed inactivity in minutes
* @access public
* @static
*/
* Get allowed minutes of inactivity based on security level.
*
* @return integer Allowed inactivity in minutes
* @access public
* @static
*/
function inactiveMins() {
$_this =& Security::getInstance();
switch (Configure::read('Security.level')) {
Expand All @@ -83,12 +83,12 @@ function inactiveMins() {
}

/**
* Generate authorization hash.
*
* @return string Hash
* @access public
* @static
*/
* Generate authorization hash.
*
* @return string Hash
* @access public
* @static
*/
function generateAuthKey() {
if (!class_exists('String')) {
App::import('Core', 'String');
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/set.php
Expand Up @@ -422,7 +422,7 @@ function extract($path, $data = null, $options = array()) {
$context['key'] = array_pop($context['trace']);
if (isset($context['trace'][1]) && $context['trace'][1] > 0) {
$context['item'] = $context['item'][0];
} else if(!empty($context['item'][$key])){
} elseif (!empty($context['item'][$key])) {
$context['item'] = $context['item'][$key];
} else {
$context['item'] = array_shift($context['item']);
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/validation.php
Expand Up @@ -778,7 +778,7 @@ function postal($check, $regex = null, $country = null) {
* @return boolean Success
* @access public
*/
function range($check, $lower = null, $upper = null ) {
function range($check, $lower = null, $upper = null) {
if (!is_numeric($check)) {
return false;
}
Expand Down
4 changes: 1 addition & 3 deletions cake/libs/view/helpers/ajax.php
Expand Up @@ -508,7 +508,6 @@ function autoComplete($field, $url = "", $options = array()) {
$options = $this->_optionsToString($options, array('paramName', 'indicator'));
$options = $this->_buildOptions($options, $this->autoCompleteOptions);


$text = $this->Form->text($field, $htmlOptions);
$div = $this->Html->div(null, '', $divOptions);
$script = "{$var}new Ajax.Autocompleter('{$htmlOptions['id']}', '{$divOptions['id']}', '";
Expand Down Expand Up @@ -903,7 +902,7 @@ function _buildObserver($klass, $name, $options = null) {

$callback = $this->remoteFunction($options);
$hasFrequency = !(!isset($options['frequency']) || intval($options['frequency']) == 0);
$frequency = $hasFrequency ? $options['frequency'] . ', ' : '';
$frequency = $hasFrequency ? $options['frequency'] . ', ' : '';

return "new $klass('$name', {$frequency}function(element, value) {{$callback}})";
}
Expand Down Expand Up @@ -1018,5 +1017,4 @@ function afterRender() {
}
}
}

?>
1 change: 0 additions & 1 deletion cake/libs/view/helpers/xml.php
Expand Up @@ -168,5 +168,4 @@ function serialize($data, $options = array()) {
return $data->toString($options + array('header' => false));
}
}

?>
2 changes: 1 addition & 1 deletion cake/libs/view/theme.php
Expand Up @@ -58,7 +58,7 @@ class ThemeView extends View {
*
* @param unknown_type $controller
*/
function __construct (&$controller) {
function __construct(&$controller) {
parent::__construct($controller);
$this->theme =& $controller->theme;

Expand Down

0 comments on commit fd0aaef

Please sign in to comment.