Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[#3218] CS fixes

- whitespace after operators
- use identity operator when testing against null
- array/argument indentation
  • Loading branch information...
commit 2912c1a70baac4731f991123b44df6c729b4a1c0 1 parent d411daa
@weierophinney weierophinney authored
View
8 library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php
@@ -19,7 +19,6 @@
*/
class LicenseTag extends Tag
{
-
/**
* @var string
*/
@@ -36,7 +35,7 @@ public function __construct(array $options = array())
$this->setUrl($options['url']);
}
- if(empty($this->name)) {
+ if (empty($this->name)) {
$this->setName('license');
}
}
@@ -88,9 +87,8 @@ public function getUrl()
public function generate()
{
$output = '@' . $this->name
- . (($this->url != null) ? ' ' . $this->url : '')
- . (($this->description != null) ? ' ' . $this->description : '');
+ . (($this->url !== null) ? ' ' . $this->url : '')
+ . (($this->description !== null) ? ' ' . $this->description : '');
return $output;
}
-
}
View
12 tests/ZendTest/Code/Generator/DocBlockTagGeneratorTest.php
@@ -50,10 +50,14 @@ public function testCanPassDescriptionToConstructor()
public function testCanGenerateLicenseTag()
{
- $tag = new LicenseTag(array('url' => 'http://test.license.com',
- 'description' => 'Test License'));
- $this->assertEquals('@license http://test.license.com Test License',
- $tag->generate());
+ $tag = new LicenseTag(array(
+ 'url' => 'http://test.license.com',
+ 'description' => 'Test License',
+ ));
+ $this->assertEquals(
+ '@license http://test.license.com Test License',
+ $tag->generate()
+ );
}
public function testNameGetterAndSetterPersistValue()
Please sign in to comment.
Something went wrong with that request. Please try again.