mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-18 05:10:07 -07:00
Fix coding style
This commit is contained in:
parent
f2f4e086e6
commit
3c7ec6eced
@ -21,4 +21,4 @@ class PartPropertyNameConverter implements NameConverterInterface
|
||||
default: return $propertyName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,61 +3,70 @@
|
||||
* Created by PhpStorm.
|
||||
* User: hubnedav
|
||||
* Date: 11/18/16
|
||||
* Time: 1:45 AM
|
||||
* Time: 1:45 AM.
|
||||
*/
|
||||
|
||||
namespace AppBundle\Client\Rebrickable\Entity;
|
||||
|
||||
|
||||
class Color
|
||||
{
|
||||
/**
|
||||
* Internal Rebrickable color ID used
|
||||
* Internal Rebrickable color ID used.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $rb_color_id;
|
||||
/**
|
||||
* Array of mapped LDraw colors
|
||||
* Array of mapped LDraw colors.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $ldraw_color_id;
|
||||
/**
|
||||
* Array of mapped BrickLink colors
|
||||
* Array of mapped BrickLink colors.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $bricklink_color_id;
|
||||
/**
|
||||
* Array of mapped BrickOwl colors
|
||||
* Array of mapped BrickOwl colors.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $brickowl_color_id;
|
||||
/**
|
||||
* Color name
|
||||
* Color name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $color_name;
|
||||
/**
|
||||
* Number of parts the color appears in.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $num_parts;
|
||||
/**
|
||||
* Number of sets the color appears in.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $num_sets;
|
||||
/**
|
||||
* First year it was used.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $year1;
|
||||
/**
|
||||
* Last year it was used.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $year2;
|
||||
/**
|
||||
* Hex codes for the RGB value of this color: RRGGBB
|
||||
* Hex codes for the RGB value of this color: RRGGBB.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $rgb;
|
||||
@ -228,6 +237,4 @@ class Color
|
||||
{
|
||||
$this->rgb = $rgb;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,11 @@ class Part
|
||||
*/
|
||||
private $category;
|
||||
|
||||
/**
|
||||
* Part category/type id matching getPartTypes method values.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $typeId;
|
||||
|
||||
/**
|
||||
@ -56,6 +61,11 @@ class Part
|
||||
*/
|
||||
private $colors;
|
||||
|
||||
/**
|
||||
* Part color id matching getColors method values.
|
||||
*
|
||||
* @var
|
||||
*/
|
||||
private $colorId;
|
||||
|
||||
/**
|
||||
@ -77,7 +87,6 @@ class Part
|
||||
*/
|
||||
private $part_img_url;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class Rebrickable
|
||||
{
|
||||
$encoders = array(new JsonEncoder());
|
||||
$nameConverter = new PartPropertyNameConverter();
|
||||
$normalizers = array(new ObjectNormalizer(null,$nameConverter), new ArrayDenormalizer());
|
||||
$normalizers = array(new ObjectNormalizer(null, $nameConverter), new ArrayDenormalizer());
|
||||
$serializer = new Serializer($normalizers, $encoders);
|
||||
|
||||
return $serializer;
|
||||
@ -126,7 +126,7 @@ class Rebrickable
|
||||
}
|
||||
|
||||
/**
|
||||
* Get associative array of colors used by all parts where key == rb_color_id
|
||||
* Get associative array of colors used by all parts where key == rb_color_id.
|
||||
*
|
||||
* @return Color[]|null
|
||||
*/
|
||||
@ -147,7 +147,7 @@ class Rebrickable
|
||||
}
|
||||
|
||||
/**
|
||||
* Get associative array of themes used by all parts where key == part_type_id
|
||||
* Get associative array of themes used by all parts where key == part_type_id.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user