@@ -86,10 +86,10 @@ private function getArguments(ReflectionProperty|ReflectionMethod $target, array
86
86
throw new CellMappingFailed ('Using more than one ' .Cell::class.' attribute on a class property or method is not supported. ' );
87
87
}
88
88
89
- /** @var Cell $column */
90
- $ column = $ attributes [0 ]->newInstance ();
91
- $ offset = $ column ->offset ;
92
- $ cast = $ this ->getTypeCasting ($ column );
89
+ /** @var Cell $cell */
90
+ $ cell = $ attributes [0 ]->newInstance ();
91
+ $ offset = $ cell ->offset ;
92
+ $ cast = $ this ->getTypeCasting ($ cell );
93
93
if (is_int ($ offset )) {
94
94
return match (true ) {
95
95
0 > $ offset ,
@@ -99,27 +99,27 @@ private function getArguments(ReflectionProperty|ReflectionMethod $target, array
99
99
}
100
100
101
101
if ([] === $ header ) {
102
- throw new CellMappingFailed (__CLASS__ . ' can only use named column if the tabular data has a non-empty header. ' );
102
+ throw new CellMappingFailed (' Cell name as string are only supported if the tabular data has a non-empty header. ' );
103
103
}
104
104
105
105
/** @var int<0, max>|false $index */
106
106
$ index = array_search ($ offset , $ header , true );
107
107
if (false === $ index ) {
108
- throw new CellMappingFailed (__CLASS__ . ' cound not find the offset ` ' .$ offset .'` in the header; Pleaser verify your header data. ' );
108
+ throw new CellMappingFailed (' The offset ` ' .$ offset .'` could not be found in the header; Pleaser verify your header data. ' );
109
109
}
110
110
111
111
return [$ index , $ cast ];
112
112
}
113
113
114
- private function getTypeCasting (Cell $ column ): TypeCasting
114
+ private function getTypeCasting (Cell $ cell ): TypeCasting
115
115
{
116
- $ caster = $ column ->cast ;
116
+ $ caster = $ cell ->cast ;
117
117
if (null === $ caster ) {
118
118
return new CastToScalar ();
119
119
}
120
120
121
121
/** @var TypeCasting $cast */
122
- $ cast = new $ caster (...$ column ->castArguments );
122
+ $ cast = new $ caster (...$ cell ->castArguments );
123
123
124
124
return $ cast ;
125
125
}
0 commit comments