Permalink
Browse files

[#3218] CS fixes

- whitespace after operators
- use identity operator when testing against null
- array/argument indentation
  • Loading branch information...
weierophinney committed Dec 19, 2012
1 parent d411daa commit 2912c1a70baac4731f991123b44df6c729b4a1c0
@@ -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;
}
-
}
@@ -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()

0 comments on commit 2912c1a

Please sign in to comment.