Skip to content

Commit

Permalink
PES-2321: FunctionSpacing update
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-potuznik-z committed Nov 8, 2024
1 parent 3098254 commit cf75e70
Show file tree
Hide file tree
Showing 199 changed files with 2 additions and 251 deletions.
2 changes: 2 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
<property name="spacingBeforeFirst" value="0" />
<property name="spacingAfterLast" value="0" />
</properties>
</rule>

Expand Down
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/InvalidRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ public function __construct( string $mainMessage, array $errorMessages ) {
public function getMessages(): array {
return $this->messages;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Rest/PickupPointValidate.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,4 @@ public function validate( PickupPointValidateRequest $request ): PickupPointVali
throw new RestException( $exception->getMessage() );
}
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Rest/PickupPointValidateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,4 @@ public function __construct(
public function getSubmittableData(): array {
return array_filter( get_object_vars( $this ) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,4 @@ public function isValid(): bool {
public function getErrors(): array {
return $this->errors;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,5 +381,4 @@ private function getFaultIdentifier( SoapFault $exception ): string {

return $exception->faultstring;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/CreatePacketMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,4 @@ public function fromOrderToArray( Entity\Order $order ): array {

return $createPacketData;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Request/BarcodePng.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ public function __construct( string $barcode ) {
public function getBarcode(): string {
return $this->barcode;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Request/CancelPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ public function __construct( string $packetId ) {
public function getPacketId(): string {
return $this->packetId;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Request/CreatePacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,4 @@ public function __construct( Entity\Order $order ) {
public function getSubmittableData(): array {
return array_filter( get_object_vars( $this ) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,4 @@ public function __construct( Entity\Order $order ) {
public function getSubmittableData(): array {
return array_filter( get_object_vars( $this ) );
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Request/CreateShipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ public function getCustomBarcode(): ?string {
public function setCustomBarcode( ?string $customBarcode ): void {
$this->customBarcode = $customBarcode;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Request/CreateStorageFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ public function getContent(): string {
public function getName(): string {
return $this->name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ public function __construct( string $packetId ) {
public function getPacketId(): string {
return $this->packetId;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ public function getStoredUntil(): ?string {
CoreHelper::MYSQL_DATE_FORMAT
);
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Request/PacketStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ public function __construct( string $packetId ) {
public function getPacketId(): string {
return $this->packetId;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ public function getFormat(): string {
public function getOffset(): int {
return $this->offset;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Request/PacketsLabelsPdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ public function getFormat(): string {
public function getOffset(): int {
return $this->offset;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ public function __construct( string $senderLabel ) {
public function getSenderLabel(): string {
return $this->senderLabel;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Response/BarcodePng.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ public function getImageContent(): ?string {
public function setImageContent( ?string $imageContent ): void {
$this->imageContent = $imageContent;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Response/BaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,4 @@ public function setFaultString( string $faultString ): void {
public function getFaultString(): ?string {
return $this->faultString;
}

}
2 changes: 0 additions & 2 deletions src/Packetery/Core/Api/Soap/Response/CancelPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* @package Packetery\Core\Api\Soap\Response
*/
class CancelPacket extends BaseResponse {

/**
* Checks if cancel is possible.
*
Expand All @@ -24,5 +23,4 @@ class CancelPacket extends BaseResponse {
public function hasCancelNotAllowedFault(): bool {
return ( 'CancelNotAllowedFault' === $this->fault );
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Response/CreatePacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,4 @@ public function getErrorsAsString( bool $prependFaultString = true ): string {

return implode( ', ', $allErrors );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,4 @@ public function setValidationErrors( array $errors ): void {
public function getValidationErrors(): array {
return $this->validationErrors;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Response/CreateShipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,4 @@ public function getInvalidPacketIds(): array {
public function setInvalidPacketIds( array $invalidPacketIds ): void {
$this->invalidPacketIds = $invalidPacketIds;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Response/CreateStorageFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ public function setId( string $id ): void {
public function getId(): ?string {
return $this->id;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ public function setNumber( string $number ): void {
public function getNumber(): string {
return $this->number;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Response/PacketStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ public function setStoredUntil( ?string $storedUntil ): void {

$this->storedUntil = ( $formatedStoredUntil instanceof \DateTimeImmutable ) ? $formatedStoredUntil : null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,4 @@ public function hasInvalidCourierNumber( string $courierNumber ): ?bool {

return null;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Api/Soap/Response/PacketsLabelsPdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ public function setPdfContents( string $pdfContents ): void {
public function getPdfContents(): string {
return $this->pdfContents;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* SenderGetReturnRouting
*/
class SenderGetReturnRouting extends BaseResponse {

/**
* Checks if sender exists.
*
Expand All @@ -29,5 +28,4 @@ public function senderExists(): ?bool {

return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ public function hasInvalidPacketId( string $packetId ): ?bool {

return null;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/CoreHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,4 @@ public function getStringFromDateTime( ?DateTimeImmutable $date, string $format
public function getDateTimeFromString( ?string $date ): ?DateTimeImmutable {
return $date ? new DateTimeImmutable( $date ) : null;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,4 @@ public function setCounty( ?string $county ): void {
public function export(): array {
return get_object_vars( $this );
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/Carrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,4 @@ public function supportsAgeVerification(): bool {
public function isCarDelivery(): bool {
return in_array( $this->id, self::CAR_DELIVERY_CARRIERS, true );
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/CustomsDeclaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,5 +393,4 @@ public function hasEadFileContent(): bool {
public function hasInvoiceFileContent(): bool {
return $this->hasInvoiceFileContent;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/CustomsDeclarationItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,5 +258,4 @@ public function isVoc(): bool {
public function setIsVoc( bool $isVoc ): void {
$this->isVoc = $isVoc;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1143,5 +1143,4 @@ public function updateApiErrorMessage( ?string $errorMessage ): void {
$this->setLastApiErrorMessage( $errorMessage );
$this->setLastApiErrorDateTime( $errorMessage ? CoreHelper::now() : null );
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/PacketStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,4 @@ public function getTranslatedName(): string {
public function hasDefaultSynchronization(): bool {
return $this->defaultSynchronization;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/PickupPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,4 @@ public function setZip( ?string $zip ): void {
public function setCity( ?string $city ): void {
$this->city = $city;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Entity/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,4 @@ public function setWidth( ?float $width ): void {
public function setHeight( ?float $height ): void {
$this->height = $height;
}

}
2 changes: 0 additions & 2 deletions src/Packetery/Core/Interfaces/IWebRequestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* @package Packetery
*/
interface IWebRequestClient {

/**
* Accepts parameters in WP format.
*
Expand All @@ -33,5 +32,4 @@ public function post( string $url, array $options ): string;
* @return string
*/
public function get( string $url, array $options ): string;

}
2 changes: 0 additions & 2 deletions src/Packetery/Core/Log/ILogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* @package Packetery\Log
*/
interface ILogger {

/**
* Registers log driver.
*/
Expand Down Expand Up @@ -49,5 +48,4 @@ public function getRecords( $orderId, ?string $action, array $sorting = [], int
* @return int
*/
public function countRecords( $orderId = null, ?string $action = null ): int;

}
1 change: 0 additions & 1 deletion src/Packetery/Core/PickupPointProvider/BaseProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,4 @@ public function supportsAgeVerification(): bool {
public function hasPickupPoints(): bool {
return $this->hasPickupPoints;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* @package Packetery
*/
class CompoundCarrierCollectionFactory {

/**
* Creates collection.
* TODO: take into account that not all types of pickup points support age verification.
Expand Down Expand Up @@ -79,5 +78,4 @@ public function create() {
),
];
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,4 @@ public function __construct(
public function getVendorCodes(): array {
return $this->vendorCodes;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @package Packetery
*/
class VendorCollectionFactory {

/**
* Creates collection.
*
Expand Down Expand Up @@ -110,5 +109,4 @@ public function create() {
),
];
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/PickupPointProvider/VendorProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,4 @@ public function __construct(
public function getGroup(): string {
return $this->group;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Rounder.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,4 @@ private static function sanitizeFloat( float $number ): float {

return $newNumber;
}

}
2 changes: 0 additions & 2 deletions src/Packetery/Core/Validator/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @package Packetery\Validator
*/
class Address {

/**
* Validates data needed to instantiate.
*
Expand All @@ -28,5 +27,4 @@ class Address {
public function validate( Entity\Address $address ): bool {
return ( $address->getStreet() && $address->getCity() && $address->getZip() );
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Validator/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,4 @@ private function validateSize( Entity\Order $order ): SizeReport {

return new SizeReport( true, true, true );
}

}
2 changes: 0 additions & 2 deletions src/Packetery/Core/Validator/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @package Packetery\Validator
*/
class Size {

/**
* Validates data needed to instantiate.
*
Expand All @@ -32,5 +31,4 @@ public function validate( Entity\Size $size ): SizeReport {
(bool) $size->getLength()
);
}

}
1 change: 0 additions & 1 deletion src/Packetery/Core/Validator/SizeReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,4 @@ public function isWidthValid(): bool {
public function isLengthValid(): bool {
return $this->isLengthValid;
}

}
1 change: 0 additions & 1 deletion src/Packetery/Module/Api/BaseRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ public function getRoute( string $path ): string {
public function registerRoute( string $path, array $params ): void {
register_rest_route( $this->namespace, $this->getRoute( $path ), $params );
}

}
1 change: 0 additions & 1 deletion src/Packetery/Module/Api/Internal/CheckoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,4 @@ private function save( WP_REST_Request $request, array $carrierAttrs ): void {
DAY_IN_SECONDS
);
}

}
Loading

0 comments on commit cf75e70

Please sign in to comment.