mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-13 01:51:50 +01:00
Fix coding standard (no_blank_lines_after_phpdoc, single_blank_line_before_namespace, yoda_style)
This commit is contained in:
@@ -109,7 +109,7 @@ class Collection implements Countable, ArrayAccess, IteratorAggregate
|
||||
*/
|
||||
public function add($element, $index = null)
|
||||
{
|
||||
if ($index === null) {
|
||||
if (null === $index) {
|
||||
$this->elements[] = $element;
|
||||
} else {
|
||||
$this->elements[$index] = $element;
|
||||
@@ -216,7 +216,7 @@ class Collection implements Countable, ArrayAccess, IteratorAggregate
|
||||
{
|
||||
$index = Arrays::getIndexOf($this->elements, $element);
|
||||
|
||||
return $index !== null && $index !== false;
|
||||
return null !== $index && false !== $index;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user