Skip to content

Commit 297c4fe

Browse files
karam-mustafaactions-user
authored andcommitted
Fix styling
1 parent 486afb5 commit 297c4fe

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

.php-cs-fixer.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"php":"8.1.0","version":"3.4.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"space_before_parenthesis":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"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":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_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"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"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"src\/Interfaces\/ClassToBuildInterface.php":1998540425,"src\/Abstracts\/AbstractToBuild.php":851759240,"src\/Classes\/ClassToBuild.php":913908939,"tests\/BaseTest.php":3538535820,"tests\/Feature\/ExampleTest.php":4065595002,"src\/Interfaces\/ArabicDiffForHumansInterface.php":548831722,"src\/Abstracts\/ArabicDiffForHumansAbstract.php":3318874012,"src\/Classes\/ArabicDiffForHumans.php":3780825965}}
1+
{"php":"8.1.0","version":"3.4.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"space_before_parenthesis":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"]},"ordered_imports":{"sort_algorithm":"alpha"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":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_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"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"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one"}}},"hashes":{"src\/Interfaces\/ClassToBuildInterface.php":1998540425,"src\/Abstracts\/AbstractToBuild.php":851759240,"src\/Classes\/ClassToBuild.php":913908939,"tests\/BaseTest.php":3538535820,"tests\/Feature\/ExampleTest.php":4065595002,"src\/Interfaces\/ArabicDiffForHumansInterface.php":1279869002,"src\/Abstracts\/ArabicDiffForHumansAbstract.php":2655589807,"src\/Classes\/ArabicDiffForHumans.php":3215309222,"tests\/Feature\/ArabicDiffForHumansTest.php":754316182}}

src/Abstracts/ArabicDiffForHumansAbstract.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111
abstract class ArabicDiffForHumansAbstract
1212
{
13-
1413
/**
1514
*
1615
*
@@ -27,22 +26,28 @@ protected function DiffValue($diff, $unit)
2726
switch ($unit) {
2827
case 1:
2928
$diffValue = $diff;
29+
3030
break;
3131
case 2:
3232
$diffValue = $this->getMinutes($diff);
33+
3334
break;
3435
case 3:
3536
$diffValue = $this->getHours($diff);
37+
3638
break;
3739
case 4:
3840
$diffValue = $this->getDays($diff);
41+
3942
break;
4043
case 5:
4144
$diffValue = $this->getMonths($diff);
45+
4246
break;
4347
case 6:
4448
$diffValue = $this->getYears($diff);
4549
}
50+
4651
return $diffValue;
4752
}
4853

src/Classes/ArabicDiffForHumans.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function get($timeStamp)
5050
$result = $this->formatResult($valueOfDifference, ...$value);
5151
}
5252
}
53+
5354
return $result;
5455
}
55-
5656
}

src/Interfaces/ArabicDiffForHumansInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
interface ArabicDiffForHumansInterface
66
{
7-
87
/**
98
* get the date from the string date object.
109
*

tests/Feature/ArabicDiffForHumansTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace SOS\ArabicDiffForHumans\Tests\Feature;
44

5-
65
use PHPUnit\Framework\TestCase;
76
use SOS\ArabicDiffForHumans\Classes\ArabicDiffForHumans;
87

@@ -22,8 +21,8 @@ public function test_your_function_use_case()
2221

2322
$timeStamp = strtotime($time);
2423

25-
$this->assertEquals('منذ 3 سنين' , $instance->getFromDateString($time));
24+
$this->assertEquals('منذ 3 سنين', $instance->getFromDateString($time));
2625

27-
$this->assertEquals('منذ 3 سنين' , $instance->get($timeStamp));
26+
$this->assertEquals('منذ 3 سنين', $instance->get($timeStamp));
2827
}
2928
}

0 commit comments

Comments
 (0)