@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | public static function queryProcessorNoQueryOptionsApplicable() |
| 32 | 32 | { |
| 33 | 33 | return 'Query options $select, $expand, $filter, $orderby, $inlinecount, $skip, $skiptoken and $top are not' . |
| 34 | - ' supported by this request method or cannot be applied to the requested resource.'; |
|
| 34 | + ' supported by this request method or cannot be applied to the requested resource.'; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | public static function queryProcessorSkipTokenCannotBeAppliedForNonPagedResourceSet($resourceSetName) |
| 129 | 129 | { |
| 130 | 130 | return '$skiptoken cannot be applied to the resource set \'' . $resourceSetName |
| 131 | - . '\', since paging is not enabled for this resource set'; |
|
| 131 | + . '\', since paging is not enabled for this resource set'; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public static function requestVersionTooLow($requestedVersion, $requiredVersion) |
| 24 | 24 | { |
| 25 | 25 | return 'Request version \'' . $requestedVersion . '\' is not supported for the request payload. The only' |
| 26 | - . ' supported version is \'' . $requiredVersion . '\'.'; |
|
| 26 | + . ' supported version is \'' . $requiredVersion . '\'.'; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public static function requestVersionIsBiggerThanProtocolVersion($requiredVersion, $configuredVersion) |
| 39 | 39 | { |
| 40 | 40 | return 'The response requires that version ' . $requiredVersion . ' of the protocol be used, but the' |
| 41 | - . ' MaxProtocolVersion of the data service is set to ' . $configuredVersion . '.'; |
|
| 41 | + . ' MaxProtocolVersion of the data service is set to ' . $configuredVersion . '.'; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -71,6 +71,6 @@ discard block |
||
| 71 | 71 | $availableVersions |
| 72 | 72 | ) { |
| 73 | 73 | return 'The version value ' . $requestedVersion . ' in the header ' . $requestHeaderName . ' is not' |
| 74 | - . ' supported, available versions are ' . $availableVersions; |
|
| 74 | + . ' supported, available versions are ' . $availableVersions; |
|
| 75 | 75 | } |
| 76 | 76 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | public static function resourcePropertyInvalidKindParameter($argumentName) |
| 21 | 21 | { |
| 22 | 22 | return 'The argument \'' . $argumentName . '\' is not a valid ResourcePropertyKind enum value or' |
| 23 | - . ' valid combination of ResourcePropertyKind enum values'; |
|
| 23 | + . ' valid combination of ResourcePropertyKind enum values'; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -36,6 +36,6 @@ discard block |
||
| 36 | 36 | $resourceTypeArgName |
| 37 | 37 | ) { |
| 38 | 38 | return 'The \'' . $resourcePropertyKindArgName . '\' parameter does not match with the type of the resource' |
| 39 | - . ' type in parameter \'' . $resourceTypeArgName . '\''; |
|
| 39 | + . ' type in parameter \'' . $resourceTypeArgName . '\''; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public static function handleException(\Exception $exception, IService $service) |
| 26 | 26 | { |
| 27 | - $acceptTypesText = $service->getHost()->getRequestAccept(); |
|
| 27 | + $acceptTypesText = $service->getHost()->getRequestAccept(); |
|
| 28 | 28 | try { |
| 29 | 29 | $responseContentType = HttpProcessUtility::selectMimeType( |
| 30 | 30 | $acceptTypesText, |
@@ -78,7 +78,6 @@ |
||
| 78 | 78 | $this->eTag = $eTag; |
| 79 | 79 | $this->name = $name; |
| 80 | 80 | $this->srcLink = $srcLink; |
| 81 | - $this->rel = (null !== $rel) ? $rel : |
|
| 82 | - ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name; |
|
| 81 | + $this->rel = (null !== $rel) ? $rel : ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name; |
|
| 83 | 82 | } |
| 84 | 83 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | switch ($this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, null)) { |
| 24 | 24 | case ODataConstants::ATOM_EDIT_RELATION_ATTRIBUTE_VALUE: |
| 25 | 25 | case ODataConstants::ODATA_RELATED_NAMESPACE . |
| 26 | - $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_TITLE_ELELMET_NAME, ''): |
|
| 26 | + $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_TITLE_ELELMET_NAME, ''): |
|
| 27 | 27 | $object = ODataLink::class; |
| 28 | 28 | break; |
| 29 | 29 | case ODataConstants::ATOM_EDIT_MEDIA_RELATION_ATTRIBUTE_VALUE: |
@@ -43,14 +43,14 @@ |
||
| 43 | 43 | public function handleStartNode($tagNamespace, $tagName, $attributes) |
| 44 | 44 | { |
| 45 | 45 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
| 46 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
| 46 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
| 47 | 47 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function handleEndNode($tagNamespace, $tagName) |
| 51 | 51 | { |
| 52 | 52 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
| 53 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
| 53 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
| 54 | 54 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
| 38 | 38 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
| 39 | 39 | ) { |
| 40 | - return ; |
|
| 40 | + return; |
|
| 41 | 41 | } |
| 42 | 42 | //TODO: this will need to be expanded with opengis namespaces as well when supported |
| 43 | 43 | assert($tagNamespace === ODataConstants::ODATA_NAMESPACE || |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
| 61 | 61 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
| 62 | 62 | ) { |
| 63 | - return ; |
|
| 63 | + return; |
|
| 64 | 64 | } |
| 65 | 65 | $prop = $this->properties->pop(); |
| 66 | 66 | $propContent = $this->propertyContent->pop(); |
@@ -34,29 +34,29 @@ discard block |
||
| 34 | 34 | ); |
| 35 | 35 | parent::handleStartNode($tagNamespace, $tagName, $attributes); |
| 36 | 36 | } |
| 37 | - public function handleStartAtomId(){ |
|
| 38 | - $this->enqueueEnd(function (){ |
|
| 37 | + public function handleStartAtomId() { |
|
| 38 | + $this->enqueueEnd(function () { |
|
| 39 | 39 | $this->oDataFeed->id = $this->popCharData(); |
| 40 | 40 | }); |
| 41 | 41 | } |
| 42 | - public function handleStartAtomTitle($attributes){ |
|
| 42 | + public function handleStartAtomTitle($attributes) { |
|
| 43 | 43 | $this->titleType = $this->arrayKeyOrDefault( |
| 44 | 44 | $attributes, |
| 45 | 45 | ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME, |
| 46 | 46 | '' |
| 47 | 47 | ); |
| 48 | - $this->enqueueEnd(function (){ |
|
| 48 | + $this->enqueueEnd(function () { |
|
| 49 | 49 | $this->oDataFeed->title = new ODataTitle($this->popCharData(), $this->titleType); |
| 50 | 50 | $this->titleType = null; |
| 51 | 51 | }); |
| 52 | 52 | } |
| 53 | - public function handleStartAtomUpdated(){ |
|
| 54 | - $this->enqueueEnd(function(){ |
|
| 53 | + public function handleStartAtomUpdated() { |
|
| 54 | + $this->enqueueEnd(function () { |
|
| 55 | 55 | $this->oDataFeed->updated = $this->popCharData(); |
| 56 | 56 | }); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public function handleStartAtomLink($attributes){ |
|
| 59 | + public function handleStartAtomLink($attributes) { |
|
| 60 | 60 | $rel = $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, ''); |
| 61 | 61 | $prop = $rel === ODataConstants::ATOM_SELF_RELATION_ATTRIBUTE_VALUE ? 'selfLink' : 'nextPageLink'; |
| 62 | 62 | $this->oDataFeed->{$prop} = new ODataLink( |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | $this->enqueueEnd($this->doNothing()); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - public function handleStartMetadataCount(){ |
|
| 72 | - $this->enqueueEnd(function(){ |
|
| 73 | - $this->oDataFeed->rowCount = (int)$this->popCharData(); |
|
| 71 | + public function handleStartMetadataCount() { |
|
| 72 | + $this->enqueueEnd(function () { |
|
| 73 | + $this->oDataFeed->rowCount = (int) $this->popCharData(); |
|
| 74 | 74 | }); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -34,29 +34,33 @@ discard block |
||
| 34 | 34 | ); |
| 35 | 35 | parent::handleStartNode($tagNamespace, $tagName, $attributes); |
| 36 | 36 | } |
| 37 | - public function handleStartAtomId(){ |
|
| 38 | - $this->enqueueEnd(function (){ |
|
| 37 | + public function handleStartAtomId() |
|
| 38 | + { |
|
| 39 | + $this->enqueueEnd(function () { |
|
| 39 | 40 | $this->oDataFeed->id = $this->popCharData(); |
| 40 | 41 | }); |
| 41 | 42 | } |
| 42 | - public function handleStartAtomTitle($attributes){ |
|
| 43 | + public function handleStartAtomTitle($attributes) |
|
| 44 | + { |
|
| 43 | 45 | $this->titleType = $this->arrayKeyOrDefault( |
| 44 | 46 | $attributes, |
| 45 | 47 | ODataConstants::ATOM_TYPE_ATTRIBUTE_NAME, |
| 46 | 48 | '' |
| 47 | 49 | ); |
| 48 | - $this->enqueueEnd(function (){ |
|
| 50 | + $this->enqueueEnd(function () { |
|
| 49 | 51 | $this->oDataFeed->title = new ODataTitle($this->popCharData(), $this->titleType); |
| 50 | 52 | $this->titleType = null; |
| 51 | 53 | }); |
| 52 | 54 | } |
| 53 | - public function handleStartAtomUpdated(){ |
|
| 54 | - $this->enqueueEnd(function(){ |
|
| 55 | + public function handleStartAtomUpdated() |
|
| 56 | + { |
|
| 57 | + $this->enqueueEnd(function() { |
|
| 55 | 58 | $this->oDataFeed->updated = $this->popCharData(); |
| 56 | 59 | }); |
| 57 | 60 | } |
| 58 | 61 | |
| 59 | - public function handleStartAtomLink($attributes){ |
|
| 62 | + public function handleStartAtomLink($attributes) |
|
| 63 | + { |
|
| 60 | 64 | $rel = $this->arrayKeyOrDefault($attributes, ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, ''); |
| 61 | 65 | $prop = $rel === ODataConstants::ATOM_SELF_RELATION_ATTRIBUTE_VALUE ? 'selfLink' : 'nextPageLink'; |
| 62 | 66 | $this->oDataFeed->{$prop} = new ODataLink( |
@@ -68,8 +72,9 @@ discard block |
||
| 68 | 72 | $this->enqueueEnd($this->doNothing()); |
| 69 | 73 | } |
| 70 | 74 | |
| 71 | - public function handleStartMetadataCount(){ |
|
| 72 | - $this->enqueueEnd(function(){ |
|
| 75 | + public function handleStartMetadataCount() |
|
| 76 | + { |
|
| 77 | + $this->enqueueEnd(function() { |
|
| 73 | 78 | $this->oDataFeed->rowCount = (int)$this->popCharData(); |
| 74 | 79 | }); |
| 75 | 80 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | private $tagEndQueue; |
| 24 | 24 | |
| 25 | - private function resolveNamespaceToMethodTag($tagNamespace){ |
|
| 25 | + private function resolveNamespaceToMethodTag($tagNamespace) { |
|
| 26 | 26 | $tags = [ |
| 27 | 27 | strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) => 'Metadata', |
| 28 | 28 | strtolower(ODataConstants::ATOM_NAMESPACE) => 'Atom', |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | protected function enqueueEnd(Closure $closure) |
| 92 | 92 | { |
| 93 | - if(null === $this->tagEndQueue){ |
|
| 93 | + if (null === $this->tagEndQueue) { |
|
| 94 | 94 | $this->tagEndQueue = new SplStack(); |
| 95 | 95 | } |
| 96 | 96 | $this->tagEndQueue->push($this->bindHere($closure)); |
@@ -22,7 +22,8 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | private $tagEndQueue; |
| 24 | 24 | |
| 25 | - private function resolveNamespaceToMethodTag($tagNamespace){ |
|
| 25 | + private function resolveNamespaceToMethodTag($tagNamespace) |
|
| 26 | + { |
|
| 26 | 27 | $tags = [ |
| 27 | 28 | strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) => 'Metadata', |
| 28 | 29 | strtolower(ODataConstants::ATOM_NAMESPACE) => 'Atom', |
@@ -90,7 +91,7 @@ discard block |
||
| 90 | 91 | } |
| 91 | 92 | protected function enqueueEnd(Closure $closure) |
| 92 | 93 | { |
| 93 | - if(null === $this->tagEndQueue){ |
|
| 94 | + if(null === $this->tagEndQueue) { |
|
| 94 | 95 | $this->tagEndQueue = new SplStack(); |
| 95 | 96 | } |
| 96 | 97 | $this->tagEndQueue->push($this->bindHere($closure)); |