Skip to content

Commit

Permalink
Required parameters after optional parameters in function/method sign…
Browse files Browse the repository at this point in the history
…atures
  • Loading branch information
weisswurstkanone committed Apr 28, 2021
1 parent 20f6902 commit dcde4af
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions src/GraphQL/Resolver/AssetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AssetType
* @return array
* @throws \Exception
*/
public function resolveMetadata($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveMetadata($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
$asset = $this->getAssetFromValue($value, $context);

Expand Down Expand Up @@ -83,7 +83,7 @@ public function resolveMetadata($value = null, $args = [], $context, ResolveInfo
* @return string|null
* @throws \Exception
*/
public function resolvePath($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolvePath($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
$asset = $this->getAssetFromValue($value, $context);

Expand All @@ -107,7 +107,7 @@ public function resolvePath($value = null, $args = [], $context, ResolveInfo $re
* @return string|null
* @throws \Exception
*/
public function resolveData($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveData($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
$asset = $this->getAssetFromValue($value, $context);

Expand Down Expand Up @@ -136,7 +136,7 @@ public function resolveData($value = null, $args = [], $context, ResolveInfo $re
* @return array
* @throws \Exception
*/
public function resolveSrcSet($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveSrcSet($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
$asset = $this->getAssetFromValue($value, $context);

Expand Down Expand Up @@ -166,7 +166,7 @@ public function resolveSrcSet($value = null, $args = [], $context, ResolveInfo $
* @return array
* @throws \Exception
*/
public function resolveResolutions($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveResolutions($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
$types = $args['types'];
$thumbnail = $value['url'];
Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/Resolver/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(Service $graphQlService)
*
* @return int
*/
public function resolveIndex($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveIndex($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if (null === $value) {
return null;
Expand All @@ -59,7 +59,7 @@ public function resolveIndex($value = null, $args = [], $context, ResolveInfo $r
*
* @return string
*/
public function resolveChildrenSortBy($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveChildrenSortBy($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if (null === $value) {
return null;
Expand Down
10 changes: 5 additions & 5 deletions src/GraphQL/Resolver/HotspotType.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class HotspotType
* @return array
* @throws \Exception
*/
public function resolveImage($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveImage($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if ($value instanceof ElementDescriptor) {

Expand All @@ -68,7 +68,7 @@ public function resolveImage($value = null, $args = [], $context, ResolveInfo $r
* @return array
* @throws \Exception
*/
public function resolveCrop($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveCrop($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
return !empty($value['crop']) ? $value['crop'] : null;
}
Expand All @@ -81,7 +81,7 @@ public function resolveCrop($value = null, $args = [], $context, ResolveInfo $re
* @return array
* @throws \Exception
*/
public function resolveHotspots($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveHotspots($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
return !empty($value['hotspots']) ? $value['hotspots'] : null;
}
Expand All @@ -94,7 +94,7 @@ public function resolveHotspots($value = null, $args = [], $context, ResolveInfo
* @return array
* @throws \Exception
*/
public function resolveMarker($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveMarker($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
return !empty($value['marker']) ? $value['marker'] : null;
}
Expand All @@ -105,7 +105,7 @@ public function resolveMarker($value = null, $args = [], $context, ResolveInfo $
* @param array $context
* @param ResolveInfo|null $resolveInfo
*/
public function resolveMetadata($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveMetadata($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
/** @var array $metadata */
$metadata = is_array($value) ? $value['data'] : [];
Expand Down
6 changes: 3 additions & 3 deletions src/GraphQL/Resolver/QuantityValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class QuantityValue
* @return array
* @throws \Exception
*/
public function resolveUnit($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveUnit($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if($value instanceof \Pimcore\Model\DataObject\Data\QuantityValue) {
$unit = $value->getUnit();
Expand All @@ -48,7 +48,7 @@ public function resolveUnit($value = null, $args = [], $context, ResolveInfo $re
* @return string
* @throws \Exception
*/
public function resolveValue($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveValue($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if($value instanceof \Pimcore\Model\DataObject\Data\QuantityValue) {
return $value->getValue();
Expand All @@ -65,7 +65,7 @@ public function resolveValue($value = null, $args = [], $context, ResolveInfo $r
* @return string
* @throws \Exception
*/
public function resolveToString($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveToString($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
$returnValue = null;

Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/Resolver/UrlSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class UrlSlug
* @return string|null
* @throws \Exception
*/
public function resolveSlug($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveSlug($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if($value instanceof \Pimcore\Model\DataObject\Data\UrlSlug) {
return $value->getSlug();
Expand All @@ -46,7 +46,7 @@ public function resolveSlug($value = null, $args = [], $context, ResolveInfo $re
* @return int|null
* @throws \Exception
*/
public function resolveSiteId($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveSiteId($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if($value instanceof \Pimcore\Model\DataObject\Data\UrlSlug) {
return $value->getSiteId();
Expand Down
10 changes: 5 additions & 5 deletions src/GraphQL/Resolver/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Video
* @param ResolveInfo|null $resolveInfo
* @return string|null
*/
public function resolveType($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveType($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if ($value instanceof \Pimcore\Model\DataObject\Data\Video) {
return $value->getType();
Expand All @@ -53,7 +53,7 @@ public function resolveType($value = null, $args = [], $context, ResolveInfo $re
* @return string|null
* @throws \Exception
*/
public function resolveTitle($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveTitle($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if ($value instanceof \Pimcore\Model\DataObject\Data\Video) {
return $value->getTitle();
Expand All @@ -69,7 +69,7 @@ public function resolveTitle($value = null, $args = [], $context, ResolveInfo $r
* @param ResolveInfo|null $resolveInfo
* @return string|null
*/
public function resolveDescription($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveDescription($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if ($value instanceof \Pimcore\Model\DataObject\Data\Video) {
return $value->getDescription();
Expand All @@ -86,7 +86,7 @@ public function resolveDescription($value = null, $args = [], $context, ResolveI
* @param ResolveInfo|null $resolveInfo
* @return ElementDescriptor|null
*/
public function resolvePoster($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolvePoster($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if ($value instanceof \Pimcore\Model\DataObject\Data\Video) {
$asset = $value->getPoster();
Expand Down Expand Up @@ -115,7 +115,7 @@ public function resolvePoster($value = null, $args = [], $context, ResolveInfo $
* @param ResolveInfo|null $resolveInfo
* @return ElementDescriptor|array|null
*/
public function resolveData($value = null, $args = [], $context, ResolveInfo $resolveInfo = null)
public function resolveData($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null)
{
if ($value instanceof \Pimcore\Model\DataObject\Data\Video) {
if ($value->getType() == "asset" && $value->getData() instanceof \Pimcore\Model\Asset\Video) {
Expand Down

0 comments on commit dcde4af

Please sign in to comment.