3333class ProjectBuildRequestTest extends TestCase
3434{
3535
36- /** @var MeasurementUnit $float_unit */
37- private MeasurementUnit $ float_unit ;
38-
3936 /** @var Project */
4037 private Project $ project1 ;
4138 /** @var ProjectBOMEntry */
@@ -49,30 +46,25 @@ class ProjectBuildRequestTest extends TestCase
4946 private PartLot $ lot1b ;
5047 private PartLot $ lot2 ;
5148
52- /** @var Part */
53- private Part $ part1 ;
54- /** @var Part */
55- private Part $ part2 ;
56-
5749
5850 public function setUp (): void
5951 {
60- $ this -> float_unit = new MeasurementUnit ();
61- $ this -> float_unit ->setName ('float ' );
62- $ this -> float_unit ->setUnit ('f ' );
63- $ this -> float_unit ->setIsInteger (false );
64- $ this -> float_unit ->setUseSIPrefix (true );
52+ $ float_unit = new MeasurementUnit ();
53+ $ float_unit ->setName ('float ' );
54+ $ float_unit ->setUnit ('f ' );
55+ $ float_unit ->setIsInteger (false );
56+ $ float_unit ->setUseSIPrefix (true );
6557
6658 //Setup some example parts and part lots
67- $ this -> part1 = new Part ();
68- $ this -> part1 ->setName ('Part 1 ' );
59+ $ part1 = new Part ();
60+ $ part1 ->setName ('Part 1 ' );
6961 $ this ->lot1a = new class extends PartLot {
7062 public function getID (): ?int
7163 {
7264 return 1 ;
7365 }
7466 };
75- $ this -> part1 ->addPartLot ($ this ->lot1a );
67+ $ part1 ->addPartLot ($ this ->lot1a );
7668 $ this ->lot1a ->setAmount (10 );
7769 $ this ->lot1a ->setDescription ('Lot 1a ' );
7870
@@ -82,25 +74,25 @@ public function getID(): ?int
8274 return 2 ;
8375 }
8476 };
85- $ this -> part1 ->addPartLot ($ this ->lot1b );
77+ $ part1 ->addPartLot ($ this ->lot1b );
8678 $ this ->lot1b ->setAmount (20 );
8779 $ this ->lot1b ->setDescription ('Lot 1b ' );
8880
89- $ this -> part2 = new Part ();
81+ $ part2 = new Part ();
9082
91- $ this -> part2 ->setName ('Part 2 ' );
92- $ this -> part2 ->setPartUnit ($ this -> float_unit );
83+ $ part2 ->setName ('Part 2 ' );
84+ $ part2 ->setPartUnit ($ float_unit );
9385 $ this ->lot2 = new PartLot ();
94- $ this -> part2 ->addPartLot ($ this ->lot2 );
86+ $ part2 ->addPartLot ($ this ->lot2 );
9587 $ this ->lot2 ->setAmount (2.5 );
9688 $ this ->lot2 ->setDescription ('Lot 2 ' );
9789
9890 $ this ->bom_entry1a = new ProjectBOMEntry ();
99- $ this ->bom_entry1a ->setPart ($ this -> part1 );
91+ $ this ->bom_entry1a ->setPart ($ part1 );
10092 $ this ->bom_entry1a ->setQuantity (2 );
10193
10294 $ this ->bom_entry1b = new ProjectBOMEntry ();
103- $ this ->bom_entry1b ->setPart ($ this -> part2 );
95+ $ this ->bom_entry1b ->setPart ($ part2 );
10496 $ this ->bom_entry1b ->setQuantity (1.5 );
10597
10698 $ this ->bom_entry1c = new ProjectBOMEntry ();
0 commit comments