Skip to content

Commit af5a0a8

Browse files
committed
Initial commit
1 parent 02b11f4 commit af5a0a8

16 files changed

+762
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.gitignore

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/macos,linux,symfony,windows,composer,visualstudiocode
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,linux,symfony,windows,composer,visualstudiocode
3+
4+
### Composer ###
5+
composer.phar
6+
/vendor/
7+
8+
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
9+
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
10+
composer.lock
11+
12+
### Linux ###
13+
*~
14+
15+
# temporary files which can be created if a process still has a handle open of a deleted file
16+
.fuse_hidden*
17+
18+
# KDE directory preferences
19+
.directory
20+
21+
# Linux trash folder which might appear on any partition or disk
22+
.Trash-*
23+
24+
# .nfs files are created when an open file is removed but is still being accessed
25+
.nfs*
26+
27+
### macOS ###
28+
# General
29+
.DS_Store
30+
.AppleDouble
31+
.LSOverride
32+
33+
# Icon must end with two \r
34+
Icon
35+
36+
# Thumbnails
37+
._*
38+
39+
# Files that might appear in the root of a volume
40+
.DocumentRevisions-V100
41+
.fseventsd
42+
.Spotlight-V100
43+
.TemporaryItems
44+
.Trashes
45+
.VolumeIcon.icns
46+
.com.apple.timemachine.donotpresent
47+
48+
# Directories potentially created on remote AFP share
49+
.AppleDB
50+
.AppleDesktop
51+
Network Trash Folder
52+
Temporary Items
53+
.apdisk
54+
55+
### Symfony ###
56+
/var/
57+
58+
# PHPUnit
59+
/phpunit.xml
60+
.phpunit.result.cache
61+
62+
# Build data
63+
/build/
64+
65+
# Composer PHAR
66+
/composer.phar
67+
68+
### VisualStudioCode ###
69+
.vscode/*
70+
!.vscode/tasks.json
71+
!.vscode/launch.json
72+
*.code-workspace
73+
74+
### VisualStudioCode Patch ###
75+
# Ignore all local history of files
76+
.history
77+
.ionide
78+
79+
### Windows ###
80+
# Windows thumbnail cache files
81+
Thumbs.db
82+
Thumbs.db:encryptable
83+
ehthumbs.db
84+
ehthumbs_vista.db
85+
86+
# Dump file
87+
*.stackdump
88+
89+
# Folder config file
90+
[Dd]esktop.ini
91+
92+
# Recycle Bin used on file shares
93+
$RECYCLE.BIN/
94+
95+
# Windows Installer files
96+
*.cab
97+
*.msi
98+
*.msix
99+
*.msm
100+
*.msp
101+
102+
# Windows shortcuts
103+
*.lnk
104+
105+
# dist files/folder
106+
*.dist
107+
# Not ignore
108+
!phpunit.xml.dist
109+
110+
# End of https://www.toptal.com/developers/gitignore/api/macos,linux,symfony,windows,composer,visualstudiocode

.php_cs-fixer.php

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?php
2+
/*
3+
* This document has been generated with
4+
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.0.0|configurator
5+
* you can change this configuration by importing this file.
6+
*/
7+
$config = new PhpCsFixer\Config();
8+
9+
return $config
10+
->setRiskyAllowed(true)
11+
->setRules([
12+
'@DoctrineAnnotation' => true,
13+
'@PHP70Migration' => true,
14+
'@PHP71Migration' => true,
15+
'@PSR2' => true,
16+
'@Symfony' => true,
17+
'@PHP73Migration' => true,
18+
// Each line of multi-line DocComments must have an asterisk [PSR-5] and must be aligned with the first one.
19+
'align_multiline_comment' => true,
20+
// Each element of an array must be indented exactly once.
21+
'array_indentation' => true,
22+
// PHP arrays should be declared using the configured syntax.
23+
'array_syntax' => ['syntax' => 'short'],
24+
// Binary operators should be surrounded by space as configured.
25+
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
26+
// An empty line feed must precede any configured statement.
27+
'blank_line_before_statement' => true,
28+
// The body of each structure MUST be enclosed by braces. Braces should be properly placed. Body of braces should be properly indented.
29+
'braces' => ['position_after_anonymous_constructs' => 'next', 'position_after_control_structures' => 'next', 'position_after_functions_and_oop_constructs' => 'next'],
30+
// Using `isset($var) &&` multiple times should be done in one call.
31+
'combine_consecutive_issets' => true,
32+
// Calling `unset` on multiple items should be done in one call.
33+
'combine_consecutive_unsets' => true,
34+
// Replace multiple nested calls of `dirname` by only one call with second `$level` parameter. Requires PHP >= 7.0.
35+
'combine_nested_dirname' => true,
36+
// Remove extra spaces in a nullable typehint.
37+
'compact_nullable_typehint' => true,
38+
// Equal sign in declare statement should be surrounded by spaces or not following configuration.
39+
'declare_equal_normalize' => ['space' => 'single'],
40+
// Replaces `dirname(__FILE__)` expression with equivalent `__DIR__` constant.
41+
'dir_constant' => true,
42+
// Replace deprecated `ereg` regular expression functions with `preg`.
43+
'ereg_to_preg' => true,
44+
// Add curly braces to indirect variables to make them clear to understand. Requires PHP >= 7.0.
45+
'explicit_indirect_variable' => true,
46+
// Converts implicit variables into explicit ones in double-quoted strings or heredoc syntax.
47+
'explicit_string_variable' => true,
48+
// Replace core functions calls returning constants with the constants.
49+
'function_to_constant' => true,
50+
// Convert `heredoc` to `nowdoc` where possible.
51+
'heredoc_to_nowdoc' => true,
52+
// Ensure there is no code on the same line as the PHP open tag.
53+
'linebreak_after_opening_tag' => true,
54+
// Method chaining MUST be properly indented. Method chaining with different levels of indentation is not supported.
55+
'method_chaining_indentation' => true,
56+
// Replaces `intval`, `floatval`, `doubleval`, `strval` and `boolval` function calls with according type casting operator.
57+
'modernize_types_casting' => true,
58+
// DocBlocks must start with two asterisks, multiline comments must start with a single asterisk, after the opening slash. Both must end with a single asterisk before the closing slash.
59+
'multiline_comment_opening_closing' => true,
60+
// Forbid multi-line whitespace before the closing semicolon or move the semicolon to the new line for chained calls.
61+
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
62+
// Add leading `\` before function invocation to speed up resolving.
63+
'native_function_invocation' => true,
64+
// Master functions shall be used instead of aliases.
65+
'no_alias_functions' => true,
66+
// Replace control structure alternative syntax to use braces.
67+
'no_alternative_syntax' => true,
68+
// Properties MUST not be explicitly initialized with `null` except when they have a type declaration (PHP 7.4).
69+
'no_null_property_initialization' => true,
70+
// Variables must be set `null` instead of using `(unset)` casting.
71+
'no_unset_cast' => true,
72+
// There should not be an empty `return` statement at the end of a function.
73+
'no_useless_return' => true,
74+
// Logical NOT operators (`!`) should have leading and trailing whitespaces.
75+
'not_operator_with_space' => true,
76+
// Adds or removes `?` before type declarations for parameters with a default `null` value.
77+
'nullable_type_declaration_for_default_null_value' => true,
78+
// Orders the elements of classes/interfaces/traits.
79+
'ordered_class_elements' => true,
80+
// Ordering `use` statements.
81+
'ordered_imports' => true,
82+
// All PHPUnit test classes should be marked as internal.
83+
'php_unit_internal_class' => true,
84+
// Enforce camel (or snake) case for PHPUnit test methods, following configuration.
85+
'php_unit_method_casing' => true,
86+
// Adds a default `@coversNothing` annotation to PHPUnit test classes that have no `@covers*` annotation.
87+
'php_unit_test_class_requires_covers' => true,
88+
// PHPDoc should contain `@param` for all params.
89+
'phpdoc_add_missing_param_annotation' => true,
90+
// `@return void` and `@return null` annotations should be omitted from PHPDoc.
91+
'phpdoc_no_empty_return' => true,
92+
// Annotations in PHPDoc should be ordered so that `@param` annotations come first, then `@throws` annotations, then `@return` annotations.
93+
'phpdoc_order' => true,
94+
// `@var` and `@type` annotations must have type and name in the correct order.
95+
'phpdoc_var_annotation_correct_order' => true,
96+
// Local, dynamic and directly referenced variables should not be assigned and directly returned by a function or method.
97+
'return_assignment' => true,
98+
// Converts explicit variables in double-quoted strings and heredoc syntax from simple to complex format (`${` to `{$`).
99+
'simple_to_complex_string_variable' => true,
100+
// Simplify `if` control structures that return the boolean result of their condition.
101+
'simplified_if_return' => true,
102+
// A return statement wishing to return `void` should not return `null`.
103+
'simplified_null_return' => true,
104+
])
105+
->setFinder(
106+
PhpCsFixer\Finder::create()
107+
->exclude('vendor')
108+
->in(__DIR__)
109+
)
110+
;

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
![GitHub release](https://img.shields.io/github/release/lotgd-core/find-ring-bundle.svg)
2+
![GitHub Release Date](https://img.shields.io/github/release-date/lotgd-core/find-ring-bundle.svg)
3+
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/lotgd-core/find-ring-bundle)
4+
[![Build in PHP](https://img.shields.io/badge/PHP-^7.3-8892BF.svg?logo=php)](http://php.net/)
5+
6+
![GitHub issues](https://img.shields.io/github/issues/lotgd-core/find-ring-bundle.svg)
7+
![GitHub pull requests](https://img.shields.io/github/issues-pr/lotgd-core/find-ring-bundle.svg)
8+
![Github commits (since latest release)](https://img.shields.io/github/commits-since/lotgd-core/find-ring-bundle/latest.svg)
9+
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/lotgd-core/find-ring-bundle.svg)
10+
![GitHub last commit](https://img.shields.io/github/last-commit/lotgd-core/find-ring-bundle.svg)
11+
12+
![GitHub top language](https://img.shields.io/github/languages/top/lotgd-core/find-ring-bundle.svg)
13+
![GitHub language count](https://img.shields.io/github/languages/count/lotgd-core/find-ring-bundle.svg)
14+
15+
[![PayPal.Me - The safer, easier way to pay online!](https://img.shields.io/badge/donate-help_my_project-ffaa29.svg?logo=paypal&cacheSeconds=86400)](https://www.paypal.me/idmarinas)
16+
[![Liberapay - Donate](https://img.shields.io/liberapay/receives/IDMarinas.svg?logo=liberapay&cacheSeconds=86400)](https://liberapay.com/IDMarinas/donate)
17+
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E0VZ9V)
18+
[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&cacheSeconds=86400)](https://twitter.com/idmarinas)
19+
20+
21+
## Installation ##
22+
23+
```bash
24+
composer require lotgd-core/find-ring-bundle
25+
```
26+
27+
# Default configuration
28+
```yaml
29+
# No configuration
30+
```

composer.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"name": "lotgd-core/find-ring-bundle",
3+
"version": "0.1.0",
4+
"type": "lotgd-bundle",
5+
"description": "Find Ring event for LoTGD IDMarinas Edition.",
6+
"license": "BSD-3-Clause",
7+
"authors": [
8+
{
9+
"name": "Iván Diaz Marinas (IDMarinas)",
10+
"email": "35842929+idmarinas@users.noreply.github.com",
11+
"homepage": "https://github.com/lotgd-core/find-ring-bundle",
12+
"role": "Developer, Maintainer"
13+
}
14+
],
15+
"support": {
16+
"issues": "https://github.com/lotgd-core/find-ring-bundle/issues"
17+
},
18+
"minimum-stability": "dev",
19+
"prefer-stable": true,
20+
"require": {
21+
"php": "^7.3",
22+
"lotgd-core/occurrence-bundle": "^0.1.0",
23+
"idmarinas/lotgd-contracts": "^0.2.0",
24+
"symfony/config": "^4.4",
25+
"symfony/dependency-injection": "^4.4",
26+
"symfony/event-dispatcher": "^4.4",
27+
"symfony/http-kernel": "^4.4"
28+
},
29+
"require-dev": {
30+
"idmarinas/lotgd": "^6.1",
31+
"matthiasnoback/symfony-config-test": "^4.2",
32+
"matthiasnoback/symfony-dependency-injection-test": "^4.2",
33+
"nyholm/symfony-bundle-test": "^1.7",
34+
"phpunit/phpunit": "^9.5",
35+
"symfony/phpunit-bridge": "^5.3",
36+
"symfony/test-pack": "^1.0"
37+
},
38+
"conflict": {
39+
"idmarinas/lotgd": "<6.1"
40+
},
41+
"autoload": {
42+
"psr-4": {
43+
"Lotgd\\Bundle\\FindRingBundle\\": "src/"
44+
}
45+
},
46+
"autoload-dev": {
47+
"psr-4": {
48+
"Lotgd\\Bundle\\FindRingBundle\\Tests\\": "tests/"
49+
}
50+
},
51+
"scripts": {
52+
"test": "php bin/phpunit --process-isolation"
53+
},
54+
"config": {
55+
"optimize-autoloader": true,
56+
"preferred-install": {
57+
"*": "dist"
58+
},
59+
"process-timeout": 5000,
60+
"sort-packages": true
61+
},
62+
"funding": [
63+
{
64+
"type": "paypal",
65+
"url": "https://www.paypal.me/idmarinas"
66+
}
67+
]
68+
}

phpunit.xml.dist

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="tests/bootstrap.php"
9+
convertDeprecationsToExceptions="false"
10+
>
11+
<coverage processUncoveredFiles="true">
12+
<include>
13+
<directory suffix=".php">src</directory>
14+
</include>
15+
16+
<report>
17+
<clover outputFile="./build/reports/phpunit.coverage.xml"/>
18+
<!-- <html outputDirectory="./build/coverage" lowUpperBound="35" highLowerBound="70" /> -->
19+
<!-- <text outputFile="php://stdout" showUncoveredFiles="false"/> -->
20+
</report>
21+
</coverage>
22+
23+
<php>
24+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
25+
<env name="BOOTSTRAP_CLEAR_CACHE_ENV" value="test" />
26+
<env name="XDEBUG_MODE" value="coverage"/>
27+
<ini name="error_reporting" value="-1" />
28+
<ini name="xdebug.mode" value="coverage"/>
29+
<server name="APP_ENV" value="test" force="true" />
30+
<server name="SHELL_VERBOSITY" value="-1" />
31+
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
32+
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
33+
</php>
34+
35+
<testsuites>
36+
<testsuite name="Lotgd Core Occurrence Bundle Test Suite">
37+
<directory>tests</directory>
38+
</testsuite>
39+
</testsuites>
40+
41+
<logging>
42+
<junit outputFile="./build/reports/phpunit.xml"/>
43+
</logging>
44+
45+
<listeners>
46+
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
47+
</listeners>
48+
49+
<!-- Run `composer require symfony/panther` before enabling this extension -->
50+
<!--
51+
<extensions>
52+
<extension class="Symfony\Component\Panther\ServerExtension" />
53+
</extensions>
54+
-->
55+
</phpunit>

0 commit comments

Comments
 (0)