X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdoctrine%2Fcollections%2Flib%2FDoctrine%2FCommon%2FCollections%2FCriteria.php;h=748a08474800f190d79884071b5fe4cac7c59053;hp=3f9d43a8294e7ccce12a7ec137c48c3d9854108a;hb=refs%2Fheads%2Ft2;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5 diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php index 3f9d43a82..748a08474 100644 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php @@ -53,7 +53,7 @@ class Criteria /** * @var string[] */ - private $orderings = array(); + private $orderings = []; /** * @var int|null @@ -137,9 +137,10 @@ class Criteria return $this->where($expression); } - $this->expression = new CompositeExpression(CompositeExpression::TYPE_AND, array( - $this->expression, $expression - )); + $this->expression = new CompositeExpression( + CompositeExpression::TYPE_AND, + [$this->expression, $expression] + ); return $this; } @@ -158,9 +159,10 @@ class Criteria return $this->where($expression); } - $this->expression = new CompositeExpression(CompositeExpression::TYPE_OR, array( - $this->expression, $expression - )); + $this->expression = new CompositeExpression( + CompositeExpression::TYPE_OR, + [$this->expression, $expression] + ); return $this; } @@ -200,7 +202,7 @@ class Criteria public function orderBy(array $orderings) { $this->orderings = array_map( - function ($ordering) { + function (string $ordering) : string { return strtoupper($ordering) === Criteria::ASC ? Criteria::ASC : Criteria::DESC; }, $orderings