Skip to content

Commit

Permalink
Replace usage of starts_with
Browse files Browse the repository at this point in the history
  • Loading branch information
owenconti authored Aug 24, 2021
1 parent cd0e3f2 commit 53fffa8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ protected function setFontStyle($caller, $setter, $key, $params)
*/
protected function _setSetter($setter)
{
if (starts_with($setter, 'set'))
if (strpos($setter, 'set') === 0)
{
$key = lcfirst(str_replace('set', '', $setter));
}
Expand Down Expand Up @@ -1233,7 +1233,7 @@ function cloneParent(PHPExcel_Worksheet $sheet)
public function __call($method, $params)
{
// If the dynamic call starts with "with", add the var to the data array
if (starts_with($method, 'with'))
if (strpos($method, 'with') === 0)
{
$key = lcfirst(str_replace('with', '', $method));
$this->_addVars($key, reset($params));
Expand All @@ -1242,7 +1242,7 @@ public function __call($method, $params)
}

// If it's a setter
elseif (starts_with($method, 'set'))
elseif (strpos($method, 'set') === 0)
{
// set the attribute
$this->_setAttributes($method, $params);
Expand Down

0 comments on commit 53fffa8

Please sign in to comment.