Skip to content

Commit

Permalink
String to String_
Browse files Browse the repository at this point in the history
  • Loading branch information
nmiles committed Apr 14, 2023
1 parent e832980 commit d241209
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 54 deletions.
47 changes: 0 additions & 47 deletions .idea/LaminasPdf.iml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Zend Framework (http://framework.zend.com/)
*
Expand All @@ -19,16 +20,14 @@
* @package LaminasPdf
* @subpackage LaminasPdf\BinaryParser
*/
class String extends AbstractDataSource
class String_ extends AbstractDataSource
{
/**** Instance Variables ****/


/**
* The string to parse.
* @var string
*/
protected $_string = '';
protected string $_string = '';


/**** Public Interface ****/
Expand All @@ -41,9 +40,9 @@ class String extends AbstractDataSource
*
* Verifies that the string is not empty.
*
* @param string $string String to parse.
* @param null|string $string String to parse.
*/
public function __construct($string)
public function __construct(?string $string)
{
if (empty($string)) {
throw new Exception\InvalidArgumentException('String is empty');
Expand Down Expand Up @@ -103,7 +102,7 @@ public function readAllBytes()
*
* @return string
*/
public function __toString()
public function __toString(): string
{
return "String ($this->_size bytes)";
}
Expand Down

0 comments on commit d241209

Please sign in to comment.