Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
oesantaa committed Dec 11, 2023
0 parents commit d5e5784
Show file tree
Hide file tree
Showing 17 changed files with 1,179 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor/
.phpunit.cache/
composer.lock
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<p align="center">
<img src="https://avatars.githubusercontent.com/u/152215067?s=200&v=4" height="80">
</p>

# LabsMobile-Laravel

![](https://img.shields.io/badge/version-3.1.1-blue.svg)

XXXXXXX

## Documentation

- Labsmobile API documentation can be found [here][apidocs].


## Features
- Send SMS messages.

## Requirements

xxxx

## Installation

xxxx

## Help

If you have questions, you can contact us through the support chat or through the support email support@labsmobile.com.

[apidocs]: https://apidocs.labsmobile.com/
[signUp]: https://www.labsmobile.com/en/signup
29 changes: 29 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "labsmobile/sms-php",
"description": "Sms PHP",
"type": "library",
"license": "MIT",
"autoload": {
"psr-4": {
"Labsmobile\\SmsPhp\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Labsmobile\\SmsPhp\\Tests\\": "tests/"
}
},
"authors": [
{
"name": "LabsMobile"
}
],
"require-dev": {
"phpunit/phpunit": "^8.5"
},
"require": {
"php": "^7.0.0",
"guzzlehttp/guzzle": "^7.8",
"ext-json": "*"
}
}
25 changes: 25 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile=".phpunit.cache/test-results"
executionOrder="depends,defects"
forceCoversAnnotation="false"
beStrictAboutCoversAnnotation="false"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertDeprecationsToExceptions="true"
verbose="true"
colors="true">
<testsuites>
<testsuite name="default">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
33 changes: 33 additions & 0 deletions src/Exception/LabsMobileException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Labsmobile\SmsPhp\Exception;



class LabsMobileException extends \Exception
{
protected $message;
protected $status;

public function __construct($message, $status)
{
$this->message = $message;
$this->status = $status;
parent::__construct();
}

/**
* Get the value of status
*/
public function getStatus()
{
return $this->status;
}

public function __toString()
{
return 'LabsMobileException: message='. $this->message.', status='.$this->status;
}


}
20 changes: 20 additions & 0 deletions src/Exception/ParametersException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Labsmobile\SmsPhp\Exception;

class ParametersException extends LabsMobileException
{
protected $message;

public function __construct($message)
{
$this->message = $message;
parent::__construct($message, null);
}

public function __toString()
{
return 'ParametersException: message='. $this->message;
}

}
32 changes: 32 additions & 0 deletions src/Exception/RestException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Labsmobile\SmsPhp\Exception;

class RestException extends LabsMobileException
{
protected $message;
protected $status;

public function __construct($message, $status)
{
$this->message = $message;
$this->status = $status;
parent::__construct($message, $status);
}

/**
* Get the value of status
*/
public function getStatus()
{
return $this->status;
}

public function __toString()
{
return 'RestException: message='. $this->message.', status='.$this->status;
}



}
Loading

0 comments on commit d5e5784

Please sign in to comment.