Skip to content

Commit

Permalink
merges upstream containing PRs #100, #101 and #102
Browse files Browse the repository at this point in the history
  • Loading branch information
ffflabs committed Apr 26, 2021
1 parent 43eab82 commit be92448
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 71 deletions.
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
* text=auto

/Examples export-ignore
/tests export-ignore
/.codeclimate.yml export-ignore
/.env.example export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/.php_cs.cache export-ignore
/.prettierrc export-ignore
/.scrutinizer.yml export-ignore
/Makefile export-ignore
/README.3.5.md export-ignore
/README.md export-ignore
/TODO export-ignore
/codeception.yml export-ignore
/composer.lock export-ignore
/jpgraph_logo.jpg export-ignore
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install PHP 7 dependencies
- name: Install PHP dependencies
run: composer update --'prefer-stable' --no-interaction --no-progress


- name: PHPLint
run: composer lint

- name: Unit Tests
run: composer test
7 changes: 3 additions & 4 deletions .php_cs.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

/**
* CTOhm - SII Async Clients
*/


use Ergebnis\PhpCsFixer\Config;

Expand All @@ -17,7 +15,8 @@
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php73($header), [
'declare_strict_types' => false,
'void_return' => false,
'static_lambda' => false, 'escape_implicit_backslashes' => false,
'static_lambda' => false,
'escape_implicit_backslashes' => false,
'final_class' => false,
'final_internal_class' => false,
'final_public_method_for_abstract_class' => false,
Expand Down
133 changes: 71 additions & 62 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,74 @@
{
"name": "amenadiel/jpgraph",
"type": "library",
"description": "jpGraph, library to make graphs and charts",
"version": "4.1.0-beta.01",
"keywords": [
"graph",
"chart",
"pie",
"jpgraph",
"data"
],
"homepage": "http://jpgraph.net/",
"license": "QPL-1.0",
"support": {
"issues": "https://github.com/huasofoundries/jpgraph/issues"
},
"require": {
"php": ">=7.3.0",
"ext-gd": "*"

},
"require-dev": {
"kint-php/kint": "^3.3",
"symfony/event-dispatcher": "^4.0 || ^5.0",
"symfony/yaml": "^4.0 || ^5.0",
"squizlabs/php_codesniffer": "^3.5",
"symfony/dotenv": "^4.0 || ^5.0",
"phpstan/phpstan": "^0.12.84",
"ergebnis/composer-normalize": "^2.13",
"ergebnis/php-cs-fixer-config": "^2.13",
"overtrue/phplint": "^2.3",
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.7",

"codeception/codeception": "^4.1",
"codeception/module-asserts": "^1.3"

},
"autoload": {
"psr-4": {

"Amenadiel\\JpGraph\\": "src/",
"Amenadiel\\JpGraph\\Graph\\": "src/graph",
"Amenadiel\\JpGraph\\Graph\\Scale\\": "src/graph/scale",
"Amenadiel\\JpGraph\\Graph\\Tick\\": "src/graph/tick",
"Amenadiel\\JpGraph\\Graph\\Axis\\": "src/graph/axis",
"Amenadiel\\JpGraph\\Image\\": "src/image",
"Amenadiel\\JpGraph\\Plot\\": "src/plot",
"Amenadiel\\JpGraph\\Text\\": "src/text",
"Amenadiel\\JpGraph\\Themes\\": "src/themes",
"Amenadiel\\JpGraph\\Util\\": "src/util"
"name": "amenadiel/jpgraph",
"type": "library",
"description": "jpGraph, library to make graphs and charts",
"keywords": [
"graph",
"chart",
"pie",
"jpgraph",
"data"
],
"homepage": "http://jpgraph.net/",
"version": "4.1.0-beta.01",
"license": "QPL-1.0",
"require": {
"php": ">=7.3.0",
"ext-gd": "*"
},
"require-dev": {
"codeception/codeception": "^4.1",
"codeception/module-asserts": "^1.3",
"ergebnis/composer-normalize": "^2.13",
"ergebnis/php-cs-fixer-config": "^2.13",
"kint-php/kint": "^3.3",
"overtrue/phplint": "^2.3",
"phpstan/phpstan": "^0.12.84",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6",
"symfony/dotenv": "^4.0 || ^5.0",
"symfony/event-dispatcher": "^4.0 || ^5.0",
"symfony/yaml": "^4.0 || ^5.0",
"vimeo/psalm": "^4.7"
},
"extra": {
"composer-normalize": {
"indent-size": 4,
"indent-style": "space"
},
"version": "4.1.0-beta.01"
},
"autoload": {
"psr-4": {
"Amenadiel\\JpGraph\\": "src/",
"Amenadiel\\JpGraph\\Graph\\": "src/graph",
"Amenadiel\\JpGraph\\Graph\\Scale\\": "src/graph/scale",
"Amenadiel\\JpGraph\\Graph\\Tick\\": "src/graph/tick",
"Amenadiel\\JpGraph\\Graph\\Axis\\": "src/graph/axis",
"Amenadiel\\JpGraph\\Image\\": "src/image",
"Amenadiel\\JpGraph\\Plot\\": "src/plot",
"Amenadiel\\JpGraph\\Text\\": "src/text",
"Amenadiel\\JpGraph\\Themes\\": "src/themes",
"Amenadiel\\JpGraph\\Util\\": "src/util"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests"
},
"files": [
"tests/polyfills.php"
]
},
"scripts": {
"act": "act -P ubuntu-latest=shivammathur/node:latest",
"fix": "vendor/bin/phpcbf --standard=.phpcs.xml src/* tests/* && vendor/bin/php-cs-fixer fix --config=.php_cs.php",
"lint":"vendor/bin/phplint",

"start": "php -S localhost:8000 -t Examples",
"test": "php vendor/bin/codecept run unit "
},
"support": {
"issues": "https://github.com/huasofoundries/jpgraph/issues"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\":"tests"
},"files":["tests/polyfills.php"]
},
"scripts": {
"act": "act -P ubuntu-latest=shivammathur/node:latest",
"start": "php -S localhost:8000 -t Examples",
"test": "php vendor/bin/codecept run unit "
}
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

use Amenadiel\JpGraph\Util;


Util\Helper::bootstrapLibrary();

// global variables I won't use anymore but maybe you do.
Expand Down
2 changes: 1 addition & 1 deletion src/image/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function CreateRawCanvas($aWidth = 0, $aHeight = 0)
}

$this->img = @imagecreatetruecolor((int) $aWidth, (int) $aHeight);
if ($this->img < 1) {
if ($this->img === false) {
Util\JpGraphError::RaiseL(25126);
//die("Can't create truecolor image. Check that you really have GD2 library installed.");
}
Expand Down

0 comments on commit be92448

Please sign in to comment.