Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

QA: various max line length fixes.

  • Loading branch information...
commit 5450f209f0c69f609f482366b05d9bbee3df960e 1 parent 45a6cc4
@daschl daschl authored
View
8 data/Entity.php
@@ -376,9 +376,13 @@ public function modified() {
continue;
}
$modified = $value->modified();
- $fields[$field] = $modified === true || is_array($modified) && in_array(true, $modified, true);
+ $fields[$field] = ($modified === true ||
+ is_array($modified) &&
+ in_array(true, $modified, true));
} else {
- $fields[$field] = !isset($fields[$field]) || $this->_data[$field] !== $this->_updated[$field];
+ $fields[$field] = (!isset($fields[$field]) ||
+ $this->_data[$field] !==
+ $this->_updated[$field]);
}
}
return $fields;
View
3  data/Model.php
@@ -244,7 +244,8 @@ class Model extends \lithium\core\StaticObject {
* a collection, along with a `'data'` key, which contains the schema for that collection, in
* the format specified above.
*
- * When defining `'$_schema'` where the data source is MongoDB, the types map to database types as follows:
+ * When defining `'$_schema'` where the data source is MongoDB, the types map to database
+ * types as follows:
*
* {{{
* id => MongoId
View
4 template/helper/Form.php
@@ -504,7 +504,9 @@ public function button($title = null, array $options = array()) {
$defaults = array('escape' => true);
list($scope, $options) = $this->_options($defaults, $options);
list($title, $options, $template) = $this->_defaults(__METHOD__, $title, $options);
- return $this->_render(__METHOD__, 'button', compact('type', 'title', 'options', 'value'), $scope);
+
+ $arguments = compact('type', 'title', 'options', 'value');
+ return $this->_render(__METHOD__, 'button', $arguments, $scope);
}
/**
View
26 template/helper/Html.php
@@ -133,7 +133,8 @@ public function charset($encoding = null) {
* anchor name starting with `'#'` (i.e. `'#top'`), or an array defining a set
* of request parameters that should be matched against a route in `Router`.
* @param array $options The available options are:
- * - `'escape'` _boolean_: Whether or not the title content should be escaped or not. Defaults to true.
+ * - `'escape'` _boolean_: Whether or not the title content should be escaped.
+ * Defaults to true.
* - `'type'` _string_: The meta-link type, which is looked up in `Html::$_metaLinks`.
* By default it accepts `atom`, `rss` and `icon`.
* If a `type` is specified, this method will render a document meta-link (`<link />`),
@@ -163,8 +164,8 @@ public function link($title, $url = null, array $options = array()) {
* @param mixed $path String The name of a JavaScript file, or an array of names.
* @param array $options Available options are:
* - `'inline'` _boolean_: Whether or not the `<script />` element should be output inline.
- * When set to false, the `scripts()` handler prints out the script, and other specified scripts
- * to be included in the layout. Defaults to true.
+ * When set to false, the `scripts()` handler prints out the script, and other specified
+ * scripts to be included in the layout. Defaults to true.
* This is useful when page-specific scripts are created inline in the page,
* and you'd like to place them in the <head /> along with your other scripts.
* - any other options specified are rendered as HTML attributes of the element.
@@ -196,16 +197,16 @@ public function script($path, array $options = array()) {
}
/**
- * Creates a `<link />` element for CSS stylesheets or a `<style />` tag. If the filename is prefixed with
- * `'/'`, the path will be relative to the base path of your application. Otherwise, the path
- * will be relative to your Stylesheets path, usually `webroot/css`.
+ * Creates a `<link />` element for CSS stylesheets or a `<style />` tag. If the filename is
+ * prefixed with `'/'`, the path will be relative to the base path of your application.
+ * Otherwise, the path will be relative to your Stylesheets path, usually `webroot/css`.
*
* @param mixed $path The name of a CSS stylesheet in `/app/webroot/css`, or an array
* containing names of CSS stylesheets in that directory.
* @param array $options Available options are:
* - `'inline'` _boolean_: Whether or not the `<style />` element should be output inline.
- * When set to false, the `styles()` handler prints out the styles, and other specified styles
- * to be included in the layout. Defaults to true.
+ * When set to false, the `styles()` handler prints out the styles, and other specified
+ * styles to be included in the layout. Defaults to true.
* This is useful when page-specific styles are created inline in the page,
* and you'd like to place them in the <head /> along with your other styles.
* - `'type'` _string_: By default, accepts `stylesheet` or `import`,
@@ -274,9 +275,10 @@ public function head($tag, array $options) {
* Creates a formatted `<img />` element.
*
* @param string $path Path to the image file. If the filename is prefixed with
- * `'/'`, the path will be relative to the base path of your application.
- * Otherwise the path will be relative to the images directory, usually `app/webroot/img/`.
- * If the name starts with `'http://'`, this is treated as an external url used as the `src` attribute.
+ * `'/'`, the path will be relative to the base path of your application.
+ * Otherwise the path will be relative to the images directory, usually `app/webroot/img/`.
+ * If the name starts with `'http://'`, this is treated as an external url used as the `src`
+ * attribute.
* @param array $options Array of HTML attributes.
* @return string
* @filter This method can be filtered.
@@ -299,7 +301,7 @@ public function image($path, array $options = array()) {
* @param string $type The title of the external resource
* @param mixed $url The address of the external resource or string for content attribute
* @param array $options Other attributes for the generated tag. If the type attribute
- * is 'html', 'rss', 'atom', or 'icon', the mime-type is returned.
+ * 4 is 'html', 'rss', 'atom', or 'icon', the mime-type is returned.
@jails Collaborator
jails added a note

I found the golden nugget ! Do I win something ? ;-)

@daschl Collaborator
daschl added a note

Watta hell ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
* @return string
*/
protected function _metaLink($type, $url = null, array $options = array()) {
View
3  tests/cases/console/command/LibraryTest.php
@@ -238,7 +238,8 @@ public function testExtractWhenLibraryDoesNotExist() {
$path = realpath($this->_testPath);
$tplPath = realpath(LITHIUM_LIBRARY_PATH . '/lithium/console/command/create/template');
- $expected = "new created in {$path} from {$tplPath}" . DIRECTORY_SEPARATOR . "app.phar.gz\n";
+ $expected = "new created in {$path} from {$tplPath}" .
+ DIRECTORY_SEPARATOR . "app.phar.gz\n";
$result = $app->response->output;
$this->assertEqual($expected, $result);
View
3  tests/cases/net/http/RouteTest.php
@@ -380,7 +380,8 @@ public function testCustomSubPattern() {
* Tests creating a route with a custom sub-pattern and trailing route
*/
public function testCustomSubPatternWithTrailing() {
- $route = new Route(array('template' => '/{:controller}/{:action}/{:id:[0-9]+}/abcdefghijklm'));
+ $template = '/{:controller}/{:action}/{:id:[0-9]+}/abcdefghijklm';
+ $route = new Route(compact('template'));
$request = new Request();
$request->url = '/users/view/10/abcdefghijklm';

2 comments on commit 5450f20

@jails
Collaborator

Hi dashl ! This looks like similar to an recent commit in the master branch : 41ab56f. Maybe we can remove one of them ?

@daschl
Collaborator

Hmm normally we push them first to dev.

Please sign in to comment.
Something went wrong with that request. Please try again.