Example #1
0
 /**
  * {@inheritdoc}.
  */
 protected function transformListToTableBody($list)
 {
     $result = [];
     /* @var $account  \AbuseIO\Models\Account|null */
     foreach ($list as $account) {
         $result[] = [$account->id, $account->name, $account->brand->name, castBoolToString($account->disabled)];
     }
     return $result;
 }
Example #2
0
 /**
  * Execute the console command.
  *
  * @param array $collectors
  * @return boolean
  */
 public function hydrateCollectorWithFields(array $collectors)
 {
     $objects = [];
     foreach ($collectors as $field => $value) {
         if (is_bool($value)) {
             $value = castBoolToString($value);
         }
         if (empty($value)) {
             $value = 'Unconfigured';
         }
         if (is_array($value)) {
             $value = implode(PHP_EOL, $value);
         }
         $objects[] = [ucfirst($field), $value];
     }
     return $objects;
 }
 public function testAnyStringIsStringFalse()
 {
     $this->assertEquals(castBoolToString("anyString"), "false");
 }
Example #4
0
 /**
  * @param Netblock $netblock
  * @return array
  */
 private function transformDomainToTableBody(Domain $domain)
 {
     return [[$domain->id, $domain->name, $domain->contact->name, castBoolToString($domain->enabled), $domain->created_at, $domain->updated_at, $domain->deleted_at]];
 }
 public function testAnyStringIsStringFalse()
 {
     $this->assertEquals(castBoolToString('anyString'), 'false');
 }