mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix coding standard issues in View/
This commit is contained in:
parent
0df239de2b
commit
acccdcde1f
19 changed files with 103 additions and 129 deletions
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* Backend for helpers.
|
||||
*
|
||||
* Internal methods for the Helpers.
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
|
@ -146,7 +140,6 @@ class Helper extends Object {
|
|||
'autoplay', 'controls', 'loop', 'muted'
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
*
|
||||
|
@ -532,7 +525,6 @@ class Helper extends Object {
|
|||
}
|
||||
}
|
||||
$this->_entityPath = $entity;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -899,4 +891,5 @@ class Helper extends Object {
|
|||
} while ($oldstring != $this->_cleaned);
|
||||
$this->_cleaned = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $this->_cleaned);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -317,4 +317,5 @@ class CacheHelper extends AppHelper {
|
|||
$file .= $content;
|
||||
return cache('views' . DS . $cache, $file, $timestamp);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* Automatic generation of HTML FORMs from given data.
|
||||
*
|
||||
* Used for scaffolding.
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
|
@ -154,7 +148,7 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
|
||||
$this->_models[$model] = $object;
|
||||
if (!$object) {;
|
||||
if (!$object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -2592,4 +2586,5 @@ class FormHelper extends AppHelper {
|
|||
$this->_secure($secure, $fieldName);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ App::uses('JsBaseEngineHelper', 'View/Helper');
|
|||
* @package Cake.View.Helper
|
||||
*/
|
||||
class JqueryEngineHelper extends JsBaseEngineHelper {
|
||||
|
||||
/**
|
||||
* Option mappings for jQuery
|
||||
*
|
||||
|
@ -258,7 +259,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
if (isset($options['update'])) {
|
||||
$wrapCallbacks = isset($options['wrapCallbacks']) ? $options['wrapCallbacks'] : true;
|
||||
$success = '';
|
||||
if (isset($options['success']) AND !empty($options['success'])) {
|
||||
if (isset($options['success']) && !empty($options['success'])) {
|
||||
$success .= $options['success'];
|
||||
}
|
||||
$success .= $this->jQueryObject . '("' . $options['update'] . '").html(data);';
|
||||
|
@ -356,4 +357,5 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
|
|||
}
|
||||
return $selector . $method;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* JsEngineBaseClass
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2011, Cake Software Foundation, Inc.
|
||||
*
|
||||
|
@ -59,16 +55,6 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
|||
*/
|
||||
protected $_callbackArguments = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param View $View
|
||||
* @param array $settings
|
||||
*/
|
||||
public function __construct($View, $settings = array()) {
|
||||
parent::__construct($View, $settings);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an `alert()` message in Javascript
|
||||
*
|
||||
|
@ -602,4 +588,5 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
|||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -430,4 +430,5 @@ class JsHelper extends AppHelper {
|
|||
}
|
||||
return array($options, $htmlOptions);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* MooTools Engine Helper for JsHelper
|
||||
*
|
||||
* Provides MooTools specific Javascript for JsHelper.
|
||||
* Assumes that you have the following MooTools packages
|
||||
*
|
||||
* - Remote, Remote.HTML, Remote.JSON
|
||||
* - Fx, Fx.Tween, Fx.Morph
|
||||
* - Selectors, DomReady,
|
||||
* - Drag, Drag.Move
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
|
@ -41,6 +29,7 @@ App::uses('JsBaseEngineHelper', 'View/Helper');
|
|||
* @package Cake.View.Helper
|
||||
*/
|
||||
class MootoolsEngineHelper extends JsBaseEngineHelper {
|
||||
|
||||
/**
|
||||
* Option mappings for MooTools
|
||||
*
|
||||
|
@ -383,4 +372,5 @@ class MootoolsEngineHelper extends JsBaseEngineHelper {
|
|||
}
|
||||
return $selection . $method;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,11 +33,15 @@ App::uses('AppHelper', 'View/Helper');
|
|||
*/
|
||||
class NumberHelper extends AppHelper {
|
||||
|
||||
/** CakeNumber instance
|
||||
/**
|
||||
* CakeNumber instance
|
||||
*
|
||||
* @var CakeNumber
|
||||
*/
|
||||
protected $_engine = null;
|
||||
|
||||
/* Default Constructor
|
||||
/**
|
||||
* Default Constructor
|
||||
*
|
||||
* ### Settings:
|
||||
*
|
||||
|
@ -46,6 +50,7 @@ class NumberHelper extends AppHelper {
|
|||
*
|
||||
* @param View $View The View this helper is being attached to.
|
||||
* @param array $settings Configuration settings for the helper
|
||||
* @throws CakeException When the engine class could not be found.
|
||||
*/
|
||||
public function __construct(View $View, $settings = array()) {
|
||||
$settings = Set::merge(array('engine' => 'CakeNumber'), $settings);
|
||||
|
|
|
@ -705,8 +705,7 @@ class PaginatorHelper extends AppHelper {
|
|||
$out .= $before;
|
||||
|
||||
for ($i = $start; $i < $params['page']; $i++) {
|
||||
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'))
|
||||
. $separator;
|
||||
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class')) . $separator;
|
||||
}
|
||||
|
||||
if ($class) {
|
||||
|
@ -719,8 +718,7 @@ class PaginatorHelper extends AppHelper {
|
|||
|
||||
$start = $params['page'] + 1;
|
||||
for ($i = $start; $i < $end; $i++) {
|
||||
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'))
|
||||
. $separator;
|
||||
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class')) . $separator;
|
||||
}
|
||||
|
||||
if ($end != $params['page']) {
|
||||
|
@ -823,8 +821,7 @@ class PaginatorHelper extends AppHelper {
|
|||
$out .= $after;
|
||||
} elseif ($params['page'] > 1 && is_string($first)) {
|
||||
$options += array('rel' => 'first');
|
||||
$out = $this->Html->tag($tag, $this->link($first, array('page' => 1), $options), compact('class'))
|
||||
. $after;
|
||||
$out = $this->Html->tag($tag, $this->link($first, array('page' => 1), $options), compact('class')) . $after;
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
@ -897,4 +894,5 @@ class PaginatorHelper extends AppHelper {
|
|||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ App::uses('JsBaseEngineHelper', 'View/Helper');
|
|||
* @package Cake.View.Helper
|
||||
*/
|
||||
class PrototypeEngineHelper extends JsBaseEngineHelper {
|
||||
|
||||
/**
|
||||
* Is the current selection a multiple selection? or is it just a single element.
|
||||
*
|
||||
|
@ -365,4 +366,5 @@ class PrototypeEngineHelper extends JsBaseEngineHelper {
|
|||
}
|
||||
return $selection . $method;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -341,4 +341,5 @@ class RssHelper extends AppHelper {
|
|||
$xml = trim(substr($xml, strpos($xml, '?>') + 2));
|
||||
return $xml;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -159,4 +159,5 @@ class SessionHelper extends AppHelper {
|
|||
public function valid() {
|
||||
return CakeSession::valid();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ class TextHelper extends AppHelper {
|
|||
*
|
||||
* @param View $View the view object the helper is attached to.
|
||||
* @param array $settings Settings array Settings array
|
||||
* @throws CakeException when the engine class could not be found.
|
||||
*/
|
||||
public function __construct(View $View, $settings = array()) {
|
||||
$settings = Set::merge(array('engine' => 'String'), $settings);
|
||||
|
|
|
@ -47,6 +47,7 @@ class TimeHelper extends AppHelper {
|
|||
*
|
||||
* @param View $View the view object the helper is attached to.
|
||||
* @param array $settings Settings array Settings array
|
||||
* @throws CakeException When the engine class could not be found.
|
||||
*/
|
||||
public function __construct(View $View, $settings = array()) {
|
||||
$settings = Set::merge(array('engine' => 'CakeTime'), $settings);
|
||||
|
|
|
@ -152,4 +152,5 @@ class HelperCollection extends ObjectCollection implements CakeEventListener {
|
|||
}
|
||||
return parent::trigger($callback, $params, $options);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ App::uses('CakeRequest', 'Network');
|
|||
* @package Cake.View
|
||||
*/
|
||||
class MediaView extends View {
|
||||
|
||||
/**
|
||||
* Indicates whether response gzip compression was enabled for this class
|
||||
*
|
||||
|
@ -65,15 +66,6 @@ class MediaView extends View {
|
|||
*/
|
||||
protected $_compressionEnabled = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Controller $controller The controller with viewVars
|
||||
*/
|
||||
public function __construct(Controller $controller = null) {
|
||||
parent::__construct($controller);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display or download the given file
|
||||
*
|
||||
|
@ -242,4 +234,5 @@ class MediaView extends View {
|
|||
@flush();
|
||||
@ob_flush();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -87,4 +87,5 @@ class ScaffoldView extends ThemeView {
|
|||
|
||||
throw new MissingViewException($paths[0] . $name . $this->ext);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -154,4 +154,5 @@ class ViewBlock {
|
|||
public function unclosed() {
|
||||
return $this->_active;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue