Skip to content

Commit

Permalink
Merge pull request #6 from devtical/silver-surfer
Browse files Browse the repository at this point in the history
Fix #5
  • Loading branch information
Kristories authored Sep 23, 2022
2 parents 929e68c + 9d3b873 commit 461352a
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 280 deletions.
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/php-cs-fixer.yml

This file was deleted.

28 changes: 18 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig

# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt

### Laravel ###
/vendor/
vendor/
node_modules/
npm-debug.log
yarn-error.log
Expand All @@ -11,17 +26,11 @@ app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot

# Laravel 5 & Lumen specific with changed public path
public_html/storage
public_html/hot

storage/*.key
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache

### Linux ###
*~
Expand All @@ -47,7 +56,6 @@ Homestead.json
# Icon must end with two \r
Icon


# Thumbnails
._*

Expand All @@ -70,7 +78,6 @@ Temporary Items
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

Expand All @@ -93,5 +100,6 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

### Other ###
# IDE
.idea
.php-cs-fixer.cache
175 changes: 27 additions & 148 deletions .php_cs.dist.php
Original file line number Diff line number Diff line change
@@ -1,161 +1,40 @@
<?php

$finder = PhpCsFixer\Finder::create()
$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/routes',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

$rules = [
'@PSR12' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'semicolon_after_instruction' => true,
'single_trait_insert_per_statement' => true,
'ordered_traits' => true,
'ordered_interfaces' => true,
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null],
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'braces' => true,
'cast_spaces' => true,
'class_attributes_separation' => [
'elements' => [
'const' => 'one',
'method' => 'one',
'property' => 'one',
'trait_import' => 'none',
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
'single_item_single_line' => true,
'single_line' => true,
],
'concat_space' => [
'spacing' => 'none',
],
'constant_case' => ['case' => 'lower'],
'declare_equal_normalize' => true,
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'fully_qualified_strict_types' => true,
'function_declaration' => true,
'function_typehint_space' => true,
'general_phpdoc_tag_rename' => true,
'heredoc_to_nowdoc' => true,
'include' => true,
'increment_style' => ['style' => 'post'],
'indentation_type' => true,
'linebreak_after_opening_tag' => true,
'line_ending' => true,
'lowercase_cast' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'magic_method_casing' => true,
'magic_constant_casing' => true,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'native_function_casing' => true,
'no_alias_functions' => true,
'no_extra_blank_lines' => [
'tokens' => [
'extra',
'throw',
'use',
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
],
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_closing_tag' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => [
'use' => 'echo',
],
'no_multiline_whitespace_around_double_arrow' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => [
'positions' => ['inside', 'outside'],
],
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unneeded_control_parentheses' => [
'statements' => ['break', 'clone', 'continue', 'echo_print', 'return', 'switch_case', 'yield'],
],
'no_unreachable_default_argument_value' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'not_operator_with_successor_space' => false,
'object_operator_without_whitespace' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'psr_autoloading' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_scalar' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'phpdoc_tag_type' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'self_accessor' => true,
'short_scalar_cast' => true,
'simplified_null_return' => false,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => [
'elements' => ['const', 'property'],
],
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_line_comment_style' => [
'comment_types' => ['hash'],
],
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => [
'elements' => ['method', 'property'],
],
'whitespace_after_comma_in_array' => true,
];

return (new PhpCsFixer\Config())
->setRules($rules)
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
])
->setFinder($finder);
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Nova QR Code Manager

A Laravel Nova tool to manage QR code. Behind the scenes [kristories/nova-qrcode-field](https://github.com/Kristories/nova-qrcode-field) is used.
A Laravel Nova tool to manage QR code. Behind the scenes, [devtical/nova-qrcode-field](https://github.com/devtical/nova-qrcode-field) is used.

![Screenshot](https://i.imgur.com/1mpkE24.png)
![Screenshot](https://i.imgur.com/zlRtm1I.png)
![Logo & background](art/cover.png)

## Installation

You can install the Nova tool in to a [Laravel](http://laravel.com) app that uses [Nova](http://nova.laravel.com) via composer :

```cli
composer require kristories/nova-qrcode-manager
composer require devtical/nova-qrcode-manager
```

Publish the migration with :

```cli
php artisan vendor:publish --tag=qrcode-manager-migrations
php artisan migrate
```

## Usage

Add `QrcodeManager` to your `NovaServiceProvider.php`

```php
use Kristories\QrcodeManager\QrcodeManager;
use Devtical\QrcodeManager\QrcodeManager;

// ...

Expand Down
Binary file added art/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 12 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
{
"name": "kristories/nova-qrcode-manager",
"name": "devtical/nova-qrcode-manager",
"description": "A Laravel Nova tool to manage QR code.",
"keywords": [
"laravel",
"nova",
"qr",
"qrcode",
"qrcodes",
"qr-code",
"qr-codes",
"barcode"
"qrcode"
],
"license": "MIT",
"require": {
"php": "^8.0|^7.3",
"illuminate/support": "^7.0|^8.0",
"laravel/nova": "^3.0",
"kristories/nova-qrcode-field": "^0.0.3"
"php": "^7.4|^8.0",
"devtical/nova-qrcode-field": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.4",
"orchestra/testbench": "^6.24|^7.0",
"friendsofphp/php-cs-fixer": "^3.0"
},
"autoload": {
"psr-4": {
"Kristories\\QrcodeManager\\": "src/"
"Devtical\\QrcodeManager\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Kristories\\QrcodeManager\\ToolServiceProvider"
"Devtical\\QrcodeManager\\ToolServiceProvider"
]
}
},
Expand All @@ -37,14 +36,5 @@
"format": "vendor/bin/php-cs-fixer fix --config=.php_cs.dist.php --allow-risky=yes"
},
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.5"
},
"repositories": [
{
"type": "composer",
"url": "https://nova.laravel.com"
}
]
"prefer-stable": true
}
1 change: 0 additions & 1 deletion resources/sass/tool.scss

This file was deleted.

2 changes: 1 addition & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
|
*/

// Route::get('/endpoint', function (Request $request) {
// Route::get('/', function (Request $request) {
// //
// });
Loading

0 comments on commit 461352a

Please sign in to comment.