-
Notifications
You must be signed in to change notification settings - Fork 47
Feature/improve implementation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nyamsprod
wants to merge
17
commits into
multiavatar:master
Choose a base branch
from
bakame-php:feature/improve-implementation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0ebedbf
Adding static analysis
nyamsprod 44d934c
Update package settings
nyamsprod bebb383
Upgrade the implementation
nyamsprod 453f19d
Improve implementation
nyamsprod b021fc4
Adding PHPUnit as a development dependency
nyamsprod 3f29973
Adding demo page for testing visual rendering
nyamsprod 48bd8c6
Updating package settings
nyamsprod 239e66c
Introducing the Multiavatar namespace and the options parameter
nyamsprod 5959431
Adding PHP7.2 support
nyamsprod 0c71ae7
bugfix filter name
nyamsprod 0e54964
BugFix themes colors
nyamsprod 81aab9a
Update documentation
nyamsprod f2cee28
bugfix docblock
nyamsprod 0c0b636
Update documentation
nyamsprod 6848752
Adding missing tests
nyamsprod 84c2b90
Improve internal svg generation method
nyamsprod 8ca1c62
Refactor the implementation to easily add/expand functionnality
nyamsprod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.neon] | ||
indent_size = 2 | ||
|
||
[*.xml.dist] | ||
indent_size = 2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* text=auto | ||
|
||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/phpstan.neon export-ignore | ||
/README.md export-ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vendor | ||
.idea | ||
composer.lock |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,26 @@ | ||
<?php | ||
|
||
require_once("Multiavatar.php"); | ||
require_once "Multiavatar.php"; | ||
|
||
$multiAvatar = new Multiavatar(); | ||
|
||
$avatarId = "Starcrasher"; | ||
$multiavatar = new Multiavatar($avatarId, null, null); | ||
echo($multiavatar->svgCode); | ||
|
||
echo $multiAvatar($avatarId); | ||
|
||
// Without the environment part | ||
$avatarId = "Pandalion"; | ||
$multiavatar = new Multiavatar($avatarId, true, null); | ||
echo($multiavatar->svgCode); | ||
|
||
// $avatarId = "Pandalion"; | ||
// echo $multiAvatar($avatarId, true); | ||
|
||
// Generate a specific version | ||
$avatarId = "Pandalion"; | ||
$multiavatar = new Multiavatar($avatarId, null, array("part" => 11, "theme" => "C")); | ||
echo($multiavatar->svgCode); | ||
|
||
// $avatarId = "Pandalion"; | ||
// echo $multiAvatar($avatarId, false, ["part" => 11, "theme" => "C"]); | ||
|
||
// Test with integer | ||
$avatarId = 123456789; | ||
$multiavatar = new Multiavatar($avatarId, null, null); | ||
echo($multiavatar->svgCode); | ||
|
||
// $avatarId = 123456789; | ||
// echo $multiAvatar($avatarId); | ||
|
||
// $avatarId = "a86f755add37fe0b649c"; | ||
// $multiavatar = new Multiavatar($avatarId, null, null); | ||
// echo($multiavatar->svgCode); | ||
|
||
// echo $multiAvatar($avatarId); | ||
|
||
// $avatarId = "f7542474d54d2d2d97e4"; | ||
// $multiavatar = new Multiavatar($avatarId, null, null); | ||
// echo($multiavatar->svgCode); | ||
// echo $multiAvatar($avatarId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-strict-rules/rules.neon | ||
parameters: | ||
ignoreErrors: | ||
reportUnmatchedIgnoredErrors: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you base this off of what the current file was or did you just make it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. This is based on how to easily autoformat the package files on IDE. It is used as a baseline so that PHPStorm or Vscode or any IDE can easily format the file on saving or on editing. Most PHP libraries comes with those to have a unify coding practice/style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know what
.editorconfig
is, I was just asking how you came up with the values for the configuration.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value are the on I use ... the default is set for PHP according to PHP standard coding style from PSR-1
The other also stem form standard practices in PHP world
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense.