Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
ui_patterns_settings
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ui_patterns_settings
Merge requests
!22
Issue
#3413129
by Grimreaper: Code cleanup
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3413129
by Grimreaper: Code cleanup
issue/ui_patterns_settings-3413129:3413129-code-cleanup
into
8.x-2.x
Overview
1
Commits
1
Pipelines
0
Changes
18
Merged
Florent Torregrosa
requested to merge
issue/ui_patterns_settings-3413129:3413129-code-cleanup
into
8.x-2.x
1 year ago
Overview
1
Commits
1
Pipelines
0
Changes
18
Expand
Closes
#3413129
0
0
Merge request reports
Compare
8.x-2.x
8.x-2.x (base)
and
latest version
latest version
7eaf325a
1 commit,
1 year ago
18 files
+
0
−
488
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
18
Search (e.g. *.vue) (Ctrl+P)
.docksal/addons/phpcs/phpcs deleted
100755 → 0
+
0
−
66
Options
#!/usr/bin/env bash
## Run PHP Code Sniffer Commands
##
## This command will allow for running Code Sniffer commands
## to help make sure is to coding standards.
##
## Running PHPCS
## fin phpcs cs "[directory name]"
##
## Running PHPCBF
## fin phpcs cbf "[directory name]"
##
## Usage:
## cs Run PHPCS
## cbf Run PHPCBF
STANDARDS
=
""
if
[[
-n
"
${
PHPCS_STANDARDS
}
"
]]
;
then
STANDARDS
=
"
${
PHPCS_STANDARDS
}
"
fi
if
[[
-n
"
${
PHPCS_EXTENSIONS
}
"
]]
;
then
EXTENSIONS
=
"
${
PHPCS_EXTENSIONS
}
"
fi
if
[[
-f
"
${
PROJECT_ROOT
}
/
${
DOCROOT
}
/sites/default/settings.php"
]]
||
[[
-f
"
${
PROJECT_ROOT
}
/
${
DOCROOT
}
/sites/default/default.settings.php"
]]
;
then
STANDARDS
=
"
${
STANDARDS
:-
"Drupal,DrupalPractice"
}
"
EXTENSIONS
=
"
${
EXTENSIONS
:-
"php,module,inc,install,test,profile,theme,css,info,txt,md"
}
"
;
elif
[[
-f
"
${
PROJECT_ROOT
}
/
${
DOCROOT
}
/wp-config.php"
]]
;
then
STANDARDS
=
"
${
STANDARDS
:-
"WordPress"
}
"
EXTENSIONS
=
"
${
EXTENSIONS
:-
"php"
}
"
fi
COMMAND
=
""
case
"
$1
"
in
cs
)
shift
COMMAND
=
"/var/vendor/phpcs"
;;
cbf
)
shift
COMMAND
=
"phpcbf"
;;
*
)
fin
help
phpcs
exit
;;
esac
# If standard flag is used remove our default.
STANDARD_OPT
=
"--standard=
\"
${
STANDARDS
}
\"
"
if
[[
"
$@
"
=
~
"--standard="
]]
;
then
STANDARD_OPT
=
""
fi
# If extension flag is used remove our default.
EXTENSION_OPT
=
"--extensions=
\"
${
EXTENSIONS
}
\"
"
if
[[
"
$@
"
=
~
"--extensions="
]]
;
then
EXTENSION_OPT
=
""
fi
print
"
$COMMAND
$STANDARD_OPT
$EXTENSION_OPT
$@
"
# run the command in the container.
fin
exec
"
$COMMAND
$STANDARD_OPT
$EXTENSION_OPT
$@
"
Loading