Skip to content

Commit

Permalink
Fix errors, add Movins
Browse files Browse the repository at this point in the history
  • Loading branch information
sabas committed Aug 5, 2023
1 parent 79af925 commit d96ec82
Show file tree
Hide file tree
Showing 25 changed files with 517 additions and 51 deletions.
4 changes: 2 additions & 2 deletions src/Generator/Aperak.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function addReference($qualifier, $data)
*
* @param $errorCode
* @param $errorMessage
* @return \EDI\Generator\Coparn
* @return \EDI\Generator\Aperak
*/
public function addError($errorCode, $errorMessage = null)
{
Expand Down Expand Up @@ -115,6 +115,6 @@ public function compose(?string $sMessageFunctionCode = "5", ?string $sDocumentN
$this->messageContent[] = $err;
}

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
3 changes: 2 additions & 1 deletion src/Generator/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Base

/** @var string */
protected $receiver;
protected $composeKeys;

/** @var string */
// protected $managingOrganisation = '89';
Expand Down Expand Up @@ -197,7 +198,7 @@ protected static function maxChars($string, $length = 35)
*
* @param $value
* @param $array
* @param null $errorMessage
*@param $errorMessage
*
* @throws EdifactException
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Calinf.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,6 @@ public function compose(?string $sMessageFunctionCode = '5', ?string $sDocumentN
$this->messageContent[] = $this->etd;
$this->messageContent[] = $this->callsign;

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
2 changes: 1 addition & 1 deletion src/Generator/Codeco.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ public function compose(?string $sMessageFunctionCode = "5", ?string $sDocumentN

$this->messageContent[] = ['CNT', [16, count($this->containers)]];

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
4 changes: 2 additions & 2 deletions src/Generator/Codeco/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function setContainer($number, $size, $statusCode, $fullEmptyIndicator)

/**
* @param $booking
* @param null $sequence
*@param $sequence
* @return \EDI\Generator\Codeco\Container
*/
public function setBooking($booking, $sequence = null)
Expand Down Expand Up @@ -77,7 +77,7 @@ public function setSeal($seal, $sealIssuer)

/**
* Date of the equipment event
* @param null $date
*@param $date
* @return \EDI\Generator\Codeco\Container
*/
public function setEffectiveDate($date = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Cohaor.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ public function compose(?string $sMessageFunctionCode = null, ?string $sDocument
}
}

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
12 changes: 6 additions & 6 deletions src/Generator/Coparn.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function setFND($loc)
* @param $size
* @param $statusCode
* @param $fullEmptyIndicator
* @return \EDI\Generator\Codeco\Container
* @return \EDI\Generator\Coparn
*/
public function setContainer($number, $size, $statusCode = 2, $fullEmptyIndicator = 5)
{
Expand Down Expand Up @@ -252,7 +252,7 @@ public function setGrossWeight($weight)
* Weight information
* $type = T (tare), AET (gross weight)
* @param $weight
* @return \EDI\Generator\Coreor
* @return \EDI\Generator\Coparn
*/
public function setTare($weight)
{
Expand Down Expand Up @@ -289,8 +289,8 @@ public function setDangerous($hazardClass, $hazardCode)
/**
* @param $hazardClass
* @param $hazardCode
* @param null $flashpoint
* @param null $packingGroup
*@param $flashpoint
*@param $packingGroup
* @return $this
*/
public function addDangerous($hazardClass, $hazardCode, $flashpoint = null, $packingGroup = null)
Expand Down Expand Up @@ -358,7 +358,7 @@ public function setHumidity($humidity)
*/
public function setOverDimensions($front = '', $back = '', $right = '', $left = '', $height = '')
{
$this->dim = [];
$this->dimensions = [];
if ($front !== '') {
$this->dimensions[] = ['DIM', '5', ['CMT', $front]];
}
Expand Down Expand Up @@ -470,6 +470,6 @@ public function compose(?string $sMessageFunctionCode = "5", ?string $sDocumentN
$this->messageContent[] = ['TDT', 1, '', 3];
$this->messageContent[] = ['CNT', [16, 1]];

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
2 changes: 1 addition & 1 deletion src/Generator/Copino.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,6 @@ public function compose(?string $sMessageFunctionCode = "9", ?string $sDocumentN
$this->messageContent[] = $this->destination;
$this->messageContent[] = ['CNT', [16, 1]];

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
7 changes: 3 additions & 4 deletions src/Generator/Coprar.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public function setCarrier($line)
public function setVessel($extVoyage, $line, $vslName, $callsign)
{
$this->vessel = self::tdtSegment(20, $extVoyage, 1, '', [$line, 172, 20], '', '', [$callsign, 103, '', $vslName]);
$this->callsign = self::rffSegment('VM', $callsign);

return $this;
}
Expand All @@ -95,15 +94,15 @@ public function setVessel($extVoyage, $line, $vslName, $callsign)
* $type = 9 (port of loading), 11 (port of discharge)
* @param $type
* @param $locode
* @param null $terminal
* @param $terminal
* @return \EDI\Generator\Coprar
*/
public function setPort($type, $locode, $terminal = null)
{
if ($terminal === null) {
$this->port = self::locSegment($type, [$locode, 139, 6]);
} else {
$this->port = self::locSegment($type, [$locode, 139, 6], [$terminal, TER, ZZZ]);
$this->port = self::locSegment($type, [$locode, 139, 6], [$terminal, "TER", "ZZZ"]);
}

return $this;
Expand Down Expand Up @@ -195,6 +194,6 @@ public function compose(?string $sMessageFunctionCode = "9", ?string $sDocumentN

$this->messageContent[] = ['CNT', [16, count($this->containers)]];

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
6 changes: 3 additions & 3 deletions src/Generator/Coprar/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function setContainer($number, $size, $statusCode, $fullEmptyIndicator)

/**
* @param $booking
* @param null $sequence
*@param $sequence
* @return \EDI\Generator\Coprar\Container
*/
public function setBooking($booking, $sequence = null)
Expand Down Expand Up @@ -198,8 +198,8 @@ public function setDangerous($hazardClass, $hazardCode)
/**
* @param $hazardClass
* @param $hazardCode
* @param null $flashpoint
* @param null $packingGroup
*@param $flashpoint
*@param $packingGroup
* @return $this
*/
public function addDangerous($hazardClass, $hazardCode, $flashpoint = null, $packingGroup = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Coreor.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,6 @@ public function compose(?string $sMessageFunctionCode = "9", ?string $sDocumentN
$this->messageContent[] = $this->freightPayer;
$this->messageContent[] = ['CNT', [16, 1]];

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
2 changes: 1 addition & 1 deletion src/Generator/Desadv.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Desadv extends Message

/**
* Desadv constructor.
* @param null $messageId
*@param $messageId
* @param string $identifier
* @param string|null $version
* @param string|null $release
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/Iftmbf.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,6 @@ public function compose(?string $sMessageFunctionCode = "5", ?string $sDocumentN
}
}

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
4 changes: 2 additions & 2 deletions src/Generator/Iftmbf/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public function setShipDate($date)
* $comType: DE 3155
* @param $cntType
* @param $cntTitle
* @param null $comType
* @param null $comData
*@param $comType
*@param $comData
* @return \EDI\Generator\Iftmbf\Container
*/
public function setShipContact($cntType, $cntTitle, $comType = null, $comData = null)
Expand Down
10 changes: 7 additions & 3 deletions src/Generator/Iftmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ class Iftmin extends Message
private $transportOrderNumber;
private $booking;
private $bookingSequence;
private $vessel;
private $weightKg;
private $containers;
private $forwarder;

/**
* Iftmin constructor.
* @param null $messageID
*@param $messageID
* @param string $identifier
* @param string $version
* @param string $release
Expand Down Expand Up @@ -134,7 +138,7 @@ public function setTransportOrderNumber($adn)
/**
* @param $booking
* @param string $bookingType
* @param null $sequence
*@param $sequence
* @return $this
*/
public function setBooking($booking, $bookingType = 'BN', $sequence = null)
Expand Down Expand Up @@ -215,6 +219,6 @@ public function compose(?string $sMessageFunctionCode = "5", ?string $sDocumentN

$this->messageContent[] = $this->weightKg;

return parent::compose($sMessageFunctionCode, $sDocumentNameCode, $sDocumentIdentifier);
return parent::compose();
}
}
2 changes: 1 addition & 1 deletion src/Generator/Invoic.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Invoic extends Message

/**
* Invoic constructor.
* @param null $messageId
*@param $messageId
* @param string $identifier
* @param string $version
* @param string $release
Expand Down
8 changes: 4 additions & 4 deletions src/Generator/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static function rffSegment($functionCode, $identifier)
* $secondaryLoc = preferred [locode, 139, 6] (if needed)
* @param $qualifier
* @param $firstLoc
* @param null $secondaryLoc
*@param $secondaryLoc
* @return array
*/
public static function locSegment($qualifier, $firstLoc, $secondaryLoc = null)
Expand All @@ -141,9 +141,9 @@ public static function locSegment($qualifier, $firstLoc, $secondaryLoc = null)
* @param $eqpType
* @param $eqpIdentification
* @param $dimension
* @param null $supplier
* @param null $statusCode
* @param null $fullEmptyIndicatorCode
*@param $supplier
*@param $statusCode
*@param $fullEmptyIndicatorCode
* @return array
*/
public static function eqdSegment($eqpType, $eqpIdentification, $dimension, $supplier = null, $statusCode = null, $fullEmptyIndicatorCode = null)
Expand Down
Loading

0 comments on commit d96ec82

Please sign in to comment.