Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Insight] Your project should not contain commented code - in src/Controller/ImageController.php, line 46 #67

Closed
AxelBuob opened this issue Feb 28, 2022 · 0 comments · Fixed by #68
Assignees

Comments

@AxelBuob
Copy link
Owner

in src/Controller/ImageController.php, line 46

Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    public function add(User $user, $image, $upload_directory, Post $post = null)
    {
        $image = $this->fileUploader->upload($image, $upload_directory, $this->slugger);

        //$user->setAvatar($image);
        $image->setOwner($user);
        if($post)
        {
            $post->addImage($image);
            

Posted from SymfonyInsight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant