Skip to content

Commit

Permalink
Dusting
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv authored and actions-user committed Sep 4, 2023
1 parent 9cea071 commit 2d3ea1c
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"php":"8.2.9","version":"3.22.0","indent":" ","lineEnding":"\n","rules":{"align_multiline_comment":true,"array_syntax":{"syntax":"short"},"backtick_to_shell_exec":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["return"]},"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":true,"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"curly_braces_position":{"allow_single_line_anonymous_functions":true,"allow_single_line_empty_anonymous_classes":true},"declare_parentheses":true,"echo_tag_syntax":true,"empty_loop_body":{"style":"braces"},"empty_loop_condition":true,"fully_qualified_strict_types":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"on_multiline":"ignore"},"native_function_casing":true,"native_function_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["attribute","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"remove_inheritdoc":true},"no_trailing_comma_in_singleline":true,"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","others","return","switch_case","yield","yield_from"]},"no_unneeded_curly_braces":{"namespaces":true},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_nullsafe_operator":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"nullable_type_declaration_for_default_null_value":{"use_nullable_type_declaration":false},"object_operator_without_whitespace":true,"operator_linebreak":{"only_booleans":true},"ordered_imports":true,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_without_name":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_comment_spacing":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_space_around_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"switch_continue_to_break":true,"trailing_comma_in_multiline":true,"trim_array_spaces":true,"type_declaration_spaces":true,"types_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"return_type_declaration":true,"short_scalar_cast":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_indentation":true,"function_typehint_space":true,"declare_strict_types":true,"combine_consecutive_unsets":true,"not_operator_with_successor_space":true,"braces":{"position_after_functions_and_oop_constructs":"same"}},"hashes":{"Models\/Chart.php":"e1a0bfb3276bda149e70a4b0fb2acd76","Models\/BaseModel.php":"a5e5fac12535033db8d5861703e99519","Models\/MixedChart.php":"7867dfb1b803e374d13cd3a97d9e59fb","Providers\/RouteServiceProvider.php":"c62b9048288ce5bf3cd9e487014582c6","Providers\/ChartServiceProvider.php":"382e54a95faa1de143c4c36967305e30","Actions\/Chart\/GetTypeOptions.php":"1977c9cce4a478e7026d6e79702a25d1","Actions\/Chart\/GetFontFamilyOptions.php":"3c7b5576bf288b7cc8b7cf77885ffe5b","Actions\/Chart\/GetFontStyleOptions.php":"0e3183628f3e8e7a81c90c8c72861750","Actions\/JpGraph\/ApplyGraphStyleAction.php":"4520c1aeaaf48eacc0b862eab5e9f09d","Actions\/JpGraph\/V1\/Bar2Action.php":"a5b3759333579e2a397486f4b1f00a7a","Actions\/JpGraph\/V1\/Horizbar1Action.php":"51c9acacfe45372e4d7fe8c64248df2b","Actions\/JpGraph\/V1\/PieAvgAction.php":"0ff2a347e36ae6511173bd6d005bc0b8","Actions\/JpGraph\/V1\/Bar3Action.php":"911d8b152a2d35fbbe32ff40e3bdd6aa","Actions\/JpGraph\/V1\/Pie1Action.php":"6c63693ba738cf06aa70dc5983db6e51","Actions\/JpGraph\/V1\/LineSubQuestionAction.php":"32a00d6aa31be891d327e15a0f891f5b","Actions\/JpGraph\/GetGraphAction.php":"a90c2fbcf920fe4c8c44642688b52cdf","Actions\/JpGraph\/ApplyPlotStyleAction.php":"b64d4ebd5ba250d0a2e4696edde6923b","Datas\/AnswerData.php":"d8966e9e66da960868a02d8543286de9","Datas\/AnswersChartData.php":"f0a875671bfa5c376ee7c412f01c1d8c","Datas\/ChartData.php":"1802002cd1008c0be28ccbbc0c99da31","Tables\/Columns\/ChartColumn.php":"3c227257f39138235d1a9f1ba0ae9aa0","docs\/config.php":"a797f4b644f37748cceff11c2ce84559","docs\/config.production.php":"0389bfdb2066feea5487831e25c2aa1b","docs\/navigation.php":"4b48df06bfed09cf256c9ffa7a2346c0","docs\/bootstrap.php":"08c7c136892cf6aadd94bcdb6f64ca34","docs\/listeners\/GenerateSitemap.php":"47198e7919271856d36b88e921c7d3eb","Database\/Seeders\/ChartDatabaseSeeder.php":"e9a0cbed13c138e24cd6a3d2722d2507","Database\/Factories\/ChartFactory.php":"a52492954bc2000b2a3f223ba92f5ae2","Database\/Factories\/MixedChartFactory.php":"94a428c20b3c40b93a285610d4338559","Routes\/web.php":"d8b57a2739d10acaa69603aca186a4f7","Routes\/api.php":"905e49cc806f2d11cc4698d1532d7b04","Config\/config.php":"24af6b51b9bb0cb3795f130d93ec5bd3","phpinsights.php":"a903fc759ac88dad061accf0899a2622"}}
{"php":"8.2.10","version":"3.25.0","indent":" ","lineEnding":"\n","rules":{"align_multiline_comment":true,"array_syntax":{"syntax":"short"},"backtick_to_shell_exec":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["return"]},"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":true,"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"curly_braces_position":{"allow_single_line_anonymous_functions":true,"allow_single_line_empty_anonymous_classes":true},"declare_parentheses":true,"echo_tag_syntax":true,"empty_loop_body":{"style":"braces"},"empty_loop_condition":true,"fully_qualified_strict_types":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"on_multiline":"ignore"},"native_function_casing":true,"native_function_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["attribute","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"remove_inheritdoc":true},"no_trailing_comma_in_singleline":true,"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","others","return","switch_case","yield","yield_from"]},"no_unneeded_curly_braces":{"namespaces":true},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_nullsafe_operator":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"nullable_type_declaration_for_default_null_value":{"use_nullable_type_declaration":false},"object_operator_without_whitespace":true,"operator_linebreak":{"only_booleans":true},"ordered_imports":true,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_without_name":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_comment_spacing":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_space_around_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"switch_continue_to_break":true,"trailing_comma_in_multiline":true,"trim_array_spaces":true,"type_declaration_spaces":true,"types_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"return_type_declaration":true,"short_scalar_cast":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_indentation":true,"function_typehint_space":true,"declare_strict_types":true,"combine_consecutive_unsets":true,"not_operator_with_successor_space":true,"braces":{"position_after_functions_and_oop_constructs":"same"}},"hashes":{"Database\/Seeders\/ChartDatabaseSeeder.php":"e9a0cbed13c138e24cd6a3d2722d2507","Database\/Factories\/MixedChartFactory.php":"94a428c20b3c40b93a285610d4338559","Database\/Factories\/ChartFactory.php":"a52492954bc2000b2a3f223ba92f5ae2","phpinsights.php":"a903fc759ac88dad061accf0899a2622","Config\/config.php":"24af6b51b9bb0cb3795f130d93ec5bd3","docs\/config.production.php":"0389bfdb2066feea5487831e25c2aa1b","docs\/bootstrap.php":"08c7c136892cf6aadd94bcdb6f64ca34","docs\/listeners\/GenerateSitemap.php":"47198e7919271856d36b88e921c7d3eb","docs\/navigation.php":"4b48df06bfed09cf256c9ffa7a2346c0","docs\/config.php":"9e368edbeff720f8f929e3f83bf443b7","Datas\/ChartData.php":"1802002cd1008c0be28ccbbc0c99da31","Datas\/AnswersChartData.php":"f0a875671bfa5c376ee7c412f01c1d8c","Datas\/AnswerData.php":"d8966e9e66da960868a02d8543286de9","Providers\/RouteServiceProvider.php":"c62b9048288ce5bf3cd9e487014582c6","Providers\/ChartServiceProvider.php":"382e54a95faa1de143c4c36967305e30","Tables\/Columns\/ChartColumn.php":"bc89dac863afe46ac771a2947eeffa3f","Actions\/Chart\/GetFontStyleOptions.php":"0e3183628f3e8e7a81c90c8c72861750","Actions\/Chart\/GetFontFamilyOptions.php":"3c7b5576bf288b7cc8b7cf77885ffe5b","Actions\/Chart\/GetTypeOptions.php":"1977c9cce4a478e7026d6e79702a25d1","Actions\/JpGraph\/V1\/PieAvgAction.php":"0ff2a347e36ae6511173bd6d005bc0b8","Actions\/JpGraph\/V1\/Horizbar1Action.php":"51c9acacfe45372e4d7fe8c64248df2b","Actions\/JpGraph\/V1\/Bar2Action.php":"a5b3759333579e2a397486f4b1f00a7a","Actions\/JpGraph\/V1\/LineSubQuestionAction.php":"32a00d6aa31be891d327e15a0f891f5b","Actions\/JpGraph\/V1\/Pie1Action.php":"6c63693ba738cf06aa70dc5983db6e51","Actions\/JpGraph\/V1\/Bar3Action.php":"911d8b152a2d35fbbe32ff40e3bdd6aa","Actions\/JpGraph\/ApplyPlotStyleAction.php":"b64d4ebd5ba250d0a2e4696edde6923b","Actions\/JpGraph\/GetGraphAction.php":"a90c2fbcf920fe4c8c44642688b52cdf","Actions\/JpGraph\/ApplyGraphStyleAction.php":"4520c1aeaaf48eacc0b862eab5e9f09d","Models\/MixedChart.php":"7867dfb1b803e374d13cd3a97d9e59fb","Models\/BaseModel.php":"a5e5fac12535033db8d5861703e99519","Models\/Chart.php":"e1a0bfb3276bda149e70a4b0fb2acd76","Routes\/web.php":"d8b57a2739d10acaa69603aca186a4f7","Routes\/api.php":"905e49cc806f2d11cc4698d1532d7b04"}}
4 changes: 2 additions & 2 deletions Actions/JpGraph/ApplyGraphStyleAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public function execute(Graph &$graph, ChartData $chart): Graph

$graph->footer->right->SetFont($chart->font_family, $chart->font_style);
// $graph->footer->right->Set('Totale Risposte '.$this->vars['tot']);
if ($graph->xaxis !== null) {
if (null !== $graph->xaxis) {
$this->applyGraphXStyle($graph->xaxis, $chart);
}
if ($graph->yaxis !== null) {
if (null !== $graph->yaxis) {
$this->applyGraphYStyle($graph->yaxis, $chart);
}

Expand Down
4 changes: 2 additions & 2 deletions Actions/JpGraph/ApplyPlotStyleAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function execute(BarPlot $plot, ChartData $data): BarPlot

$plot->value->SetAlign('left', 'center');
// colore del font che scrivi
if ($data->plot_value_color !== null) {
if (null !== $data->plot_value_color) {
$plot->value->SetColor($data->plot_value_color);
} else {
$plot->value->SetColor('black', 'darkred');
Expand All @@ -67,7 +67,7 @@ public function execute(BarPlot $plot, ChartData $data): BarPlot

// Center the values in the bar
// if (null == $data->plot_value_pos || 0 == $data->plot_value_pos) {
if ($data->plot_value_pos === 0) {
if (0 === $data->plot_value_pos) {
$plot->SetValuePos('center');
}

Expand Down
2 changes: 1 addition & 1 deletion Actions/JpGraph/GetGraphAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function execute(ChartData $data): Graph
$graph = new Graph($data->width, $data->height, 'auto');
$graph->SetScale('textlin');
$graph->SetShadow();
$theme_class = new UniversalTheme();
$theme_class = new UniversalTheme;

$graph->SetTheme($theme_class);

Expand Down
7 changes: 4 additions & 3 deletions Actions/JpGraph/V1/Bar2Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
use Amenadiel\JpGraph\Plot\BarPlot;
use Amenadiel\JpGraph\Plot\GroupBarPlot;
use Amenadiel\JpGraph\Text\Text;
use function count;
use Modules\Chart\Actions\JpGraph\ApplyPlotStyleAction;
use Modules\Chart\Actions\JpGraph\GetGraphAction;
use Modules\Chart\Datas\AnswersChartData;
use Spatie\QueueableAction\QueueableAction;

use function count;

class Bar2Action
{
use QueueableAction;
Expand Down Expand Up @@ -62,7 +63,7 @@ public function execute(AnswersChartData $answerChartData): Graph
$bplot = [];

foreach ($legends as $i => $legend) {
if ($legend === 0) {
if (0 === $legend) {
$tmp_data = $data;
} else {
$tmp_data = array_column($data, $legend);
Expand All @@ -81,7 +82,7 @@ public function execute(AnswersChartData $answerChartData): Graph
$tmp->SetLegend($str);
}
*/
if ($legend !== 0) {
if (0 !== $legend) {
$tmp->SetLegend($legend);
}

Expand Down
3 changes: 2 additions & 1 deletion Actions/JpGraph/V1/Bar3Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
use Amenadiel\JpGraph\Plot\AccBarPlot;
use Amenadiel\JpGraph\Plot\BarPlot;
use Amenadiel\JpGraph\Text\Text;
use function count;
use Modules\Chart\Actions\JpGraph\ApplyPlotStyleAction;
use Modules\Chart\Actions\JpGraph\GetGraphAction;
use Modules\Chart\Datas\AnswerData;
use Modules\Chart\Datas\AnswersChartData;
use Spatie\QueueableAction\QueueableAction;
use Webmozart\Assert\Assert;

use function count;

class Bar3Action
{
use QueueableAction;
Expand Down
2 changes: 1 addition & 1 deletion Actions/JpGraph/V1/Horizbar1Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function execute(AnswersChartData $answerChartData): Graph
$colors = [];

foreach ($labels as $k => $label) {
if ($label === 'NR') {
if ('NR' === $label) {
$colors[$k] = $chart->getColors()[1] . '@' . $chart->transparency;
} else {
$colors[$k] = $chart->getColors()[0] . '@' . $chart->transparency;
Expand Down
5 changes: 3 additions & 2 deletions Actions/JpGraph/V1/Pie1Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
use Amenadiel\JpGraph\Graph\Graph;
use Amenadiel\JpGraph\Graph\PieGraph;
use Amenadiel\JpGraph\Plot\PiePlotC;
use function count;
use Modules\Chart\Actions\JpGraph\ApplyGraphStyleAction;
use Modules\Chart\Datas\AnswersChartData;
use Spatie\QueueableAction\QueueableAction;

use function count;
use function strlen;

class Pie1Action
Expand All @@ -33,7 +34,7 @@ public function execute(AnswersChartData $answerChartData): Graph
$data[] = $other;
$labels[] = $chart->answer_value_no_txt;

if (count($labels) === 2 && strlen($labels[0]) < 3) {
if (2 === count($labels) && strlen($labels[0]) < 3) {
$labels[0] = $chart->answer_value_txt;
}
}
Expand Down
Loading

0 comments on commit 2d3ea1c

Please sign in to comment.