Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
S
sidekick
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Privat - Marco Schmiedel
sidekick
Commits
390e32b2
Commit
390e32b2
authored
Dec 20, 2021
by
Marco Schmiedel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
validation stage 1
parent
7cc44f02
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
555 additions
and
388 deletions
+555
-388
CodebeautifierCommand.php
src/Commands/CodebeautifierCommand/CodebeautifierCommand.php
+542
-379
TerminalManager.php
src/Managers/TerminalManager/TerminalManager.php
+13
-9
No files found.
src/Commands/CodebeautifierCommand/CodebeautifierCommand.php
View file @
390e32b2
This diff is collapsed.
Click to expand it.
src/Managers/TerminalManager/TerminalManager.php
View file @
390e32b2
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
| sidekick package.
| sidekick package.
|
|
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Author: Marco Schmiedel <marco.schmiedel@itmax.email>
| Date: 2021-12-20 15:
21:14
| Date: 2021-12-20 15:
38:03
|
|
*/
*/
namespace
Ceetrox\Managers\TerminalManager
;
namespace
Ceetrox\Managers\TerminalManager
;
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
| Class "TerminalManager"
| Class "TerminalManager"
|------------------------------------------------------------------------------------------------
|------------------------------------------------------------------------------------------------
*/
*/
class
TerminalManager
class
TerminalManager
{
{
/*
/*
...
@@ -79,25 +79,25 @@
...
@@ -79,25 +79,25 @@
{
{
/*
/*
|----------------------------------------------------------------------------------------
|----------------------------------------------------------------------------------------
| Create an empty string for all upcoming colors.
..
| Create an empty string for all upcoming colors.
*/
*/
$text
=
"
\n
"
;
$text
=
"
\n
"
;
/*
/*
|----------------------------------------------------------------------------------------
|----------------------------------------------------------------------------------------
| Create
counter value..
.
| Create
the counter value
.
*/
*/
$i1
=
16
;
$i1
=
16
;
/*
/*
|----------------------------------------------------------------------------------------
|----------------------------------------------------------------------------------------
| Loop counter value within the color range.
..
| Loop counter value within the color range.
*/
*/
while
(
$i1
<
52
)
while
(
$i1
<
52
)
{
{
/*
/*
|------------------------------------------------------------------------------------
|------------------------------------------------------------------------------------
| Calculate 7 columns per line.
..
| Calculate 7 columns per line.
*/
*/
$i1
=
$i1
;
$i1
=
$i1
;
$i2
=
$i1
+
36
;
$i2
=
$i1
+
36
;
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
/*
/*
|------------------------------------------------------------------------------------
|------------------------------------------------------------------------------------
| Calculate
for bright and dark..
.
| Calculate
output for bright and dark colors
.
*/
*/
$text
.=
TerminalManager
::
darkColor
(
" D"
.
str_pad
(
$i1
,
3
,
"0"
,
STR_PAD_LEFT
)
.
" "
,
$i1
);
$text
.=
TerminalManager
::
darkColor
(
" D"
.
str_pad
(
$i1
,
3
,
"0"
,
STR_PAD_LEFT
)
.
" "
,
$i1
);
$text
.=
TerminalManager
::
darkColor
(
" D"
.
str_pad
(
$i2
,
3
,
"0"
,
STR_PAD_LEFT
)
.
" "
,
$i2
);
$text
.=
TerminalManager
::
darkColor
(
" D"
.
str_pad
(
$i2
,
3
,
"0"
,
STR_PAD_LEFT
)
.
" "
,
$i2
);
...
@@ -130,17 +130,21 @@
...
@@ -130,17 +130,21 @@
/*
/*
|------------------------------------------------------------------------------------
|------------------------------------------------------------------------------------
| Add
linebreak..
.
| Add
break at the end of the line
.
*/
*/
$text
.=
"
\n
"
;
$text
.=
"
\n
"
;
/*
/*
|------------------------------------------------------------------------------------
|------------------------------------------------------------------------------------
|
Add value to counter..
.
|
Increase value to the line counter
.
*/
*/
$i1
+=
1
;
$i1
+=
1
;
}
}
/*
|----------------------------------------------------------------------------------------
| Return string for terminal output.
*/
return
$text
;
return
$text
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment