Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- name: Install dependencies
run: |
cd galette-core/galette
cd galette-core
composer install --ignore-platform-reqs

- name: CS
Expand Down
55 changes: 52 additions & 3 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,60 @@
->setRules([
'@PSR12' => true,
'@PER-CS' => true,
'@PHP82Migration' => true,
'@PHP8x2Migration' => true,
'trailing_comma_in_multiline' => false,
'cast_spaces' => false,
'cast_spaces' => ['space' => 'none'],
'single_line_empty_body' => false,
'no_unused_imports' => true
'no_unused_imports' => true,
// rules for phpdoc
// Removes @param, @return and @var tags that don't provide any useful information - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:no_superfluous_phpdoc_tags
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'remove_inheritdoc' => true,
],
// require phpdoc for non typed arguments - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_add_missing_param_annotation
'phpdoc_add_missing_param_annotation' => true,
// no @access - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_no_access
'phpdoc_no_access' => true,
// no @package - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_no_package
'phpdoc_no_package' => true,
// order phpdoc tags - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_order
'phpdoc_order' => ['order' => ['since', 'var', 'see', 'param', 'return', 'throw', 'todo', 'deprecated']],
// phpdoc param in same order as signature - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_param_order
'phpdoc_param_order' => true,
// align tags - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_align
'phpdoc_align' => [
'align' => 'vertical',
'tags' => [
'param',
'property',
'property-read',
'property-write',
'phpstan-param',
'phpstan-property',
'phpstan-property-read',
'phpstan-property-write',
'phpstan-assert',
'phpstan-assert-if-true',
'phpstan-assert-if-false',
'psalm-param',
'psalm-param-out',
'psalm-property',
'psalm-property-read',
'psalm-property-write',
'psalm-assert',
'psalm-assert-if-true',
'psalm-assert-if-false'
],
],
// Check types case - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_types
'phpdoc_types' => true,
// Use native scalar types - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_scalar
'phpdoc_scalar' => true,
// remove extra empty lines - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_trim
'phpdoc_trim' => true,
// remove empty lines inside phpdoc block - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_trim_consecutive_blank_line_separation
'phpdoc_trim_consecutive_blank_line_separation' => true,
])
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion _config.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright © 2003-2025 The Galette Team
* Copyright © 2003-2026 The Galette Team
*
* This file is part of Galette (https://galette.eu).
*
Expand Down
2 changes: 1 addition & 1 deletion _define.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright © 2003-2025 The Galette Team
* Copyright © 2003-2026 The Galette Team
*
* This file is part of Galette (https://galette.eu).
*
Expand Down
2 changes: 1 addition & 1 deletion _routes.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright © 2003-2025 The Galette Team
* Copyright © 2003-2026 The Galette Team
*
* This file is part of Galette (https://galette.eu).
*
Expand Down
26 changes: 1 addition & 25 deletions lib/GaletteEvents/Activity.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright © 2003-2025 The Galette Team
* Copyright © 2003-2026 The Galette Team
*
* This file is part of Galette (https://galette.eu).
*
Expand Down Expand Up @@ -108,8 +108,6 @@ public function load(int $id): bool
* Populate object from a resultset row
*
* @param ArrayObject<string, string|int> $r the resultset row
*
* @return void
*/
private function loadFromRS(ArrayObject $r): void
{
Expand All @@ -122,8 +120,6 @@ private function loadFromRS(ArrayObject $r): void

/**
* Remove specified event
*
* @return bool
*/
public function remove(): bool
{
Expand Down Expand Up @@ -163,8 +159,6 @@ public function remove(): bool
*
* @param array<string, mixed> $values All values to check, basically the $_POST array
* after sending the form
*
* @return bool
*/
public function check(array $values): bool
{
Expand Down Expand Up @@ -204,8 +198,6 @@ public function check(array $values): bool

/**
* Store the activity
*
* @return bool
*/
public function store(): bool
{
Expand Down Expand Up @@ -281,8 +273,6 @@ public function store(): bool

/**
* Get event id
*
* @return ?int
*/
public function getId(): ?int
{
Expand All @@ -291,8 +281,6 @@ public function getId(): ?int

/**
* Get event name
*
* @return string
*/
public function getName(): string
{
Expand All @@ -304,8 +292,6 @@ public function getName(): string
*
* @param string $prop Property to use
* @param bool $formatted Return date formatted, raw if false
*
* @return string
*/
private function getDate(string $prop, bool $formatted = true): string
{
Expand All @@ -325,8 +311,6 @@ private function getDate(string $prop, bool $formatted = true): string
* Get creation date
*
* @param bool $formatted Return date formatted, raw if false
*
* @return string
*/
public function getCreationDate(bool $formatted = true): string
{
Expand All @@ -335,8 +319,6 @@ public function getCreationDate(bool $formatted = true): string

/**
* Is actvity active?
*
* @return bool
*/
public function isActive(): bool
{
Expand All @@ -345,8 +327,6 @@ public function isActive(): bool

/**
* Get table's name
*
* @return string
*/
protected function getTableName(): string
{
Expand All @@ -355,8 +335,6 @@ protected function getTableName(): string

/**
* Get comment
*
* @return string
*/
public function getComment(): string
{
Expand All @@ -365,8 +343,6 @@ public function getComment(): string

/**
* Count number of events using this Activity
*
* @return int
*/
public function countEvents(): int
{
Expand Down
Loading