File tree Expand file tree Collapse file tree 5 files changed +9
-7
lines changed
Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,3 @@ composer.phar
22/vendor /
33/private /
44/tests /functional /* .pdf
5-
6- # Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
7- # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
8- # composer.lock
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public function __construct(
5858 /**
5959 * @return string
6060 */
61- public function getCertificate ()
61+ public function getCertificate (): string
6262 {
6363 return $ this ->identity ->getSigningCertificate ();
6464 }
@@ -77,7 +77,7 @@ public function createSignature(\SetaPDF_Core_Reader_FilePath $tmpPath): string
7777 $ this ->module ->setExtraCertificates ([$ this ->client ->getCertificatePath ()]);
7878
7979 // For backwards compatibility
80- if (method_exists ($ this ->module , 'setOcspResponse ' )) {
80+ if (\ method_exists ($ this ->module , 'setOcspResponse ' )) {
8181 $ this ->module ->setOcspResponse ($ this ->identity ->getOcspResponse ());
8282 } else {
8383 $ this ->addOcspResponse ();
@@ -93,9 +93,12 @@ public function createSignature(\SetaPDF_Core_Reader_FilePath $tmpPath): string
9393
9494 /**
9595 * Adds the OCSP response as a signed attribute in the CMS container.
96+ *
97+ * @throws \SetaPDF_Signer_Exception
9698 */
9799 protected function addOcspResponse (): void
98100 {
101+ /** @var \SetaPDF_Signer_Asn1_Element $cms */
99102 $ cms = $ this ->module ->getCms ();
100103 $ signerInfos = \SetaPDF_Signer_Asn1_Element::findByPath ('1/0/4 ' , $ cms );
101104 if (($ signerInfos ->getIdent () & "\xA1" ) === "\xA1" ) {
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ class TimestampModule implements
2424 */
2525 protected $ identity ;
2626
27+ /**
28+ * @param Client $client
29+ */
2730 public function __construct (Client $ client )
2831 {
2932 $ this ->client = $ client ;
@@ -50,7 +53,7 @@ public function createTimestamp($data)
5053 * @param string|\SetaPDF_Core_Reader_FilePath $data The hash of the main signature
5154 * @return string
5255 */
53- protected function getHash ($ data )
56+ protected function getHash ($ data ): string
5457 {
5558 if ($ data instanceof \SetaPDF_Core_Reader_FilePath) {
5659 return \hash_file ('sha256 ' , $ data ->getPath ());
You can’t perform that action at this time.
0 commit comments