Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ydombrovsky committed Feb 2, 2021
0 parents commit 13aa4b3
Show file tree
Hide file tree
Showing 19 changed files with 4,117 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
vendor
report
test.php
composer.phar
phpunit.xml
.idea/*
.php_cs.cache
8 changes: 8 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
])
;
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* 1.0.0
init commit
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
COMPOSER= composer
PHPCSFIXER= php -d memory_limit=1024m vendor/bin/php-cs-fixer

help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'

vendor:
$(COMPOSER) instal -n

phpcs: vendor ## Lint PHP код
$(PHPCSFIXER) fix --diff --dry-run --no-interaction -v ./src

phpcsfix: vendor ## Lint и исправление PHP кода
$(PHPCSFIXER) fix ./src
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Sample usage
```php
include 'vendor/autoload.php';


use \Porox\Dropmefiles\Client\CreateFileConfig;
use \Porox\Dropmefiles\Client\PeriodTypes;

$httpClient = new \GuzzleHttp\Client(['']);
$client = \Porox\Dropmefiles\Client\DropmefilesClientFactory::create($httpClient);


$config = new CreateFileConfig();
$config->addFile(new SplFileInfo(__DIR__.'/README.md'));
$config->setNeedPassword(true);
$config->setPeriod(PeriodTypes::DAYS_3);

$resp =$client->sendFiles($config);

var_dump($resp);

```
31 changes: 31 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "porox/dropmefiles-client",
"description": "PHP client dropmefiles.com",
"authors": [
{
"name": "Yury Dombrovsky",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {"Porox\\Dropmefiles\\Client\\": "src/"}
},
"autoload-dev": {
"psr-4": {"Porox\\Dropmefiles\\Tests\\": "tests/"}
},
"require": {
"php": ">=7.0",
"guzzlehttp/guzzle": "~6.3",
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.13",
"phpunit/phpunit": "^5.7"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
}
}
Loading

0 comments on commit 13aa4b3

Please sign in to comment.