Browse Source

CS fixes.

tags/2.0.0-beta
resurtm 12 years ago
parent
commit
7a7d2a9c06
  1. 1
      framework/yii/base/Formatter.php
  2. 1
      framework/yii/base/InvalidCallException.php
  3. 1
      framework/yii/base/InvalidConfigException.php
  4. 1
      framework/yii/base/InvalidParamException.php
  5. 1
      framework/yii/base/InvalidRouteException.php
  6. 2
      framework/yii/base/Jsonable.php
  7. 1
      framework/yii/base/NotSupportedException.php
  8. 1
      framework/yii/base/UnknownClassException.php
  9. 1
      framework/yii/base/UnknownMethodException.php
  10. 1
      framework/yii/base/UnknownPropertyException.php
  11. 3
      framework/yii/bootstrap/Button.php
  12. 2
      framework/yii/bootstrap/ButtonDropdown.php
  13. 1
      framework/yii/bootstrap/ButtonGroup.php
  14. 1
      framework/yii/bootstrap/Dropdown.php
  15. 1
      framework/yii/bootstrap/Progress.php
  16. 1
      framework/yii/bootstrap/Widget.php
  17. 1
      framework/yii/caching/XCache.php
  18. 1
      framework/yii/console/Exception.php
  19. 3
      framework/yii/console/controllers/AssetController.php
  20. 3
      framework/yii/console/controllers/MessageController.php
  21. 3
      framework/yii/db/Connection.php
  22. 1
      framework/yii/helpers/Json.php
  23. 1
      framework/yii/helpers/base/Console.php
  24. 1
      framework/yii/helpers/base/Html.php
  25. 2
      framework/yii/helpers/base/Inflector.php
  26. 1
      framework/yii/i18n/MessageSource.php
  27. 2
      framework/yii/jui/Accordion.php
  28. 1
      framework/yii/jui/Menu.php
  29. 1
      framework/yii/jui/Widget.php
  30. 3
      framework/yii/rbac/DbManager.php
  31. 1
      framework/yii/validators/CaptchaValidator.php
  32. 1
      framework/yii/validators/DateValidator.php
  33. 1
      framework/yii/validators/DefaultValueValidator.php
  34. 1
      framework/yii/validators/ExistValidator.php
  35. 1
      framework/yii/validators/FilterValidator.php
  36. 1
      framework/yii/validators/StringValidator.php
  37. 1
      framework/yii/web/HeaderCollection.php
  38. 1
      framework/yii/web/Request.php
  39. 1
      framework/yii/widgets/ListPager.php

1
framework/yii/base/Formatter.php

@ -12,7 +12,6 @@ use DateTime;
use yii\helpers\HtmlPurifier;
use yii\helpers\Html;
/**
* Formatter provides a set of commonly used data formatting methods.
*

1
framework/yii/base/InvalidCallException.php

@ -23,4 +23,3 @@ class InvalidCallException extends Exception
return \Yii::t('yii', 'Invalid Call');
}
}

1
framework/yii/base/InvalidConfigException.php

@ -23,4 +23,3 @@ class InvalidConfigException extends Exception
return \Yii::t('yii', 'Invalid Configuration');
}
}

1
framework/yii/base/InvalidParamException.php

@ -23,4 +23,3 @@ class InvalidParamException extends Exception
return \Yii::t('yii', 'Invalid Parameter');
}
}

1
framework/yii/base/InvalidRouteException.php

@ -23,4 +23,3 @@ class InvalidRouteException extends UserException
return \Yii::t('yii', 'Invalid Route');
}
}

2
framework/yii/base/Jsonable.php

@ -18,5 +18,5 @@ interface Jsonable
/**
* @return string the JSON representation of this object
*/
function toJson();
public function toJson();
}

1
framework/yii/base/NotSupportedException.php

@ -23,4 +23,3 @@ class NotSupportedException extends Exception
return \Yii::t('yii', 'Not Supported');
}
}

1
framework/yii/base/UnknownClassException.php

@ -23,4 +23,3 @@ class UnknownClassException extends Exception
return \Yii::t('yii', 'Unknown Class');
}
}

1
framework/yii/base/UnknownMethodException.php

@ -23,4 +23,3 @@ class UnknownMethodException extends Exception
return \Yii::t('yii', 'Unknown Method');
}
}

1
framework/yii/base/UnknownPropertyException.php

@ -23,4 +23,3 @@ class UnknownPropertyException extends Exception
return \Yii::t('yii', 'Unknown Property');
}
}

3
framework/yii/bootstrap/Button.php

@ -6,9 +6,8 @@
*/
namespace yii\bootstrap;
use yii\base\InvalidConfigException;
use yii\helpers\Html;
use yii\helpers\Html;
/**
* Button renders a bootstrap button.

2
framework/yii/bootstrap/ButtonDropdown.php

@ -6,8 +6,8 @@
*/
namespace yii\bootstrap;
use yii\helpers\Html;
use yii\helpers\Html;
/**
* ButtonDropdown renders a group or split button dropdown bootstrap component.

1
framework/yii/bootstrap/ButtonGroup.php

@ -10,7 +10,6 @@ namespace yii\bootstrap;
use yii\helpers\base\ArrayHelper;
use yii\helpers\Html;
/**
* ButtonGroup renders a button group bootstrap component.
*

1
framework/yii/bootstrap/Dropdown.php

@ -11,7 +11,6 @@ use yii\base\InvalidConfigException;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
/**
* Dropdown renders a Bootstrap dropdown menu component.
*

1
framework/yii/bootstrap/Progress.php

@ -11,7 +11,6 @@ use yii\base\InvalidConfigException;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
/**
* Progress renders a bootstrap progress bar component.
*

1
framework/yii/bootstrap/Widget.php

@ -11,7 +11,6 @@ use Yii;
use yii\base\View;
use yii\helpers\Json;
/**
* \yii\bootstrap\Widget is the base class for all bootstrap widgets.
*

1
framework/yii/caching/XCache.php

@ -86,4 +86,3 @@ class XCache extends Cache
return true;
}
}

1
framework/yii/console/Exception.php

@ -25,4 +25,3 @@ class Exception extends UserException
return \Yii::t('yii', 'Error');
}
}

3
framework/yii/console/controllers/AssetController.php

@ -220,7 +220,8 @@ class AssetController extends Controller
* @param array $result already loaded bundles list.
* @throws \yii\console\Exception on failure.
*/
protected function loadBundleDependency($name, $bundle, &$result) {
protected function loadBundleDependency($name, $bundle, &$result)
{
if (!empty($bundle->depends)) {
$assetManager = $this->getAssetManager();
foreach ($bundle->depends as $dependencyName) {

3
framework/yii/console/controllers/MessageController.php

@ -179,8 +179,7 @@ class MessageController extends Controller
}
ksort($translated);
foreach ($translated as $message => $translation) {
if (!isset($merged[$message]) && !isset($todo[$message]) && !$removeOld)
{
if (!isset($merged[$message]) && !isset($todo[$message]) && !$removeOld) {
if (substr($translation, 0, 2) === '@@' && substr($translation, -2) === '@@') {
$todo[$message]=$translation;
} else {

3
framework/yii/db/Connection.php

@ -305,8 +305,7 @@ class Connection extends Component
$this->pdo = $this->createPdoInstance();
$this->initConnection();
Yii::endProfile($token, __METHOD__);
}
catch (\PDOException $e) {
} catch (\PDOException $e) {
Yii::endProfile($token, __METHOD__);
Yii::error("Failed to open DB connection ({$this->dsn}): " . $e->getMessage(), __METHOD__);
$message = YII_DEBUG ? 'Failed to open DB connection: ' . $e->getMessage() : 'Failed to open DB connection.';

1
framework/yii/helpers/Json.php

@ -14,5 +14,4 @@ namespace yii\helpers;
*/
class Json extends base\Json
{
}

1
framework/yii/helpers/base/Console.php

@ -593,7 +593,6 @@ class Console
return $size = array((int)preg_replace('~[^0-9]~', '', $output[3]), (int)preg_replace('~[^0-9]~', '', $output[4]));
}
} else {
// try stty if available
$stty = array();
if (exec('stty -a 2>&1', $stty) && preg_match('/rows\s+(\d+);\s*columns\s+(\d+);/mi', implode(' ', $stty), $matches)) {

1
framework/yii/helpers/base/Html.php

@ -1479,5 +1479,4 @@ class Html
$name = strtolower(static::getInputName($model, $attribute));
return str_replace(array('[]', '][', '[', ']', ' '), array('', '-', '-', '', '-'), $name);
}
}

2
framework/yii/helpers/base/Inflector.php

@ -468,7 +468,7 @@ class Inflector
if (in_array(($number % 100), range(11, 13))) {
return $number . 'th';
}
switch (($number % 10)) {
switch ($number % 10) {
case 1: return $number . 'st';
case 2: return $number . 'nd';
case 3: return $number . 'rd';

1
framework/yii/i18n/MessageSource.php

@ -118,4 +118,3 @@ class MessageSource extends Component
}
}
}

2
framework/yii/jui/Accordion.php

@ -125,7 +125,7 @@ class Accordion extends Widget
$items[] = Html::tag($headerTag, $item['header'], $headerOptions);
$options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', array()));
$tag = ArrayHelper::remove($options, 'tag', 'div');
$items[] = Html::tag($tag, $item['content'], $options);;
$items[] = Html::tag($tag, $item['content'], $options);
}
return implode("\n", $items);

1
framework/yii/jui/Menu.php

@ -10,7 +10,6 @@ namespace yii\jui;
use Yii;
use yii\helpers\Json;
/**
* Menu renders a menu jQuery UI widget.
*

1
framework/yii/jui/Widget.php

@ -10,7 +10,6 @@ namespace yii\jui;
use Yii;
use yii\helpers\Json;
/**
* \yii\jui\Widget is the base class for all jQuery UI widgets.
*

3
framework/yii/rbac/DbManager.php

@ -493,9 +493,10 @@ class DbManager extends Manager
'bizRule' => $row['biz_rule'],
'data' => $data,
));
} else
} else {
return null;
}
}
/**
* Saves an authorization item to persistent storage.

1
framework/yii/validators/CaptchaValidator.php

@ -117,4 +117,3 @@ class CaptchaValidator extends Validator
return 'yii.validation.captcha(value, messages, ' . json_encode($options) . ');';
}
}

1
framework/yii/validators/DateValidator.php

@ -73,4 +73,3 @@ class DateValidator extends Validator
return DateTime::createFromFormat($this->format, $value) !== false;
}
}

1
framework/yii/validators/DefaultValueValidator.php

@ -40,4 +40,3 @@ class DefaultValueValidator extends Validator
}
}
}

1
framework/yii/validators/ExistValidator.php

@ -99,4 +99,3 @@ class ExistValidator extends Validator
return $query->exists();
}
}

1
framework/yii/validators/FilterValidator.php

@ -6,6 +6,7 @@
*/
namespace yii\validators;
use yii\base\InvalidConfigException;
/**

1
framework/yii/validators/StringValidator.php

@ -174,4 +174,3 @@ class StringValidator extends Validator
return 'yii.validation.string(value, messages, ' . json_encode($options) . ');';
}
}

1
framework/yii/web/HeaderCollection.php

@ -11,7 +11,6 @@ use Yii;
use yii\base\Object;
use ArrayIterator;
/**
* HeaderCollection is used by [[Response]] to maintain the currently registered HTTP headers.
*

1
framework/yii/web/Request.php

@ -792,4 +792,3 @@ class Request extends \yii\base\Request
}
}
}

1
framework/yii/widgets/ListPager.php

@ -91,5 +91,4 @@ class ListPager extends Widget
'{page}' => $page + 1,
));
}
}

Loading…
Cancel
Save