Skip to content

Commit d7583a1

Browse files
author
Vítězslav Dvořák
committed
Huge Code update
Mostly PSR12 Comply & PHPStan used
1 parent 4c0db95 commit d7583a1

File tree

419 files changed

+10255
-10211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

419 files changed

+10255
-10211
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DB_TYPE=sqlsrv
1+
DB_CONNECTION=sqlsrv
22
DB_HOST=127.0.0.1
33
DB_PORT=1433
44
DB_DATABASE=StwPh_12345678_2019

.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.background": "#053D57",
4+
"activityBar.foreground": "#F2F1EF",
5+
"activityBar.inactiveForeground": "#f0f0f0",
6+
"activityBar.activeBorder": "#fac2a8",
7+
"activityBar.activeBackground": "#006884",
8+
"activityBar.border": "#006884",
9+
"titleBar.activeBackground": "#053D57",
10+
"titleBar.activeForeground": "#F2F1EF",
11+
"titleBar.inactiveBackground": "#11394c",
12+
"titleBar.inactiveForeground": "#f0f0f0",
13+
"titleBar.border": "#006884",
14+
"statusBar.background": "#053D57",
15+
"statusBar.foreground": "#F2F1EF",
16+
"statusBar.border": "#006884"
17+
}
18+
}

Examples/addressbook.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
namespace Example;
44

5-
use Dotenv\Dotenv;
6-
75
define('EASE_LOGGER', 'syslog|console');
86

97
require_once dirname(__DIR__).'/vendor/autoload.php';
108

11-
$dotenv = Dotenv::createImmutable(dirname(__DIR__));
12-
$dotenv->load();
9+
\Ease\Shared::init(['DB_CONNECTION','DB_HOST','DB_PORT','DB_DATABASE','DB_USERNAME','DB_PASSWORD'],dirname(__DIR__).'.env');
1310

1411
$address = new \SpojeNet\PohodaSQL\Adresar();
1512

Examples/listInvoices.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
require_once dirname(__DIR__).'/vendor/autoload.php';
1010

11-
$dotenv = Dotenv::createImmutable(dirname(__DIR__));
12-
$dotenv->load();
11+
\Ease\Shared::init(['DB_CONNECTION','DB_HOST','DB_PORT','DB_DATABASE','DB_USERNAME','DB_PASSWORD'],dirname(__DIR__).'.env');
1312

1413
$invoicer = new \SpojeNet\PohodaSQL\Faktura();
1514

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@ PHP Librabry for direct access to Pohoda SQL database tables
55

66
Use at your own risk!
77

8+
Requirements
9+
------------
10+
11+
* PHP 7.2+
12+
* php-sqlsrv
13+
* php-ease-fluentpdo
14+
815
Configuration
916
-------------
1017

1118
Please set up this constants or environment variables:
1219

13-
* DB_TYPE We use sqlsrv
14-
* DB_HOST IP or Hostname machine with SQL Server
15-
* DB_PORT default is 1433
16-
* DB_DATABASE something like StwPh_01234567_2019
17-
* DB_USERNAME sqlserver login
18-
* DB_PASSWORD sqlserver pass
20+
* DB_TYPE We use sqlsrv
21+
* DB_HOST IP or Hostname machine with SQL Server
22+
* DB_PORT default is 1433
23+
* DB_DATABASE something like StwPh_01234567_2019
24+
* DB_USERNAME sqlserver login
25+
* DB_PASSWORD sqlserver pass
1926

2027
You can also int object like this:
2128

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
],
1111
"minimum-stability": "dev",
1212
"require": {
13-
"vitexsoftware/ease-fluentpdo": "dev-master"
13+
"vitexsoftware/ease-fluentpdo": "dev-main"
1414
},
1515
"require-dev": {
16-
"vlucas/phpdotenv": "dev-master",
17-
"phpunit/phpunit": "dev-master"
16+
"phpunit/phpunit": "^9.5"
1817
},
1918
"autoload": {
2019
"psr-4": {

0 commit comments

Comments
 (0)