From ed96936ea7bbeb1b32c54bc202b511ed93930a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renan=20Gon=C3=A7alves?= Date: Mon, 30 May 2011 22:26:42 +0200 Subject: [PATCH] According to CakePHP conding styles, methods prefixed by _ are protected. Changing where it makes sense and don't break anything. --- lib/Cake/Console/Command/Task/TemplateTask.php | 2 +- lib/Cake/Model/CakeSchema.php | 2 +- lib/Cake/Test/Case/Console/Command/ShellTest.php | 2 +- lib/Cake/Utility/Folder.php | 2 +- lib/Cake/View/Helper.php | 2 +- lib/Cake/View/Helper/HtmlHelper.php | 2 +- lib/Cake/View/Helper/JqueryEngineHelper.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Cake/Console/Command/Task/TemplateTask.php b/lib/Cake/Console/Command/Task/TemplateTask.php index 39c7f8548db..e3006e73018 100644 --- a/lib/Cake/Console/Command/Task/TemplateTask.php +++ b/lib/Cake/Console/Command/Task/TemplateTask.php @@ -196,7 +196,7 @@ public function getThemePath() { * @access public * @return string filename will exit program if template is not found. */ - public function _findTemplate($path, $directory, $filename) { + protected function _findTemplate($path, $directory, $filename) { $themeFile = $path . $directory . DS . $filename . '.ctp'; if (file_exists($themeFile)) { return $themeFile; diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index e51de2159be..aa59adef82e 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -529,7 +529,7 @@ public function compare($old, $new = null) { * where match was not found. * @access protected */ - public function _arrayDiffAssoc($array1, $array2) { + protected function _arrayDiffAssoc($array1, $array2) { $difference = array(); foreach ($array1 as $key => $value) { if (!array_key_exists($key, $array2)) { diff --git a/lib/Cake/Test/Case/Console/Command/ShellTest.php b/lib/Cake/Test/Case/Console/Command/ShellTest.php index 2ebdeaf12b1..6292bb54297 100644 --- a/lib/Cake/Test/Case/Console/Command/ShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/ShellTest.php @@ -60,7 +60,7 @@ public function do_something() { } - public function _secret() { + protected function _secret() { } diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index 61e2e895266..445536c3642 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -215,7 +215,7 @@ public function findRecursive($pattern = '.*', $sort = false) { * @return array Files matching pattern * @access private */ - public function _findRecursive($pattern, $sort = false) { + protected function _findRecursive($pattern, $sort = false) { list($dirs, $files) = $this->read($sort); $found = array(); diff --git a/lib/Cake/View/Helper.php b/lib/Cake/View/Helper.php index 3f69b071da2..42f167a009f 100644 --- a/lib/Cake/View/Helper.php +++ b/lib/Cake/View/Helper.php @@ -322,7 +322,7 @@ public function clean($output) { * @param string $insertAfter String to be inserted after options. * @return string Composed attributes. */ - public function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { + protected function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { if (!is_string($options)) { $options = (array) $options + array('escape' => true); diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php index dcee9229107..52f03d5aba2 100644 --- a/lib/Cake/View/Helper/HtmlHelper.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -1011,7 +1011,7 @@ public function loadConfig($configFile, $path = null) { * @param string $insertAfter String to be inserted after options. * @return string Composed attributes. */ - public function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { + protected function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { if (is_array($options)) { $options = array_merge(array('escape' => true), $options); diff --git a/lib/Cake/View/Helper/JqueryEngineHelper.php b/lib/Cake/View/Helper/JqueryEngineHelper.php index 535f7278662..853ff886101 100644 --- a/lib/Cake/View/Helper/JqueryEngineHelper.php +++ b/lib/Cake/View/Helper/JqueryEngineHelper.php @@ -122,7 +122,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param string $callbacks Array of callback / special options. * @return string Composed method string */ - public function _methodTemplate($method, $template, $options, $extraSafeKeys = array()) { + protected function _methodTemplate($method, $template, $options, $extraSafeKeys = array()) { $options = $this->_mapOptions($method, $options); $options = $this->_prepareCallbacks($method, $options); $callbacks = array_keys($this->_callbackArguments[$method]);