diff --git a/src/Repositories/NullModel.php b/src/Repositories/NullModel.php index e9e970c11..dab48b4bc 100644 --- a/src/Repositories/NullModel.php +++ b/src/Repositories/NullModel.php @@ -6,7 +6,6 @@ use Illuminate\Database\Eloquent\Model; /** - * @package Binaryk\LaravelRestify\Repositories; * @author Eduard Lupacescu */ class NullModel extends Model @@ -14,5 +13,4 @@ class NullModel extends Model use InteractWithSQLight; public $rows = []; - } diff --git a/src/Traits/AuthorizableModels.php b/src/Traits/AuthorizableModels.php index e7a2ff4fc..7f70a93b7 100644 --- a/src/Traits/AuthorizableModels.php +++ b/src/Traits/AuthorizableModels.php @@ -44,7 +44,7 @@ public static function authorizable() */ public function authorizeToShowAny(Request $request) { - if ( ! static::authorizable()) { + if (! static::authorizable()) { return; } @@ -61,7 +61,7 @@ public function authorizeToShowAny(Request $request) */ public static function authorizedToShowAny(Request $request) { - if ( ! static::authorizable()) { + if (! static::authorizable()) { return true; } @@ -71,7 +71,7 @@ public static function authorizedToShowAny(Request $request) } /** - * Determine if the resource should be available for the given request ( + * Determine if the resource should be available for the given request (. * * @param \Illuminate\Http\Request $request * @return void @@ -79,7 +79,7 @@ public static function authorizedToShowAny(Request $request) */ public function authorizeToShowEvery(Request $request) { - if ( ! static::authorizable()) { + if (! static::authorizable()) { return; } @@ -96,7 +96,7 @@ public function authorizeToShowEvery(Request $request) */ public static function authorizedToShowEvery(Request $request) { - if ( ! static::authorizable()) { + if (! static::authorizable()) { return true; } @@ -137,7 +137,7 @@ public function authorizedToShow(Request $request) */ public static function authorizeToStore(Request $request) { - if ( ! static::authorizedToStore($request)) { + if (! static::authorizedToStore($request)) { throw new AuthorizationException('Unauthorized to store.'); } } @@ -252,7 +252,7 @@ public function determineModel() } /** - * Determine if the trait is used by repository or model + * Determine if the trait is used by repository or model. * * @return bool */ diff --git a/src/Traits/InteractWithSQLight.php b/src/Traits/InteractWithSQLight.php index 658ac01e2..044cea9ee 100644 --- a/src/Traits/InteractWithSQLight.php +++ b/src/Traits/InteractWithSQLight.php @@ -6,7 +6,6 @@ use Illuminate\Support\Str; /** - * @package App\Models; * @author Eduard Lupacescu */ trait InteractWithSQLight @@ -21,9 +20,9 @@ public static function resolveConnection($connection = null) public static function bootSushi() { $instance = (new static); - $cacheFileName = 'sushi-' . Str::kebab(str_replace('\\', '', static::class)) . '.sqlite'; + $cacheFileName = 'sushi-'.Str::kebab(str_replace('\\', '', static::class)).'.sqlite'; $cacheDirectory = realpath(config('sushi.cache-path', storage_path('framework/cache'))); - $cachePath = $cacheDirectory . '/' . $cacheFileName; + $cachePath = $cacheDirectory.'/'.$cacheFileName; $modelPath = (new \ReflectionClass(static::class))->getFileName(); $states = [ @@ -75,7 +74,7 @@ public function migrate() $firstRow = $rows[0]; $tableName = $this->getTable(); - throw_unless($rows, new \Exception('Sushi: $rows property not found on model: ' . get_class($this))); + throw_unless($rows, new \Exception('Sushi: $rows property not found on model: '.get_class($this))); static::resolveConnection()->getSchemaBuilder()->create($tableName, function ($table) use ($firstRow) { foreach ($firstRow as $column => $value) { @@ -92,5 +91,4 @@ public function migrate() static::insert($rows); } - }