You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an issue where phpnsc incorrectly detects a string as being a class.
Code:
<?php
namespace App\Service;
use App\Entity\Order;
use RuntimeException;
class TestService
{
public function updateOrderStatus(Order $order)
{
$class = '\\App\Importer\\' . ucfirst($order->getVendor()->getName());
if ($order->getStatus() != 'new') {
throw new RuntimeException("Cannot update order");
}
$order->setClass($class);
$order->setStatus('pending');
}
}
I ran into an issue where phpnsc incorrectly detects a string as being a class.
Code:
Here's my phpnsc.json:
Result:
The text was updated successfully, but these errors were encountered: