File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/Ubiquity/devtools/cmd Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11<?php
22namespace Ubiquity \devtools \cmd ;
33
4- use Ubiquity \utils \base \UDateTime ;
54use Ubiquity \devtools \utils \arrays \ClassicArray ;
6- use Ubiquity \utils \base \UString ;
75
86class ConsoleTable {
97
@@ -182,7 +180,7 @@ private function getLineRow($row, $yl) {
182180 foreach ($ row as $ col ) {
183181 if ($ col instanceof \DateTime) {
184182 $ lines = [
185- UDateTime::elapsed ($ col )
183+ \ Ubiquity \ utils \ base \ UDateTime::elapsed ($ col )
186184 ];
187185 } else {
188186 $ lines = \explode ("\n" , $ col );
@@ -303,9 +301,9 @@ private function calculateColWidths() {
303301 $ this ->rowHeight [$ y ] = 1 ;
304302 foreach ($ row as $ col ) {
305303 if ($ col instanceof \DateTime) {
306- $ col = UDateTime::elapsed ($ col );
304+ $ col = \ Ubiquity \ utils \ base \ UDateTime::elapsed ($ col );
307305 }
308- if (UString:: isValid ($ col )) {
306+ if (\is_scalar ($ col) || ( \is_object ( $ col ) && \method_exists ( $ col , ' __toString ' ) )) {
309307 $ lines = explode ("\n" , $ col );
310308 $ size = sizeof ($ lines );
311309 if ($ size > $ this ->rowHeight [$ y ]) {
You can’t perform that action at this time.
0 commit comments