for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ikechukwukalu\Sanctumauthstarter\Rules;
use Illuminate\Contracts\Validation\Rule;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
class CurrentPassword implements Rule
Illuminate\Contracts\Validation\Rule
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
class CurrentPassword implements /** @scrutinizer ignore-deprecated */ Rule
This interface has been deprecated. The supplier of the interface has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.
{
/**
* Create a new rule instance.
*
* @return void
*/
public function __construct()
//
}
* Determine if the validation rule passes.
* @param string $attribute
* @param mixed $value
* @return bool
public function passes($attribute, $value)
$user = Auth::user();
return Hash::check($value, $user->password) || is_null($user->password);
password
Illuminate\Contracts\Auth\Authenticatable
instanceof
* Get the validation error message.
* @return string
public function message()
return trans('sanctumauthstarter::passwords.wrong');
This interface has been deprecated. The supplier of the interface has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.