original_string: public function transform($widget)
      {
          $widget = $this->entityToArray(Widget::class, $widget);
          return [
              'id'          => (int) $widget['id'],
              'name'        => $widget['name'],
              'args'        => array_camel_case_keys($widget['args']),
              'isActive'    => (bool) $widget['is_active'],
              'isCacheable' => (bool) $widget['is_cacheable'],
              'createdAt'   => $widget['created_at'],
              'updatedAt'   => $widget['updated_at'],
          ];
      }
code: public function transform($widget)
      {
          $widget = $this->entityToArray(Widget::class, $widget);
          return [
              'id'          => (int) $widget['id'],
              'name'        => $widget['name'],
              'args'        => array_camel_case_keys($widget['args']),
              'isActive'    => (bool) $widget['is_active'],
              'isCacheable' => (bool) $widget['is_cacheable'],
              'createdAt'   => $widget['created_at'],
              'updatedAt'   => $widget['updated_at'],
          ];
      }
code_tokens: public function transform ( $ widget ) { $ widget = $ this -> entityToArray ( Widget :: class , $ widget ) ; return [ 'id' => ( int ) $ widget [ 'id' ] , 'name' => $ widget [ 'name' ] , 'args' => array_camel_case_keys ( $ widget [ 'args' ] ) , 'isActive' => ( bool ) $ widget [ 'is_active' ] , 'isCacheable' => ( bool ) $ widget [ 'is_cacheable' ] , 'createdAt' => $ widget [ 'created_at' ] , 'updatedAt' => $ widget [ 'updated_at' ] , ] ; }
docstring: Transforms widget entity
  
  @param Widget|array $widget Widget entity
  
  @return array
docstring_tokens: Transforms widget entity