@@ 62-77 (lines=16) @@ | ||
59 | $url = new Url; |
|
60 | $patch->setRequest($this->request); |
|
61 | $patches = $patch->checkAll($url->clean($input->getArgument('url'))); |
|
62 | foreach ($patches as $name => $result) { |
|
63 | switch ($result) { |
|
64 | case PATCH::PATCHED: |
|
65 | $status = '<bg=green>Patched</bg=green>'; |
|
66 | break; |
|
67 | case PATCH::UNPATCHED: |
|
68 | $status = '<error>Unpatched</error>'; |
|
69 | break; |
|
70 | default: |
|
71 | $status = 'Unknown'; |
|
72 | } |
|
73 | $rows[] = [ |
|
74 | $name, |
|
75 | $status |
|
76 | ]; |
|
77 | } |
|
78 | $this->out('Patches', [[ |
|
79 | 'type' => 'table', |
|
80 | 'data' => [ |
@@ 126-141 (lines=16) @@ | ||
123 | $patch->setRequest($this->request); |
|
124 | $patches = $patch->checkAll($this->url); |
|
125 | $rows = []; |
|
126 | foreach ($patches as $name => $result) { |
|
127 | switch ($result) { |
|
128 | case PATCH::PATCHED: |
|
129 | $status = '<span class="pass">Patched</span class="pass">'; |
|
130 | break; |
|
131 | case PATCH::UNPATCHED: |
|
132 | $status = '<span class="fail">Unpatched</span class="fail">'; |
|
133 | break; |
|
134 | default: |
|
135 | $status = 'Unknown'; |
|
136 | } |
|
137 | $rows[] = [ |
|
138 | $name, |
|
139 | $status |
|
140 | ]; |
|
141 | } |
|
142 | $this->respond([ |
|
143 | 'head' => ['Patch', 'Status'], |
|
144 | 'body' => $rows |