Simplification of the HTML class name in Tag\Cloud\Decorator\HtmlCloud #4822

Closed
wants to merge 2 commits into
from

3 participants

@froschdesign
Zend Framework member

Changed from "Zend\Tag\Cloud" to "zend-tag-cloud"

@froschdesign froschdesign Simplification of the HTML class name in Zend\Tag\Cloud\Decorator\Htm…
…lCloud

Changed from "Zend\Tag\Cloud" to "zend-tag-cloud"
7a83734
@froschdesign froschdesign referenced this pull request in zendframework/zf2-documentation Jul 13, 2013
Merged

HTML outputs for the code examples in Zend\Tag and Zend\Tag\Cloud added #959

@Maks3w
Zend Framework member

@froschdesign There is no a hard limit with 80 characters width.

@froschdesign
Zend Framework member

@Maks3w
If I look in the coding standards and in the PSR-2 overview, then I find the following:

The target line length is 80 characters.

and

…lines SHOULD be 80 characters or less.

Did I miss something?

@Maks3w
Zend Framework member

That are not hard limits, just recomendations. There is no plan for change all the lines of the framework to match that recomendations.

Actually in zf2 only the recommendation apply to new/modified lines

@froschdesign
Zend Framework member

I do not want to change all the lines of the framework! Only the files which I have modified.
I've made this change for a better readability. No more, no less.

@weierophinney weierophinney commented on the diff Jul 19, 2013
tests/ZendTest/Tag/Cloud/CloudTest.php
@@ -39,25 +39,39 @@ public function testSetCloudDecoratorViaArray()
{
$cloud = $this->_getCloud();
- $cloud->setCloudDecorator(array('decorator' => 'CloudDummy', 'options' => array('foo' => 'bar')));
- $this->assertTrue($cloud->getCloudDecorator() instanceof TestAsset\CloudDummy);
+ $cloud->setCloudDecorator(
+ array(
+ 'decorator' => 'CloudDummy',
+ 'options' => array('foo' => 'bar'),
+ )
+ );
+ $this->assertTrue(
+ $cloud->getCloudDecorator() instanceof TestAsset\CloudDummy
+ );
@weierophinney
Zend Framework member
weierophinney added a line comment Jul 19, 2013

Use assertInstanceOf() here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@weierophinney weierophinney commented on the diff Jul 19, 2013
tests/ZendTest/Tag/Cloud/CloudTest.php
$this->assertEquals('bar', $cloud->getCloudDecorator()->getFoo());
}
public function testGetAndSetCloudDecorator()
{
$cloud = $this->_getCloud();
- $this->assertTrue($cloud->getCloudDecorator() instanceof \Zend\Tag\Cloud\Decorator\HtmlCloud);
+ $this->assertTrue(
+ $cloud->getCloudDecorator() instanceof
+ \Zend\Tag\Cloud\Decorator\HtmlCloud
+ );
@weierophinney
Zend Framework member
weierophinney added a line comment Jul 19, 2013

Same remark: assertInstanceOf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@weierophinney weierophinney added a commit that referenced this pull request Jul 19, 2013
@weierophinney weierophinney [#4822] CS
- If we're going to make readability changes, let's make them consistent
  with the rest of the framework:
  - array arguments should all have commas following each entry
  - array arguments as sole argument of a method can open on same line
    as call; indentation then adjusts one level less
- Use `assertInstanceOf` throughout, instead of `assertTrue($a instanceof $b)`
- While the `setExpectedException()` lines get a little long, they're
  not unreadable; breaking them into multiple lines makes intent less
  clear.
008fbcf
@weierophinney weierophinney added a commit that referenced this pull request Jul 19, 2013
@weierophinney weierophinney Merge branch 'feature/4822' into develop
Close #4822
a0baba2
@Maks3w Maks3w closed this Jul 19, 2013
@weierophinney weierophinney added a commit to zendframework/zend-tag that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#4822 from froschdesign…
…/hotfix/zend-tag-cloud

Simplification of the HTML class name in Tag\Cloud\Decorator\HtmlCloud
2ff8f99
@weierophinney weierophinney added a commit to zendframework/zend-tag that referenced this pull request May 15, 2015
@weierophinney weierophinney [zendframework/zendframework#4822] CS
- If we're going to make readability changes, let's make them consistent
  with the rest of the framework:
  - array arguments should all have commas following each entry
  - array arguments as sole argument of a method can open on same line
    as call; indentation then adjusts one level less
- Use `assertInstanceOf` throughout, instead of `assertTrue($a instanceof $b)`
- While the `setExpectedException()` lines get a little long, they're
  not unreadable; breaking them into multiple lines makes intent less
  clear.
d2bc6d7
@weierophinney weierophinney added a commit to zendframework/zend-tag that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'feature/4822' into develop 1cc7b7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment