Skip to content

Commit

Permalink
Make it php 7.1+ compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
jperdochqu committed Jan 9, 2024
1 parent ed6bb4e commit 0829558
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -6,7 +6,7 @@ Simple PHP library to decode TNEF files (winmail.dat).
It is based on [SquirellMail plugin](https://squirrelmail.org/plugin_view.php?id=62)

#Requirements:
- PHP >= 7.0
- PHP >= 7.1
- PHP-mbstring extension

#Usage
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -6,7 +6,7 @@
"type": "library",
"homepage": "https://github.com/QualityUnit/TNEFDecoder",
"require": {
"php": ">=7.0",
"php": ">=7.1",
"ext-mbstring": "*"
},
"require-dev": {
Expand Down
10 changes: 6 additions & 4 deletions src/TNEFDecoder/TNEFBuffer.php
@@ -1,4 +1,6 @@
<?php namespace TNEFDecoder;
<?php

namespace TNEFDecoder;

/**
* SquirrelMail TNEF Decoder Plugin
Expand All @@ -16,16 +18,16 @@

class TNEFBuffer
{
private string $data;
private int $offset;
private $data;
private $offset;

function __construct(string $data)
{
$this->data = $data;
$this->offset = 0;
}

function getBytes(int $numBytes): ?string
function getBytes(int $numBytes)
{
if ($this->getRemainingBytes() < $numBytes) {
$this->offset = strlen($this->data);
Expand Down

0 comments on commit 0829558

Please sign in to comment.