Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 1dd0230

Browse files
committed
Merge branch 'feature/#109-extended-code-sniffs' into develop
Close #109
2 parents 168a6dd + 64e9b7b commit 1dd0230

File tree

87 files changed

+642
-601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+642
-601
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"doctrine/annotations": "~1.0",
2222
"zendframework/zend-stdlib": "^2.7 || ^3.0",
2323
"phpunit/phpunit": "^6.2.3",
24-
"zendframework/zend-coding-standard": "~1.0.0"
24+
"zendframework/zend-coding-standard": "^1.0.0"
2525
},
2626
"suggest": {
2727
"doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",

composer.lock

Lines changed: 51 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<?xml version="1.0"?>
1+
<?xml version="1.0"?>
22
<ruleset name="Zend Framework coding standard">
33
<rule ref="./vendor/zendframework/zend-coding-standard/ruleset.xml"/>
44

55
<!-- Paths to check -->
66
<file>src</file>
77
<file>test</file>
88
<exclude-pattern>*/TestAsset/*</exclude-pattern>
9+
<exclude-pattern>*/_files/*</exclude-pattern>
910
</ruleset>

src/Annotation/AnnotationManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ public function createAnnotation(array $annotationData)
9999

100100
$eventManager = $this->getEventManager();
101101
$results = $eventManager->triggerEventUntil(function ($r) {
102-
return (is_object($r));
102+
return is_object($r);
103103
}, $event);
104104

105105
$annotation = $results->last();
106106

107-
return (is_object($annotation) ? $annotation : false);
107+
return is_object($annotation) ? $annotation : false;
108108
}
109109
}

src/Annotation/Parser/DoctrineAnnotationParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function registerAnnotations($annotations)
140140
throw new Exception\InvalidArgumentException(sprintf(
141141
'%s: expects an array or Traversable; received "%s"',
142142
__METHOD__,
143-
(is_object($annotations) ? get_class($annotations) : gettype($annotations))
143+
is_object($annotations) ? get_class($annotations) : gettype($annotations)
144144
));
145145
}
146146

src/Annotation/Parser/GenericAnnotationParser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function onCreateAnnotation(EventInterface $e)
8080
*
8181
* @param string|AnnotationInterface $annotation String class name of an
8282
* AnnotationInterface implementation, or actual instance
83-
* @return GenericAnnotationParser
83+
* @return void
8484
* @throws Exception\InvalidArgumentException
8585
*/
8686
public function registerAnnotation($annotation)
@@ -96,7 +96,7 @@ public function registerAnnotation($annotation)
9696
'%s: expects an instance of %s\AnnotationInterface; received "%s"',
9797
__METHOD__,
9898
__NAMESPACE__,
99-
(is_object($annotation) ? get_class($annotation) : gettype($annotation))
99+
is_object($annotation) ? get_class($annotation) : gettype($annotation)
100100
));
101101
}
102102

@@ -126,7 +126,7 @@ public function registerAnnotations($annotations)
126126
throw new Exception\InvalidArgumentException(sprintf(
127127
'%s: expects an array or Traversable; received "%s"',
128128
__METHOD__,
129-
(is_object($annotations) ? get_class($annotations) : gettype($annotations))
129+
is_object($annotations) ? get_class($annotations) : gettype($annotations)
130130
));
131131
}
132132

@@ -203,7 +203,7 @@ protected function hasAlias($alias)
203203
{
204204
$alias = $this->normalizeAlias($alias);
205205

206-
return (isset($this->aliases[$alias]));
206+
return isset($this->aliases[$alias]);
207207
}
208208

209209
/**

src/Generator/AbstractGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract class AbstractGenerator implements GeneratorInterface
3131
/**
3232
* @var string
3333
*/
34-
protected $sourceContent = null;
34+
protected $sourceContent;
3535

3636
/**
3737
* @param array $options
@@ -108,7 +108,7 @@ public function setOptions($options)
108108
throw new Exception\InvalidArgumentException(sprintf(
109109
'%s expects an array or Traversable object; received "%s"',
110110
__METHOD__,
111-
(is_object($options) ? get_class($options) : gettype($options))
111+
is_object($options) ? get_class($options) : gettype($options)
112112
));
113113
}
114114

0 commit comments

Comments
 (0)