Skip to content

Commit fbe46bf

Browse files
karam-mustafaactions-user
authored andcommitted
Fix styling
1 parent 911b77c commit fbe46bf

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

.php-cs-fixer.cache

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"php":"8.1.1","version":"3.5.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\/Providers\/ClassToBuildServiceProviders.php":894462343,"src\/Classes\/ClassToBuild.php":1863686418,"src\/Abstracts\/AbstractToBuild.php":4067261489,"src\/Interfaces\/ClassToBuildInterface.php":3639279532,"src\/Commands\/InstallCommand.php":3981754395,"src\/Config\/package_config.php":1122705014,"src\/Facades\/ClassToBuildFacade.php":3267118586,"tests\/Feature\/ExampleTest.php":3403803516,"tests\/BaseTest.php":364171998,"src\/Facade\/QueryHelperFacade.php":1424222852,"src\/Providers\/QueryHelperServiceProviders.php":608029189,"src\/Classes\/DeleteHelper.php":3423337787,"src\/Classes\/JoinHelper.php":941291578,"src\/Classes\/QueryHelper.php":4113349496,"src\/Classes\/BaseHelper.php":2396364014,"src\/Classes\/InsertHelper.php":3586087926,"src\/Classes\/UpdateHelper.php":3622326637,"src\/Config\/query_helper.php":3245707786}}
1+
{"php":"8.1.1","version":"3.5.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\/Providers\/ClassToBuildServiceProviders.php":894462343,"src\/Classes\/ClassToBuild.php":1863686418,"src\/Abstracts\/AbstractToBuild.php":4067261489,"src\/Interfaces\/ClassToBuildInterface.php":3639279532,"src\/Commands\/InstallCommand.php":1065401043,"src\/Config\/package_config.php":1122705014,"src\/Facades\/ClassToBuildFacade.php":3267118586,"tests\/Feature\/ExampleTest.php":3403803516,"tests\/BaseTest.php":364171998,"src\/Facade\/QueryHelperFacade.php":1424222852,"src\/Providers\/QueryHelperServiceProviders.php":608029189,"src\/Classes\/DeleteHelper.php":513319136,"src\/Classes\/JoinHelper.php":3661173632,"src\/Classes\/QueryHelper.php":4113349496,"src\/Classes\/BaseHelper.php":4217219097,"src\/Classes\/InsertHelper.php":3586087926,"src\/Classes\/UpdateHelper.php":349709783,"src\/Config\/query_helper.php":3245707786}}

src/Classes/JoinHelper.php

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?php
22

3-
43
namespace SOS\QueryHelper\Classes;
54

6-
use \Illuminate\Support\Str;
5+
use Illuminate\Support\Str;
76

87
/**
98
* Class JoinHelper
@@ -13,7 +12,6 @@
1312
*/
1413
class JoinHelper extends BaseHelper
1514
{
16-
1715
/**
1816
*
1917
* @author karam mustafa
@@ -70,11 +68,13 @@ public function buildJoin($saveItems = true)
7068
{
7169
// set the select query.
7270
$this->setQuery(
73-
sprintf("SELECT %s FROM %s %s",
71+
sprintf(
72+
"SELECT %s FROM %s %s",
7473
$this->getSelection(),
7574
$this->getTableName(),
7675
$this->getQuery()
77-
));
76+
)
77+
);
7878

7979
// change the selection status to isSelectStatus,
8080
// so we can execute this query as a raw statement.
@@ -83,7 +83,7 @@ public function buildJoin($saveItems = true)
8383
if ($saveItems) {
8484
// save this result in savedItems Property
8585
$this->setSavedItems([
86-
$this->savedKey => $this->executeAll()
86+
$this->savedKey => $this->executeAll(),
8787
]);
8888
}
8989

@@ -119,7 +119,7 @@ public function resolveRelation($firstTable, $secondTable)
119119
*/
120120
public function fastJoin($mainTableName, $selection, $tables, $joinTypes = 'JOIN')
121121
{
122-
$tables = !is_array($tables) ? [$tables] : $tables;
122+
$tables = ! is_array($tables) ? [$tables] : $tables;
123123

124124
// this is a important step if the user has been execute multi fastJoin
125125
// because the clearAll function clear the default field.
@@ -130,7 +130,7 @@ public function fastJoin($mainTableName, $selection, $tables, $joinTypes = 'JOIN
130130

131131
// clear all parameter's, except the saved items.
132132
$this->clearAll();
133-
133+
134134
return $this;
135135
}
136136

@@ -195,9 +195,8 @@ private function buildFastJoin($mainTableName, $selection, $tables, $joinTypes):
195195
->setSelection($selection)
196196
->setJoinType($joinTypes)
197197
->buildJoin(false)
198-
->executeAll()
198+
->executeAll(),
199199
]);
200-
201200
});
202201
}
203202
}

0 commit comments

Comments
 (0)